diff --git a/.cz.toml b/.cz.toml index 6a3f5e1cd..7873cb0a9 100644 --- a/.cz.toml +++ b/.cz.toml @@ -2,6 +2,6 @@ name = "cz_conventional_commits" tag_format = "v$version" version_scheme = "semver" -version = "0.1.1" +version = "0.2.0" update_changelog_on_bump = true major_version_zero = true diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..84fc8e536 --- /dev/null +++ b/.envrc @@ -0,0 +1,7 @@ +# Automatically sets up your devbox environment whenever you cd into this +# directory via our direnv integration: + +eval "$(devbox generate direnv --print-envrc)" + +# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ +# for more details diff --git a/.github/workflows/buf-publish.yml b/.github/workflows/buf-publish.yml index 6c14104fc..1c7fe2d07 100644 --- a/.github/workflows/buf-publish.yml +++ b/.github/workflows/buf-publish.yml @@ -32,5 +32,5 @@ jobs: r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} r2-bucket: pkljar - source-dir: pkl + source-dir: config/pkl destination-dir: . diff --git a/.github/workflows/pr-merged.yml b/.github/workflows/pr-merged.yml new file mode 100644 index 000000000..07ccc0a85 --- /dev/null +++ b/.github/workflows/pr-merged.yml @@ -0,0 +1,29 @@ +name: PR Merged - Bump Version and Tag + +on: + pull_request: + types: + - closed + branches: + - develop + +permissions: + contents: write + +jobs: + bump-version-and-tag: + if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'feature/') + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Bump version and update changelog + uses: commitizen-tools/commitizen-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Push changes and tag + run: git push && git push --tags diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 000000000..a06b683eb --- /dev/null +++ b/.github/workflows/sync-branches.yml @@ -0,0 +1,45 @@ +name: Sync Branches + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + sync-branches: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check if tag is on develop or master + id: check-branch + run: | + if git branch -r --contains ${{ github.ref }} | grep -q 'origin/develop\|origin/master'; then + echo "SYNC_NEEDED=true" >> $GITHUB_OUTPUT + else + echo "SYNC_NEEDED=false" >> $GITHUB_OUTPUT + fi + + - name: Sync develop to master + if: steps.check-branch.outputs.SYNC_NEEDED == 'true' + uses: devmasx/merge-branch@master + with: + type: now + from_branch: develop + target_branch: master + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Sync master back to develop + if: steps.check-branch.outputs.SYNC_NEEDED == 'true' + uses: devmasx/merge-branch@master + with: + type: now + from_branch: master + target_branch: develop + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 888347d22..bb0c6a236 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ x/.DS_Store !motr/build +buildenv* diff --git a/CHANGELOG.md b/CHANGELOG.md index 519ea2303..fe2ffd8d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,54 +1,35 @@ -## v0.1.1 (2024-09-05) +## v0.2.0 (2024-09-21) + +### Feat + +- add automated production release workflow +- **did**: remove unused proto files +- add enums.pulsar.go file for PermissionScope enum (#4) +- add initial DID implementation +- remove builder interface +- add basic UI for block explorer +- add Usage: pkl [OPTIONS] COMMAND [ARGS]... +- use SQLite embedded driver ### Fix +- Update proc_list_width in mprocs.yaml +- Add service to database when registering +- pin added did documents to local ipfs node +- remove extra spaces in typeUrl - **release**: remove unnecessary quotes in tag pattern ### Refactor +- simplify verification method structure +- use staking keeper in DID keeper +- remove unused dependencies - remove unused image building workflow -## 0.1.0 (2024-09-05) +## v0.1.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 @@ -60,18 +41,6 @@ ### 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 @@ -84,12 +53,7 @@ ### 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 +- add field to - Update KeyKind Enum to have proper naming conventions - Update `DIDNamespace` to have proper naming convention - expose ports directly in docker-compose diff --git a/Dockerfile b/Dockerfile index 3f927f3de..19afcdb8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code USER ${DEVBOX_USER}:${DEVBOX_USER} COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json -COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml +COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} deploy/process-compose.yaml process-compose.yaml RUN devbox run -- echo "Installed Packages." @@ -26,7 +26,7 @@ RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code USER ${DEVBOX_USER}:${DEVBOX_USER} COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json -COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml +COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} deploy/process-compose.yaml process-compose.yaml COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} . . RUN devbox run -- echo "Installed Packages." @@ -86,8 +86,4 @@ WORKDIR /opt # rest server, tendermint p2p, tendermint rpc EXPOSE 1317 26656 26657 6060 -<<<<<<< HEAD -CMD ["test_node.sh"] -======= ENTRYPOINT ["/usr/bin/sonrd"] ->>>>>>> master diff --git a/Makefile b/Makefile index 03fc8475f..e08652cd6 100644 --- a/Makefile +++ b/Makefile @@ -293,21 +293,41 @@ sh-testnet: mod-tidy .PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet - - ############################################################################### ### templ & vault ### ############################################################################### -.PHONY: dwn motr +.PHONY: dwn motr xcaddy ipfs-cluster-start dwn: @echo "(dwn) Building dwn.wasm -> IPFS Vault" - GOOS=js GOARCH=wasm go build -o ./internal/vfs/dwn.wasm ./cmd/dwn + GOOS=js GOARCH=wasm go build -o ./pkg/vault/app.wasm ./internal/dwn/main.go motr: - @echo "(motr) Building app.wasm -> Deploy to Cloudflare Workers" - GOOS=js GOARCH=wasm go build -o ./cmd/motr/build/app.wasm ./cmd/motr/main.go + @echo "(web) Building app.wasm -> Deploy to Cloudflare Workers" + GOOS=js GOARCH=wasm go build -o ./web/build/app.wasm ./web/src/main.go + +templ: + @echo "(templ) Generating templ files" + go install github.com/a-h/templ/cmd/templ@latest + templ generate + +pkl: + @echo "(pkl) Building PKL" + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/dwn.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/orm.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/web.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/txns.pkl + +air: + @echo "(air) Building air" + go install github.com/air-verse/air@latest + air -c ./deploy/air.toml + +ipfs-cluster-start: + @echo "(ipfs) Starting ipfs-cluster" + ipfs-cluster-service init --consensus crdt + ipfs-cluster-service daemon ############################################################################### ### help ### diff --git a/api/did/v1/accounts.pulsar.go b/api/did/v1/accounts.pulsar.go deleted file mode 100644 index b808919bb..000000000 --- a/api/did/v1/accounts.pulsar.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/accounts.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_did_v1_accounts_proto protoreflect.FileDescriptor - -var file_did_v1_accounts_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, - 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_did_v1_accounts_proto_goTypes = []interface{}{} -var file_did_v1_accounts_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_did_v1_accounts_proto_init() } -func file_did_v1_accounts_proto_init() { - if File_did_v1_accounts_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_accounts_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_accounts_proto_goTypes, - DependencyIndexes: file_did_v1_accounts_proto_depIdxs, - }.Build() - File_did_v1_accounts_proto = out.File - file_did_v1_accounts_proto_rawDesc = nil - file_did_v1_accounts_proto_goTypes = nil - file_did_v1_accounts_proto_depIdxs = nil -} diff --git a/api/did/v1/enums.pulsar.go b/api/did/v1/enums.pulsar.go deleted file mode 100644 index 2d54b74b4..000000000 --- a/api/did/v1/enums.pulsar.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - _ "cosmossdk.io/api/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/enums.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -// Enum value maps for PermissionScope. -var ( - PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_PROFILE_NAME", - 2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL", - 3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", - } - PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_PROFILE_NAME": 1, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, - } -) - -func (x PermissionScope) Enum() *PermissionScope { - p := new(PermissionScope) - *p = x - return p -} - -func (x PermissionScope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_enums_proto_enumTypes[0].Descriptor() -} - -func (PermissionScope) Type() protoreflect.EnumType { - return &file_did_v1_enums_proto_enumTypes[0] -} - -func (x PermissionScope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PermissionScope.Descriptor instead. -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return file_did_v1_enums_proto_rawDescGZIP(), []int{0} -} - -var File_did_v1_enums_proto protoreflect.FileDescriptor - -var file_did_v1_enums_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0xaa, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x26, - 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x45, - 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, - 0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x26, - 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, - 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, - 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, - 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, - 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, 0x12, - 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, - 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, 0x2b, - 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, - 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, - 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, - 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, - 0x10, 0x0d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, - 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_did_v1_enums_proto_rawDescOnce sync.Once - file_did_v1_enums_proto_rawDescData = file_did_v1_enums_proto_rawDesc -) - -func file_did_v1_enums_proto_rawDescGZIP() []byte { - file_did_v1_enums_proto_rawDescOnce.Do(func() { - file_did_v1_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_enums_proto_rawDescData) - }) - return file_did_v1_enums_proto_rawDescData -} - -var file_did_v1_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_did_v1_enums_proto_goTypes = []interface{}{ - (PermissionScope)(0), // 0: did.v1.PermissionScope -} -var file_did_v1_enums_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_did_v1_enums_proto_init() } -func file_did_v1_enums_proto_init() { - if File_did_v1_enums_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_enums_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_enums_proto_goTypes, - DependencyIndexes: file_did_v1_enums_proto_depIdxs, - EnumInfos: file_did_v1_enums_proto_enumTypes, - }.Build() - File_did_v1_enums_proto = out.File - file_did_v1_enums_proto_rawDesc = nil - file_did_v1_enums_proto_goTypes = nil - file_did_v1_enums_proto_depIdxs = nil -} diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index 19e83d410..eadcf5c25 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) @@ -2346,8 +2347,8 @@ func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, pr return } } - if x.AssetType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AssetType)) + if x.AssetType != "" { + value := protoreflect.ValueOfString(x.AssetType) if !f(fd_AssetInfo_asset_type, value) { return } @@ -2386,7 +2387,7 @@ func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { case "did.v1.AssetInfo.symbol": return x.Symbol != "" case "did.v1.AssetInfo.asset_type": - return x.AssetType != 0 + return x.AssetType != "" case "did.v1.AssetInfo.name": return x.Name != "" case "did.v1.AssetInfo.icon_url": @@ -2414,7 +2415,7 @@ func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { case "did.v1.AssetInfo.symbol": x.Symbol = "" case "did.v1.AssetInfo.asset_type": - x.AssetType = 0 + x.AssetType = "" case "did.v1.AssetInfo.name": x.Name = "" case "did.v1.AssetInfo.icon_url": @@ -2446,7 +2447,7 @@ func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) return protoreflect.ValueOfString(value) case "did.v1.AssetInfo.asset_type": value := x.AssetType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) case "did.v1.AssetInfo.name": value := x.Name return protoreflect.ValueOfString(value) @@ -2480,7 +2481,7 @@ func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value pr case "did.v1.AssetInfo.symbol": x.Symbol = value.Interface().(string) case "did.v1.AssetInfo.asset_type": - x.AssetType = (AssetType)(value.Enum()) + x.AssetType = value.Interface().(string) case "did.v1.AssetInfo.name": x.Name = value.Interface().(string) case "did.v1.AssetInfo.icon_url": @@ -2537,7 +2538,7 @@ func (x *fastReflection_AssetInfo) NewField(fd protoreflect.FieldDescriptor) pro case "did.v1.AssetInfo.symbol": return protoreflect.ValueOfString("") case "did.v1.AssetInfo.asset_type": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") case "did.v1.AssetInfo.name": return protoreflect.ValueOfString("") case "did.v1.AssetInfo.icon_url": @@ -2622,8 +2623,9 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.AssetType != 0 { - n += 1 + runtime.Sov(uint64(x.AssetType)) + l = len(x.AssetType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Name) if l > 0 { @@ -2676,10 +2678,12 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x2a } - if x.AssetType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AssetType)) + if len(x.AssetType) > 0 { + i -= len(x.AssetType) + copy(dAtA[i:], x.AssetType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } if len(x.Symbol) > 0 { i -= len(x.Symbol) @@ -2833,10 +2837,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { x.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) } - x.AssetType = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2846,11 +2850,24 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.AssetType |= AssetType(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.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 Name", wireType) @@ -2950,6 +2967,1110 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_Document_3_list)(nil) + +type _Document_3_list struct { + list *[]string +} + +func (x *_Document_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) +} + +func (x *_Document_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_4_list)(nil) + +type _Document_4_list struct { + list *[]string +} + +func (x *_Document_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) +} + +func (x *_Document_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_5_list)(nil) + +type _Document_5_list struct { + list *[]string +} + +func (x *_Document_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) +} + +func (x *_Document_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_6_list)(nil) + +type _Document_6_list struct { + list *[]string +} + +func (x *_Document_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) +} + +func (x *_Document_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_6_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_7_list)(nil) + +type _Document_7_list struct { + list *[]string +} + +func (x *_Document_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind")) +} + +func (x *_Document_7_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_7_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Document protoreflect.MessageDescriptor + fd_Document_id protoreflect.FieldDescriptor + fd_Document_controller protoreflect.FieldDescriptor + fd_Document_authentication protoreflect.FieldDescriptor + fd_Document_assertion_method protoreflect.FieldDescriptor + fd_Document_capability_delegation protoreflect.FieldDescriptor + fd_Document_capability_invocation protoreflect.FieldDescriptor + fd_Document_service protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_Document = File_did_v1_genesis_proto.Messages().ByName("Document") + fd_Document_id = md_Document.Fields().ByName("id") + fd_Document_controller = md_Document.Fields().ByName("controller") + fd_Document_authentication = md_Document.Fields().ByName("authentication") + fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") + fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") + fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation") + fd_Document_service = md_Document.Fields().ByName("service") +} + +var _ protoreflect.Message = (*fastReflection_Document)(nil) + +type fastReflection_Document Document + +func (x *Document) ProtoReflect() protoreflect.Message { + return (*fastReflection_Document)(x) +} + +func (x *Document) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Document_messageType fastReflection_Document_messageType +var _ protoreflect.MessageType = fastReflection_Document_messageType{} + +type fastReflection_Document_messageType struct{} + +func (x fastReflection_Document_messageType) Zero() protoreflect.Message { + return (*fastReflection_Document)(nil) +} +func (x fastReflection_Document_messageType) New() protoreflect.Message { + return new(fastReflection_Document) +} +func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Document) Type() protoreflect.MessageType { + return _fastReflection_Document_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Document) New() protoreflect.Message { + return new(fastReflection_Document) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { + return (*Document)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Document_id, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Document_controller, value) { + return + } + } + if len(x.Authentication) != 0 { + value := protoreflect.ValueOfList(&_Document_3_list{list: &x.Authentication}) + if !f(fd_Document_authentication, value) { + return + } + } + if len(x.AssertionMethod) != 0 { + value := protoreflect.ValueOfList(&_Document_4_list{list: &x.AssertionMethod}) + if !f(fd_Document_assertion_method, value) { + return + } + } + if len(x.CapabilityDelegation) != 0 { + value := protoreflect.ValueOfList(&_Document_5_list{list: &x.CapabilityDelegation}) + if !f(fd_Document_capability_delegation, value) { + return + } + } + if len(x.CapabilityInvocation) != 0 { + value := protoreflect.ValueOfList(&_Document_6_list{list: &x.CapabilityInvocation}) + if !f(fd_Document_capability_invocation, value) { + return + } + } + if len(x.Service) != 0 { + value := protoreflect.ValueOfList(&_Document_7_list{list: &x.Service}) + if !f(fd_Document_service, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Document.id": + return x.Id != "" + case "did.v1.Document.controller": + return x.Controller != "" + case "did.v1.Document.authentication": + return len(x.Authentication) != 0 + case "did.v1.Document.assertion_method": + return len(x.AssertionMethod) != 0 + case "did.v1.Document.capability_delegation": + return len(x.CapabilityDelegation) != 0 + case "did.v1.Document.capability_invocation": + return len(x.CapabilityInvocation) != 0 + 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")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Document.id": + x.Id = "" + case "did.v1.Document.controller": + x.Controller = "" + case "did.v1.Document.authentication": + x.Authentication = nil + case "did.v1.Document.assertion_method": + x.AssertionMethod = nil + case "did.v1.Document.capability_delegation": + x.CapabilityDelegation = nil + case "did.v1.Document.capability_invocation": + x.CapabilityInvocation = nil + 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")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Document.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Document.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Document.authentication": + if len(x.Authentication) == 0 { + return protoreflect.ValueOfList(&_Document_3_list{}) + } + listValue := &_Document_3_list{list: &x.Authentication} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.assertion_method": + if len(x.AssertionMethod) == 0 { + return protoreflect.ValueOfList(&_Document_4_list{}) + } + listValue := &_Document_4_list{list: &x.AssertionMethod} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.capability_delegation": + if len(x.CapabilityDelegation) == 0 { + return protoreflect.ValueOfList(&_Document_5_list{}) + } + listValue := &_Document_5_list{list: &x.CapabilityDelegation} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.capability_invocation": + if len(x.CapabilityInvocation) == 0 { + return protoreflect.ValueOfList(&_Document_6_list{}) + } + listValue := &_Document_6_list{list: &x.CapabilityInvocation} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.service": + if len(x.Service) == 0 { + return protoreflect.ValueOfList(&_Document_7_list{}) + } + listValue := &_Document_7_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")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Document.id": + x.Id = value.Interface().(string) + case "did.v1.Document.controller": + x.Controller = value.Interface().(string) + case "did.v1.Document.authentication": + lv := value.List() + clv := lv.(*_Document_3_list) + x.Authentication = *clv.list + case "did.v1.Document.assertion_method": + lv := value.List() + clv := lv.(*_Document_4_list) + x.AssertionMethod = *clv.list + case "did.v1.Document.capability_delegation": + lv := value.List() + clv := lv.(*_Document_5_list) + x.CapabilityDelegation = *clv.list + case "did.v1.Document.capability_invocation": + lv := value.List() + clv := lv.(*_Document_6_list) + x.CapabilityInvocation = *clv.list + case "did.v1.Document.service": + lv := value.List() + clv := lv.(*_Document_7_list) + x.Service = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Document.authentication": + if x.Authentication == nil { + x.Authentication = []string{} + } + value := &_Document_3_list{list: &x.Authentication} + return protoreflect.ValueOfList(value) + case "did.v1.Document.assertion_method": + if x.AssertionMethod == nil { + x.AssertionMethod = []string{} + } + value := &_Document_4_list{list: &x.AssertionMethod} + return protoreflect.ValueOfList(value) + case "did.v1.Document.capability_delegation": + if x.CapabilityDelegation == nil { + x.CapabilityDelegation = []string{} + } + value := &_Document_5_list{list: &x.CapabilityDelegation} + return protoreflect.ValueOfList(value) + case "did.v1.Document.capability_invocation": + if x.CapabilityInvocation == nil { + x.CapabilityInvocation = []string{} + } + value := &_Document_6_list{list: &x.CapabilityInvocation} + return protoreflect.ValueOfList(value) + case "did.v1.Document.service": + if x.Service == nil { + x.Service = []string{} + } + value := &_Document_7_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")) + case "did.v1.Document.controller": + panic(fmt.Errorf("field controller of message did.v1.Document is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Document.id": + return protoreflect.ValueOfString("") + case "did.v1.Document.controller": + return protoreflect.ValueOfString("") + case "did.v1.Document.authentication": + list := []string{} + return protoreflect.ValueOfList(&_Document_3_list{list: &list}) + case "did.v1.Document.assertion_method": + list := []string{} + return protoreflect.ValueOfList(&_Document_4_list{list: &list}) + case "did.v1.Document.capability_delegation": + list := []string{} + return protoreflect.ValueOfList(&_Document_5_list{list: &list}) + case "did.v1.Document.capability_invocation": + list := []string{} + return protoreflect.ValueOfList(&_Document_6_list{list: &list}) + case "did.v1.Document.service": + list := []string{} + return protoreflect.ValueOfList(&_Document_7_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Document) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Document) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + 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)) + } + if len(x.Authentication) > 0 { + for _, s := range x.Authentication { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.AssertionMethod) > 0 { + for _, s := range x.AssertionMethod { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.CapabilityDelegation) > 0 { + for _, s := range x.CapabilityDelegation { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.CapabilityInvocation) > 0 { + for _, s := range x.CapabilityInvocation { + l = len(s) + 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) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Document) + 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.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] = 0x3a + } + } + if len(x.CapabilityInvocation) > 0 { + for iNdEx := len(x.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.CapabilityInvocation[iNdEx]) + copy(dAtA[i:], x.CapabilityInvocation[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityInvocation[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.CapabilityDelegation) > 0 { + for iNdEx := len(x.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.CapabilityDelegation[iNdEx]) + copy(dAtA[i:], x.CapabilityDelegation[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.AssertionMethod) > 0 { + for iNdEx := len(x.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.AssertionMethod[iNdEx]) + copy(dAtA[i:], x.AssertionMethod[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionMethod[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Authentication) > 0 { + for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Authentication[iNdEx]) + copy(dAtA[i:], x.Authentication[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx]))) + 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().(*Document) + 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: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 Authentication", 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.Authentication = append(x.Authentication, 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 AssertionMethod", 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.AssertionMethod = append(x.AssertionMethod, 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 CapabilityDelegation", 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.CapabilityDelegation = append(x.CapabilityDelegation, 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 CapabilityInvocation", 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.CapabilityInvocation = append(x.CapabilityInvocation, 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 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:]) + 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_KeyInfo protoreflect.MessageDescriptor fd_KeyInfo_role protoreflect.FieldDescriptor @@ -2978,7 +4099,7 @@ func (x *KeyInfo) ProtoReflect() protoreflect.Message { } func (x *KeyInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[4] + mi := &file_did_v1_genesis_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3034,32 +4155,32 @@ func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { // 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.Role != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role)) + if x.Role != "" { + value := protoreflect.ValueOfString(x.Role) if !f(fd_KeyInfo_role, value) { return } } - if x.Algorithm != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm)) + if x.Algorithm != "" { + value := protoreflect.ValueOfString(x.Algorithm) if !f(fd_KeyInfo_algorithm, value) { return } } - if x.Encoding != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding)) + if x.Encoding != "" { + value := protoreflect.ValueOfString(x.Encoding) if !f(fd_KeyInfo_encoding, value) { return } } - if x.Curve != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Curve)) + if x.Curve != "" { + value := protoreflect.ValueOfString(x.Curve) if !f(fd_KeyInfo_curve, value) { return } } - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) + if x.Type_ != "" { + value := protoreflect.ValueOfString(x.Type_) if !f(fd_KeyInfo_type, value) { return } @@ -3080,15 +4201,15 @@ func (x *fastReflection_KeyInfo) Range(f func(protoreflect.FieldDescriptor, prot func (x *fastReflection_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.KeyInfo.role": - return x.Role != 0 + return x.Role != "" case "did.v1.KeyInfo.algorithm": - return x.Algorithm != 0 + return x.Algorithm != "" case "did.v1.KeyInfo.encoding": - return x.Encoding != 0 + return x.Encoding != "" case "did.v1.KeyInfo.curve": - return x.Curve != 0 + return x.Curve != "" case "did.v1.KeyInfo.type": - return x.Type_ != 0 + return x.Type_ != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) @@ -3106,15 +4227,15 @@ func (x *fastReflection_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { func (x *fastReflection_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.KeyInfo.role": - x.Role = 0 + x.Role = "" case "did.v1.KeyInfo.algorithm": - x.Algorithm = 0 + x.Algorithm = "" case "did.v1.KeyInfo.encoding": - x.Encoding = 0 + x.Encoding = "" case "did.v1.KeyInfo.curve": - x.Curve = 0 + x.Curve = "" case "did.v1.KeyInfo.type": - x.Type_ = 0 + x.Type_ = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) @@ -3133,19 +4254,19 @@ func (x *fastReflection_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) pr switch descriptor.FullName() { case "did.v1.KeyInfo.role": value := x.Role - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) case "did.v1.KeyInfo.algorithm": value := x.Algorithm - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) case "did.v1.KeyInfo.encoding": value := x.Encoding - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) case "did.v1.KeyInfo.curve": value := x.Curve - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) case "did.v1.KeyInfo.type": value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) @@ -3167,15 +4288,15 @@ func (x *fastReflection_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) pr func (x *fastReflection_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "did.v1.KeyInfo.role": - x.Role = (KeyRole)(value.Enum()) + x.Role = value.Interface().(string) case "did.v1.KeyInfo.algorithm": - x.Algorithm = (KeyAlgorithm)(value.Enum()) + x.Algorithm = value.Interface().(string) case "did.v1.KeyInfo.encoding": - x.Encoding = (KeyEncoding)(value.Enum()) + x.Encoding = value.Interface().(string) case "did.v1.KeyInfo.curve": - x.Curve = (KeyCurve)(value.Enum()) + x.Curve = value.Interface().(string) case "did.v1.KeyInfo.type": - x.Type_ = (KeyType)(value.Enum()) + x.Type_ = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) @@ -3220,15 +4341,15 @@ func (x *fastReflection_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "did.v1.KeyInfo.role": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") case "did.v1.KeyInfo.algorithm": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") case "did.v1.KeyInfo.encoding": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") case "did.v1.KeyInfo.curve": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") case "did.v1.KeyInfo.type": - return protoreflect.ValueOfEnum(0) + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) @@ -3298,20 +4419,25 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Role != 0 { - n += 1 + runtime.Sov(uint64(x.Role)) + l = len(x.Role) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.Algorithm != 0 { - n += 1 + runtime.Sov(uint64(x.Algorithm)) + l = len(x.Algorithm) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.Encoding != 0 { - n += 1 + runtime.Sov(uint64(x.Encoding)) + l = len(x.Encoding) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.Curve != 0 { - n += 1 + runtime.Sov(uint64(x.Curve)) + l = len(x.Curve) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) + l = len(x.Type_) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3342,30 +4468,40 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) + if len(x.Type_) > 0 { + i -= len(x.Type_) + copy(dAtA[i:], x.Type_) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if x.Curve != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Curve)) + 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] = 0x20 + dAtA[i] = 0x22 } - if x.Encoding != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoding)) + 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] = 0x18 + dAtA[i] = 0x1a } - if x.Algorithm != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Algorithm)) + if len(x.Algorithm) > 0 { + i -= len(x.Algorithm) + copy(dAtA[i:], x.Algorithm) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if x.Role != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Role)) + if len(x.Role) > 0 { + i -= len(x.Role) + copy(dAtA[i:], x.Role) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -3417,10 +4553,10 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) } - x.Role = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3430,16 +4566,29 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Role |= KeyRole(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.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) } - x.Algorithm = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3449,16 +4598,29 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Algorithm |= KeyAlgorithm(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.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } - x.Encoding = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3468,16 +4630,29 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Encoding |= KeyEncoding(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.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) } - x.Curve = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3487,16 +4662,29 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Curve |= KeyCurve(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.Curve = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) } - x.Type_ = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3506,11 +4694,24 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Type_ |= 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.Type_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3546,139 +4747,39 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } } -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 + md_PubKey protoreflect.MessageDescriptor + fd_PubKey_role protoreflect.FieldDescriptor + fd_PubKey_algorithm protoreflect.FieldDescriptor + fd_PubKey_encoding protoreflect.FieldDescriptor + fd_PubKey_curve protoreflect.FieldDescriptor + fd_PubKey_key_type protoreflect.FieldDescriptor + fd_PubKey_raw protoreflect.FieldDescriptor + fd_PubKey_jwk 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") + md_PubKey = File_did_v1_genesis_proto.Messages().ByName("PubKey") + 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_curve = md_PubKey.Fields().ByName("curve") + fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type") + fd_PubKey_raw = md_PubKey.Fields().ByName("raw") + fd_PubKey_jwk = md_PubKey.Fields().ByName("jwk") } -var _ protoreflect.Message = (*fastReflection_ValidatorInfo)(nil) +var _ protoreflect.Message = (*fastReflection_PubKey)(nil) -type fastReflection_ValidatorInfo ValidatorInfo +type fastReflection_PubKey PubKey -func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorInfo)(x) +func (x *PubKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_PubKey)(x) } -func (x *ValidatorInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[5] +func (x *PubKey) 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 { @@ -3689,43 +4790,43 @@ func (x *ValidatorInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ValidatorInfo_messageType fastReflection_ValidatorInfo_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorInfo_messageType{} +var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType +var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} -type fastReflection_ValidatorInfo_messageType struct{} +type fastReflection_PubKey_messageType struct{} -func (x fastReflection_ValidatorInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorInfo)(nil) +func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_PubKey)(nil) } -func (x fastReflection_ValidatorInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo) +func (x fastReflection_PubKey_messageType) New() protoreflect.Message { + return new(fastReflection_PubKey) } -func (x fastReflection_ValidatorInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo +func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ValidatorInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo +func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ValidatorInfo) Type() protoreflect.MessageType { - return _fastReflection_ValidatorInfo_messageType +func (x *fastReflection_PubKey) Type() protoreflect.MessageType { + return _fastReflection_PubKey_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorInfo) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo) +func (x *fastReflection_PubKey) New() protoreflect.Message { + return new(fastReflection_PubKey) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorInfo) Interface() protoreflect.ProtoMessage { - return (*ValidatorInfo)(x) +func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { + return (*PubKey)(x) } // Range iterates over every populated field in an undefined order, @@ -3733,40 +4834,46 @@ func (x *fastReflection_ValidatorInfo) 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_ValidatorInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Moniker != "" { - value := protoreflect.ValueOfString(x.Moniker) - if !f(fd_ValidatorInfo_moniker, value) { +func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Role != "" { + value := protoreflect.ValueOfString(x.Role) + if !f(fd_PubKey_role, value) { return } } - if len(x.GrpcEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ValidatorInfo_2_list{list: &x.GrpcEndpoints}) - if !f(fd_ValidatorInfo_grpc_endpoints, value) { + if x.Algorithm != "" { + value := protoreflect.ValueOfString(x.Algorithm) + if !f(fd_PubKey_algorithm, value) { return } } - if len(x.RestEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ValidatorInfo_3_list{list: &x.RestEndpoints}) - if !f(fd_ValidatorInfo_rest_endpoints, value) { + if x.Encoding != "" { + value := protoreflect.ValueOfString(x.Encoding) + if !f(fd_PubKey_encoding, value) { return } } - if x.Explorer != nil { - value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - if !f(fd_ValidatorInfo_explorer, value) { + if x.Curve != "" { + value := protoreflect.ValueOfString(x.Curve) + if !f(fd_PubKey_curve, value) { return } } - if x.FeeInfo != nil { - value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - if !f(fd_ValidatorInfo_fee_info, value) { + if x.KeyType != "" { + value := protoreflect.ValueOfString(x.KeyType) + if !f(fd_PubKey_key_type, value) { return } } - if x.IbcChannel != nil { - value := protoreflect.ValueOfMessage(x.IbcChannel.ProtoReflect()) - if !f(fd_ValidatorInfo_ibc_channel, value) { + if len(x.Raw) != 0 { + value := protoreflect.ValueOfBytes(x.Raw) + if !f(fd_PubKey_raw, value) { + return + } + } + if x.Jwk != nil { + value := protoreflect.ValueOfMessage(x.Jwk.ProtoReflect()) + if !f(fd_PubKey_jwk, value) { return } } @@ -3783,25 +4890,27 @@ func (x *fastReflection_ValidatorInfo) Range(f func(protoreflect.FieldDescriptor // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_PubKey) 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 + case "did.v1.PubKey.role": + return x.Role != "" + case "did.v1.PubKey.algorithm": + return x.Algorithm != "" + case "did.v1.PubKey.encoding": + return x.Encoding != "" + case "did.v1.PubKey.curve": + return x.Curve != "" + case "did.v1.PubKey.key_type": + return x.KeyType != "" + case "did.v1.PubKey.raw": + return len(x.Raw) != 0 + case "did.v1.PubKey.jwk": + return x.Jwk != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) } } @@ -3811,25 +4920,27 @@ func (x *fastReflection_ValidatorInfo) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_PubKey) 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 + case "did.v1.PubKey.role": + x.Role = "" + case "did.v1.PubKey.algorithm": + x.Algorithm = "" + case "did.v1.PubKey.encoding": + x.Encoding = "" + case "did.v1.PubKey.curve": + x.Curve = "" + case "did.v1.PubKey.key_type": + x.KeyType = "" + case "did.v1.PubKey.raw": + x.Raw = 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.ValidatorInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) } } @@ -3839,37 +4950,34 @@ func (x *fastReflection_ValidatorInfo) 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_ValidatorInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ValidatorInfo.moniker": - value := x.Moniker + case "did.v1.PubKey.role": + value := x.Role 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 + case "did.v1.PubKey.algorithm": + value := x.Algorithm + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.encoding": + value := x.Encoding + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.curve": + value := x.Curve + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.key_type": + value := x.KeyType + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.raw": + value := x.Raw + return protoreflect.ValueOfBytes(value) + case "did.v1.PubKey.jwk": + value := x.Jwk 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("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName())) } } @@ -3883,29 +4991,27 @@ func (x *fastReflection_ValidatorInfo) Get(descriptor protoreflect.FieldDescript // 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) { +func (x *fastReflection_PubKey) 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) + case "did.v1.PubKey.role": + x.Role = value.Interface().(string) + case "did.v1.PubKey.algorithm": + x.Algorithm = value.Interface().(string) + case "did.v1.PubKey.encoding": + x.Encoding = value.Interface().(string) + case "did.v1.PubKey.curve": + x.Curve = value.Interface().(string) + case "did.v1.PubKey.key_type": + x.KeyType = value.Interface().(string) + case "did.v1.PubKey.raw": + x.Raw = value.Bytes() + case "did.v1.PubKey.jwk": + x.Jwk = value.Message().Interface().(*PubKey_JWK) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) } } @@ -3919,82 +5025,68 @@ func (x *fastReflection_ValidatorInfo) Set(fd protoreflect.FieldDescriptor, valu // 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 { +func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ValidatorInfo.grpc_endpoints": - if x.GrpcEndpoints == nil { - x.GrpcEndpoints = []*ValidatorInfo_Endpoint{} + case "did.v1.PubKey.jwk": + if x.Jwk == nil { + x.Jwk = new(PubKey_JWK) } - 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")) + return protoreflect.ValueOfMessage(x.Jwk.ProtoReflect()) + 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.curve": + panic(fmt.Errorf("field curve of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.key_type": + panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.raw": + panic(fmt.Errorf("field raw of message did.v1.PubKey is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ValidatorInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ValidatorInfo.moniker": + case "did.v1.PubKey.role": 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) + case "did.v1.PubKey.algorithm": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.encoding": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.curve": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.key_type": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.raw": + return protoreflect.ValueOfBytes(nil) + case "did.v1.PubKey.jwk": + m := new(PubKey_JWK) 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("proto3 declared messages do not support extensions: did.v1.PubKey")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ValidatorInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName())) } panic("unreachable") } @@ -4002,7 +5094,7 @@ func (x *fastReflection_ValidatorInfo) WhichOneof(d protoreflect.OneofDescriptor // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ValidatorInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4013,7 +5105,7 @@ func (x *fastReflection_ValidatorInfo) 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_ValidatorInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4025,7 +5117,7 @@ func (x *fastReflection_ValidatorInfo) 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_ValidatorInfo) IsValid() bool { +func (x *fastReflection_PubKey) IsValid() bool { return x != nil } @@ -4035,9 +5127,9 @@ func (x *fastReflection_ValidatorInfo) 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_ValidatorInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorInfo) + x := input.Message.Interface().(*PubKey) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4049,32 +5141,32 @@ func (x *fastReflection_ValidatorInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Moniker) + l = len(x.Role) 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) + l = len(x.Algorithm) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.FeeInfo != nil { - l = options.Size(x.FeeInfo) + l = len(x.Encoding) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.IbcChannel != nil { - l = options.Size(x.IbcChannel) + l = len(x.Curve) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Raw) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Jwk != nil { + l = options.Size(x.Jwk) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4087,7 +5179,7 @@ func (x *fastReflection_ValidatorInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo) + x := input.Message.Interface().(*PubKey) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4106,8 +5198,8 @@ func (x *fastReflection_ValidatorInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.IbcChannel != nil { - encoded, err := options.Marshal(x.IbcChannel) + if x.Jwk != nil { + encoded, err := options.Marshal(x.Jwk) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4118,1174 +5210,47 @@ func (x *fastReflection_ValidatorInfo) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x3a + } + 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] = 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))) + if len(x.KeyType) > 0 { + i -= len(x.KeyType) + copy(dAtA[i:], x.KeyType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) i-- dAtA[i] = 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))) + 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] = 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))) + 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] = 0xa + dAtA[i] = 0x1a } - 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, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Url) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsPrimary { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_Endpoint) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.IsPrimary { - i-- - if x.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_Endpoint) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - 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: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_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_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_ValidatorInfo_ExplorerInfo)(nil) - -type fastReflection_ValidatorInfo_ExplorerInfo ValidatorInfo_ExplorerInfo - -func (x *ValidatorInfo_ExplorerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorInfo_ExplorerInfo)(x) -} - -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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorInfo_ExplorerInfo_messageType fastReflection_ValidatorInfo_ExplorerInfo_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorInfo_ExplorerInfo_messageType{} - -type fastReflection_ValidatorInfo_ExplorerInfo_messageType struct{} - -func (x fastReflection_ValidatorInfo_ExplorerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorInfo_ExplorerInfo)(nil) -} -func (x fastReflection_ValidatorInfo_ExplorerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo_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_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_ValidatorInfo_ExplorerInfo) Type() protoreflect.MessageType { - return _fastReflection_ValidatorInfo_ExplorerInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -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_ValidatorInfo_ExplorerInfo) Interface() protoreflect.ProtoMessage { - return (*ValidatorInfo_ExplorerInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ValidatorInfo_ExplorerInfo_name, value) { - return - } - } - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_ValidatorInfo_ExplorerInfo_url, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ValidatorInfo.ExplorerInfo.name": - return x.Name != "" - 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.ValidatorInfo.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ValidatorInfo.ExplorerInfo.name": - x.Name = "" - case "did.v1.ValidatorInfo.ExplorerInfo.url": - x.Url = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ValidatorInfo.ExplorerInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - 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.ValidatorInfo.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ValidatorInfo.ExplorerInfo.name": - x.Name = value.Interface().(string) - 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.ValidatorInfo.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - 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.ValidatorInfo.ExplorerInfo")) - } - 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_ValidatorInfo_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ValidatorInfo.ExplorerInfo.name": - return protoreflect.ValueOfString("") - 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.ValidatorInfo.ExplorerInfo")) - } - 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_ValidatorInfo_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.ExplorerInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Url) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + if len(x.Algorithm) > 0 { + i -= len(x.Algorithm) + copy(dAtA[i:], x.Algorithm) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) i-- dAtA[i] = 0x12 } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + if len(x.Role) > 0 { + i -= len(x.Role) + copy(dAtA[i:], x.Role) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role))) i-- dAtA[i] = 0xa } @@ -5300,7 +5265,7 @@ func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) + x := input.Message.Interface().(*PubKey) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5332,15 +5297,15 @@ func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_ExplorerInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5368,11 +5333,11 @@ func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Name = string(dAtA[iNdEx:postIndex]) + x.Role = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5400,7 +5365,173 @@ func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Url = string(dAtA[iNdEx:postIndex]) + 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 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]) + iNdEx = postIndex + case 4: + 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 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.KeyType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + 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 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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.Raw = append(x.Raw[:0], dAtA[iNdEx:postIndex]...) + if x.Raw == nil { + x.Raw = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + 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 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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.Jwk == nil { + x.Jwk = &PubKey_JWK{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Jwk); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5437,80 +5568,36 @@ func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.M } } -var _ protoreflect.List = (*_ValidatorInfo_FeeInfo_2_list)(nil) - -type _ValidatorInfo_FeeInfo_2_list struct { - list *[]string -} - -func (x *_ValidatorInfo_FeeInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ValidatorInfo_FeeInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ValidatorInfo_FeeInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ValidatorInfo_FeeInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -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 *_ValidatorInfo_FeeInfo_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ValidatorInfo_FeeInfo_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ValidatorInfo_FeeInfo_2_list) IsValid() bool { - return x.list != nil -} - var ( - 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 + md_PubKey_JWK protoreflect.MessageDescriptor + fd_PubKey_JWK_kty protoreflect.FieldDescriptor + fd_PubKey_JWK_crv protoreflect.FieldDescriptor + fd_PubKey_JWK_x protoreflect.FieldDescriptor + fd_PubKey_JWK_y protoreflect.FieldDescriptor + fd_PubKey_JWK_n protoreflect.FieldDescriptor + fd_PubKey_JWK_e protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - 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") + md_PubKey_JWK = File_did_v1_genesis_proto.Messages().ByName("PubKey").Messages().ByName("JWK") + fd_PubKey_JWK_kty = md_PubKey_JWK.Fields().ByName("kty") + fd_PubKey_JWK_crv = md_PubKey_JWK.Fields().ByName("crv") + fd_PubKey_JWK_x = md_PubKey_JWK.Fields().ByName("x") + fd_PubKey_JWK_y = md_PubKey_JWK.Fields().ByName("y") + fd_PubKey_JWK_n = md_PubKey_JWK.Fields().ByName("n") + fd_PubKey_JWK_e = md_PubKey_JWK.Fields().ByName("e") } -var _ protoreflect.Message = (*fastReflection_ValidatorInfo_FeeInfo)(nil) +var _ protoreflect.Message = (*fastReflection_PubKey_JWK)(nil) -type fastReflection_ValidatorInfo_FeeInfo ValidatorInfo_FeeInfo +type fastReflection_PubKey_JWK PubKey_JWK -func (x *ValidatorInfo_FeeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorInfo_FeeInfo)(x) +func (x *PubKey_JWK) ProtoReflect() protoreflect.Message { + return (*fastReflection_PubKey_JWK)(x) } -func (x *ValidatorInfo_FeeInfo) slowProtoReflect() protoreflect.Message { +func (x *PubKey_JWK) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_genesis_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5522,43 +5609,43 @@ func (x *ValidatorInfo_FeeInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ValidatorInfo_FeeInfo_messageType fastReflection_ValidatorInfo_FeeInfo_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorInfo_FeeInfo_messageType{} +var _fastReflection_PubKey_JWK_messageType fastReflection_PubKey_JWK_messageType +var _ protoreflect.MessageType = fastReflection_PubKey_JWK_messageType{} -type fastReflection_ValidatorInfo_FeeInfo_messageType struct{} +type fastReflection_PubKey_JWK_messageType struct{} -func (x fastReflection_ValidatorInfo_FeeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorInfo_FeeInfo)(nil) +func (x fastReflection_PubKey_JWK_messageType) Zero() protoreflect.Message { + return (*fastReflection_PubKey_JWK)(nil) } -func (x fastReflection_ValidatorInfo_FeeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo_FeeInfo) +func (x fastReflection_PubKey_JWK_messageType) New() protoreflect.Message { + return new(fastReflection_PubKey_JWK) } -func (x fastReflection_ValidatorInfo_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo_FeeInfo +func (x fastReflection_PubKey_JWK_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey_JWK } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ValidatorInfo_FeeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo_FeeInfo +func (x *fastReflection_PubKey_JWK) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey_JWK } // 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_FeeInfo) Type() protoreflect.MessageType { - return _fastReflection_ValidatorInfo_FeeInfo_messageType +func (x *fastReflection_PubKey_JWK) Type() protoreflect.MessageType { + return _fastReflection_PubKey_JWK_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorInfo_FeeInfo) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo_FeeInfo) +func (x *fastReflection_PubKey_JWK) New() protoreflect.Message { + return new(fastReflection_PubKey_JWK) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorInfo_FeeInfo) Interface() protoreflect.ProtoMessage { - return (*ValidatorInfo_FeeInfo)(x) +func (x *fastReflection_PubKey_JWK) Interface() protoreflect.ProtoMessage { + return (*PubKey_JWK)(x) } // Range iterates over every populated field in an undefined order, @@ -5566,34 +5653,40 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ValidatorInfo_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseDenom != "" { - value := protoreflect.ValueOfString(x.BaseDenom) - if !f(fd_ValidatorInfo_FeeInfo_base_denom, value) { +func (x *fastReflection_PubKey_JWK) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Kty != "" { + value := protoreflect.ValueOfString(x.Kty) + if !f(fd_PubKey_JWK_kty, value) { return } } - if len(x.FeeRates) != 0 { - value := protoreflect.ValueOfList(&_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates}) - if !f(fd_ValidatorInfo_FeeInfo_fee_rates, value) { + if x.Crv != "" { + value := protoreflect.ValueOfString(x.Crv) + if !f(fd_PubKey_JWK_crv, value) { return } } - if x.InitGasLimit != int32(0) { - value := protoreflect.ValueOfInt32(x.InitGasLimit) - if !f(fd_ValidatorInfo_FeeInfo_init_gas_limit, value) { + if x.X != "" { + value := protoreflect.ValueOfString(x.X) + if !f(fd_PubKey_JWK_x, value) { return } } - if x.IsSimulable != false { - value := protoreflect.ValueOfBool(x.IsSimulable) - if !f(fd_ValidatorInfo_FeeInfo_is_simulable, value) { + if x.Y != "" { + value := protoreflect.ValueOfString(x.Y) + if !f(fd_PubKey_JWK_y, value) { return } } - if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { - value := protoreflect.ValueOfFloat64(x.GasMultiply) - if !f(fd_ValidatorInfo_FeeInfo_gas_multiply, value) { + if x.N != "" { + value := protoreflect.ValueOfString(x.N) + if !f(fd_PubKey_JWK_n, value) { + return + } + } + if x.E != "" { + value := protoreflect.ValueOfString(x.E) + if !f(fd_PubKey_JWK_e, value) { return } } @@ -5610,23 +5703,25 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Range(f func(protoreflect.FieldDe // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorInfo_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_PubKey_JWK) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.base_denom": - return x.BaseDenom != "" - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - return len(x.FeeRates) != 0 - case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": - return x.InitGasLimit != int32(0) - case "did.v1.ValidatorInfo.FeeInfo.is_simulable": - return x.IsSimulable != false - case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": - return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) + case "did.v1.PubKey.JWK.kty": + return x.Kty != "" + case "did.v1.PubKey.JWK.crv": + return x.Crv != "" + case "did.v1.PubKey.JWK.x": + return x.X != "" + case "did.v1.PubKey.JWK.y": + return x.Y != "" + case "did.v1.PubKey.JWK.n": + return x.N != "" + case "did.v1.PubKey.JWK.e": + return x.E != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) } } @@ -5636,23 +5731,25 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_PubKey_JWK) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.base_denom": - x.BaseDenom = "" - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - x.FeeRates = nil - case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(0) - case "did.v1.ValidatorInfo.FeeInfo.is_simulable": - x.IsSimulable = false - case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": - x.GasMultiply = float64(0) + case "did.v1.PubKey.JWK.kty": + x.Kty = "" + case "did.v1.PubKey.JWK.crv": + x.Crv = "" + case "did.v1.PubKey.JWK.x": + x.X = "" + case "did.v1.PubKey.JWK.y": + x.Y = "" + case "did.v1.PubKey.JWK.n": + x.N = "" + case "did.v1.PubKey.JWK.e": + x.E = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) } } @@ -5662,31 +5759,31 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Clear(fd protoreflect.FieldDescri // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ValidatorInfo_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PubKey_JWK) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.base_denom": - value := x.BaseDenom + case "did.v1.PubKey.JWK.kty": + value := x.Kty + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.crv": + value := x.Crv + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.x": + value := x.X + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.y": + value := x.Y + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.n": + value := x.N + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.JWK.e": + value := x.E return protoreflect.ValueOfString(value) - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - if len(x.FeeRates) == 0 { - return protoreflect.ValueOfList(&_ValidatorInfo_FeeInfo_2_list{}) - } - listValue := &_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(listValue) - case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": - value := x.InitGasLimit - return protoreflect.ValueOfInt32(value) - case "did.v1.ValidatorInfo.FeeInfo.is_simulable": - value := x.IsSimulable - return protoreflect.ValueOfBool(value) - 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.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", descriptor.FullName())) } } @@ -5700,25 +5797,25 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_PubKey_JWK) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.base_denom": - x.BaseDenom = value.Interface().(string) - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - lv := value.List() - clv := lv.(*_ValidatorInfo_FeeInfo_2_list) - x.FeeRates = *clv.list - case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(value.Int()) - case "did.v1.ValidatorInfo.FeeInfo.is_simulable": - x.IsSimulable = value.Bool() - case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": - x.GasMultiply = value.Float() + case "did.v1.PubKey.JWK.kty": + x.Kty = value.Interface().(string) + case "did.v1.PubKey.JWK.crv": + x.Crv = value.Interface().(string) + case "did.v1.PubKey.JWK.x": + x.X = value.Interface().(string) + case "did.v1.PubKey.JWK.y": + x.Y = value.Interface().(string) + case "did.v1.PubKey.JWK.n": + x.N = value.Interface().(string) + case "did.v1.PubKey.JWK.e": + x.E = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) } } @@ -5732,61 +5829,60 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PubKey_JWK) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - if x.FeeRates == nil { - x.FeeRates = []string{} - } - value := &_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(value) - 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")) + case "did.v1.PubKey.JWK.kty": + panic(fmt.Errorf("field kty of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.crv": + panic(fmt.Errorf("field crv of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.x": + panic(fmt.Errorf("field x of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.y": + panic(fmt.Errorf("field y of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.n": + panic(fmt.Errorf("field n of message did.v1.PubKey.JWK is not mutable")) + case "did.v1.PubKey.JWK.e": + panic(fmt.Errorf("field e of message did.v1.PubKey.JWK is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PubKey_JWK) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ValidatorInfo.FeeInfo.base_denom": + case "did.v1.PubKey.JWK.kty": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.crv": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.x": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.y": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.n": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.JWK.e": return protoreflect.ValueOfString("") - case "did.v1.ValidatorInfo.FeeInfo.fee_rates": - list := []string{} - 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.ValidatorInfo.FeeInfo.is_simulable": - return protoreflect.ValueOfBool(false) - 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.ValidatorInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PubKey.JWK 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_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_PubKey_JWK) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.FeeInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey.JWK", d.FullName())) } panic("unreachable") } @@ -5794,7 +5890,7 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) WhichOneof(d protoreflect.OneofDe // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ValidatorInfo_FeeInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_PubKey_JWK) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5805,7 +5901,7 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_FeeInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_PubKey_JWK) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5817,7 +5913,7 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) SetUnknown(fields protoreflect.Ra // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ValidatorInfo_FeeInfo) IsValid() bool { +func (x *fastReflection_PubKey_JWK) IsValid() bool { return x != nil } @@ -5827,9 +5923,9 @@ func (x *fastReflection_ValidatorInfo_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_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_PubKey_JWK) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorInfo_FeeInfo) + x := input.Message.Interface().(*PubKey_JWK) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5841,24 +5937,29 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method var n int var l int _ = l - l = len(x.BaseDenom) + l = len(x.Kty) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.FeeRates) > 0 { - for _, s := range x.FeeRates { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } + l = len(x.Crv) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.InitGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.InitGasLimit)) + l = len(x.X) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.IsSimulable { - n += 2 + l = len(x.Y) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - n += 9 + l = len(x.N) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.E) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -5870,7 +5971,7 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_FeeInfo) + x := input.Message.Interface().(*PubKey_JWK) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5889,40 +5990,45 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.GasMultiply)))) + if len(x.E) > 0 { + i -= len(x.E) + copy(dAtA[i:], x.E) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.E))) i-- - dAtA[i] = 0x29 + dAtA[i] = 0x32 } - if x.IsSimulable { + if len(x.N) > 0 { + i -= len(x.N) + copy(dAtA[i:], x.N) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.N))) i-- - if x.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x2a + } + if len(x.Y) > 0 { + i -= len(x.Y) + copy(dAtA[i:], x.Y) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Y))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } - if x.InitGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.InitGasLimit)) + if len(x.X) > 0 { + i -= len(x.X) + copy(dAtA[i:], x.X) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.X))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if len(x.FeeRates) > 0 { - for iNdEx := len(x.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.FeeRates[iNdEx]) - copy(dAtA[i:], x.FeeRates[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRates[iNdEx]))) - i-- - dAtA[i] = 0x12 - } + if len(x.Crv) > 0 { + i -= len(x.Crv) + copy(dAtA[i:], x.Crv) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Crv))) + i-- + dAtA[i] = 0x12 } - if len(x.BaseDenom) > 0 { - i -= len(x.BaseDenom) - copy(dAtA[i:], x.BaseDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + if len(x.Kty) > 0 { + i -= len(x.Kty) + copy(dAtA[i:], x.Kty) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kty))) i-- dAtA[i] = 0xa } @@ -5937,7 +6043,7 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_FeeInfo) + x := input.Message.Interface().(*PubKey_JWK) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5969,15 +6075,15 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_FeeInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kty", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6005,11 +6111,11 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.BaseDenom = string(dAtA[iNdEx:postIndex]) + x.Kty = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Crv", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6037,13 +6143,13 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.FeeRates = append(x.FeeRates, string(dAtA[iNdEx:postIndex])) + x.Crv = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType) } - x.InitGasLimit = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6053,42 +6159,120 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - x.InitGasLimit |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - 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 - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - x.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { + if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.GasMultiply = float64(math.Float64frombits(v)) + x.X = 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 Y", 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.Y = 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 N", 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.N = 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 E", 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.E = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6124,29 +6308,203 @@ func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Method } } +var _ protoreflect.Map = (*_Service_6_map)(nil) + +type _Service_6_map struct { + m *map[string]string +} + +func (x *_Service_6_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Service_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Service_6_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Service_6_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Service_6_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Service_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Service_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_6_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Service_6_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.Map = (*_Service_7_map)(nil) + +type _Service_7_map struct { + m *map[string]string +} + +func (x *_Service_7_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Service_7_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Service_7_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Service_7_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Service_7_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Service_7_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Service_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 *_Service_7_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Service_7_map) IsValid() bool { + return x.m != nil +} + var ( - md_ValidatorInfo_IBCChannel protoreflect.MessageDescriptor - fd_ValidatorInfo_IBCChannel_id protoreflect.FieldDescriptor - fd_ValidatorInfo_IBCChannel_port protoreflect.FieldDescriptor + md_Service protoreflect.MessageDescriptor + fd_Service_id protoreflect.FieldDescriptor + fd_Service_service_type protoreflect.FieldDescriptor + fd_Service_authority protoreflect.FieldDescriptor + fd_Service_origin protoreflect.FieldDescriptor + fd_Service_description protoreflect.FieldDescriptor + fd_Service_service_endpoints protoreflect.FieldDescriptor + fd_Service_permissions protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - 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") + md_Service = File_did_v1_genesis_proto.Messages().ByName("Service") + fd_Service_id = md_Service.Fields().ByName("id") + fd_Service_service_type = md_Service.Fields().ByName("service_type") + fd_Service_authority = md_Service.Fields().ByName("authority") + fd_Service_origin = md_Service.Fields().ByName("origin") + fd_Service_description = md_Service.Fields().ByName("description") + fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") + fd_Service_permissions = md_Service.Fields().ByName("permissions") } -var _ protoreflect.Message = (*fastReflection_ValidatorInfo_IBCChannel)(nil) +var _ protoreflect.Message = (*fastReflection_Service)(nil) -type fastReflection_ValidatorInfo_IBCChannel ValidatorInfo_IBCChannel +type fastReflection_Service Service -func (x *ValidatorInfo_IBCChannel) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorInfo_IBCChannel)(x) +func (x *Service) ProtoReflect() protoreflect.Message { + return (*fastReflection_Service)(x) } -func (x *ValidatorInfo_IBCChannel) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[10] +func (x *Service) 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 { @@ -6157,43 +6515,43 @@ func (x *ValidatorInfo_IBCChannel) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ValidatorInfo_IBCChannel_messageType fastReflection_ValidatorInfo_IBCChannel_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorInfo_IBCChannel_messageType{} +var _fastReflection_Service_messageType fastReflection_Service_messageType +var _ protoreflect.MessageType = fastReflection_Service_messageType{} -type fastReflection_ValidatorInfo_IBCChannel_messageType struct{} +type fastReflection_Service_messageType struct{} -func (x fastReflection_ValidatorInfo_IBCChannel_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorInfo_IBCChannel)(nil) +func (x fastReflection_Service_messageType) Zero() protoreflect.Message { + return (*fastReflection_Service)(nil) } -func (x fastReflection_ValidatorInfo_IBCChannel_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo_IBCChannel) +func (x fastReflection_Service_messageType) New() protoreflect.Message { + return new(fastReflection_Service) } -func (x fastReflection_ValidatorInfo_IBCChannel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo_IBCChannel +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_ValidatorInfo_IBCChannel) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorInfo_IBCChannel +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_ValidatorInfo_IBCChannel) Type() protoreflect.MessageType { - return _fastReflection_ValidatorInfo_IBCChannel_messageType +func (x *fastReflection_Service) Type() protoreflect.MessageType { + return _fastReflection_Service_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorInfo_IBCChannel) New() protoreflect.Message { - return new(fastReflection_ValidatorInfo_IBCChannel) +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_ValidatorInfo_IBCChannel) Interface() protoreflect.ProtoMessage { - return (*ValidatorInfo_IBCChannel)(x) +func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage { + return (*Service)(x) } // Range iterates over every populated field in an undefined order, @@ -6201,16 +6559,46 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ValidatorInfo_IBCChannel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_ValidatorInfo_IBCChannel_id, value) { + if !f(fd_Service_id, value) { return } } - if x.Port != "" { - value := protoreflect.ValueOfString(x.Port) - if !f(fd_ValidatorInfo_IBCChannel_port, value) { + if x.ServiceType != "" { + value := protoreflect.ValueOfString(x.ServiceType) + if !f(fd_Service_service_type, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Service_authority, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Service_origin, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_Service_description, value) { + return + } + } + if len(x.ServiceEndpoints) != 0 { + value := protoreflect.ValueOfMap(&_Service_6_map{m: &x.ServiceEndpoints}) + if !f(fd_Service_service_endpoints, value) { + return + } + } + if len(x.Permissions) != 0 { + value := protoreflect.ValueOfMap(&_Service_7_map{m: &x.Permissions}) + if !f(fd_Service_permissions, value) { return } } @@ -6227,17 +6615,27 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Range(f func(protoreflect.Fiel // 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_IBCChannel) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.ValidatorInfo.IBCChannel.id": + case "did.v1.Service.id": return x.Id != "" - case "did.v1.ValidatorInfo.IBCChannel.port": - return x.Port != "" + case "did.v1.Service.service_type": + return x.ServiceType != "" + case "did.v1.Service.authority": + return x.Authority != "" + case "did.v1.Service.origin": + return x.Origin != "" + case "did.v1.Service.description": + return x.Description != "" + case "did.v1.Service.service_endpoints": + return len(x.ServiceEndpoints) != 0 + case "did.v1.Service.permissions": + return len(x.Permissions) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) } } @@ -6247,17 +6645,27 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_IBCChannel) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.ValidatorInfo.IBCChannel.id": + case "did.v1.Service.id": x.Id = "" - case "did.v1.ValidatorInfo.IBCChannel.port": - x.Port = "" + case "did.v1.Service.service_type": + x.ServiceType = "" + case "did.v1.Service.authority": + x.Authority = "" + case "did.v1.Service.origin": + x.Origin = "" + case "did.v1.Service.description": + x.Description = "" + case "did.v1.Service.service_endpoints": + x.ServiceEndpoints = nil + case "did.v1.Service.permissions": + x.Permissions = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) } } @@ -6267,19 +6675,40 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Clear(fd protoreflect.FieldDes // 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_IBCChannel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ValidatorInfo.IBCChannel.id": + case "did.v1.Service.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.ValidatorInfo.IBCChannel.port": - value := x.Port + case "did.v1.Service.service_type": + value := x.ServiceType return protoreflect.ValueOfString(value) + case "did.v1.Service.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.Service.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.Service.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.Service.service_endpoints": + if len(x.ServiceEndpoints) == 0 { + return protoreflect.ValueOfMap(&_Service_6_map{}) + } + mapValue := &_Service_6_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Service.permissions": + if len(x.Permissions) == 0 { + return protoreflect.ValueOfMap(&_Service_7_map{}) + } + mapValue := &_Service_7_map{m: &x.Permissions} + return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Service does not contain field %s", descriptor.FullName())) } } @@ -6293,17 +6722,31 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_IBCChannel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.ValidatorInfo.IBCChannel.id": + case "did.v1.Service.id": x.Id = value.Interface().(string) - case "did.v1.ValidatorInfo.IBCChannel.port": - x.Port = value.Interface().(string) + case "did.v1.Service.service_type": + x.ServiceType = value.Interface().(string) + case "did.v1.Service.authority": + x.Authority = value.Interface().(string) + case "did.v1.Service.origin": + x.Origin = value.Interface().(string) + case "did.v1.Service.description": + x.Description = value.Interface().(string) + case "did.v1.Service.service_endpoints": + mv := value.Map() + cmv := mv.(*_Service_6_map) + x.ServiceEndpoints = *cmv.m + case "did.v1.Service.permissions": + mv := value.Map() + cmv := mv.(*_Service_7_map) + x.Permissions = *cmv.m default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) } } @@ -6317,44 +6760,74 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) Set(fd protoreflect.FieldDescr // 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_IBCChannel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - 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")) + case "did.v1.Service.service_endpoints": + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + value := &_Service_6_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(value) + case "did.v1.Service.permissions": + if x.Permissions == nil { + x.Permissions = make(map[string]string) + } + value := &_Service_7_map{m: &x.Permissions} + return protoreflect.ValueOfMap(value) + case "did.v1.Service.id": + panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) + case "did.v1.Service.service_type": + panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) + case "did.v1.Service.authority": + panic(fmt.Errorf("field authority 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")) + case "did.v1.Service.description": + panic(fmt.Errorf("field description of message did.v1.Service is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) + 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_ValidatorInfo_IBCChannel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ValidatorInfo.IBCChannel.id": + case "did.v1.Service.id": return protoreflect.ValueOfString("") - case "did.v1.ValidatorInfo.IBCChannel.port": + case "did.v1.Service.service_type": return protoreflect.ValueOfString("") + case "did.v1.Service.authority": + return protoreflect.ValueOfString("") + case "did.v1.Service.origin": + return protoreflect.ValueOfString("") + case "did.v1.Service.description": + return protoreflect.ValueOfString("") + case "did.v1.Service.service_endpoints": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Service_6_map{m: &m}) + case "did.v1.Service.permissions": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Service_7_map{m: &m}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) } - panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) + 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_ValidatorInfo_IBCChannel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.ValidatorInfo.IBCChannel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Service", d.FullName())) } panic("unreachable") } @@ -6362,7 +6835,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) WhichOneof(d protoreflect.Oneo // 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_IBCChannel) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Service) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6373,7 +6846,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorInfo_IBCChannel) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Service) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6385,7 +6858,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) 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_ValidatorInfo_IBCChannel) IsValid() bool { +func (x *fastReflection_Service) IsValid() bool { return x != nil } @@ -6395,9 +6868,9 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) 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_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorInfo_IBCChannel) + x := input.Message.Interface().(*Service) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6413,10 +6886,64 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Port) + l = len(x.ServiceType) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Authority) + 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.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)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ServiceEndpoints[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ServiceEndpoints { + SiZeMaP(k, v) + } + } + } + if len(x.Permissions) > 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.Permissions)) + for k := range x.Permissions { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Permissions[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Permissions { + SiZeMaP(k, v) + } + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6427,7 +6954,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_IBCChannel) + x := input.Message.Interface().(*Service) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6446,10 +6973,117 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Port) > 0 { - i -= len(x.Port) - copy(dAtA[i:], x.Port) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Port))) + if len(x.Permissions) > 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] = 0x3a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForPermissions := make([]string, 0, len(x.Permissions)) + for k := range x.Permissions { + keysForPermissions = append(keysForPermissions, string(k)) + } + sort.Slice(keysForPermissions, func(i, j int) bool { + return keysForPermissions[i] < keysForPermissions[j] + }) + for iNdEx := len(keysForPermissions) - 1; iNdEx >= 0; iNdEx-- { + v := x.Permissions[string(keysForPermissions[iNdEx])] + out, err := MaRsHaLmAp(keysForPermissions[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Permissions { + v := x.Permissions[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + 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] = 0x32 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) + } + sort.Slice(keysForServiceEndpoints, func(i, j int) bool { + return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] + }) + for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { + v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] + out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ServiceEndpoints { + v := x.ServiceEndpoints[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.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.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.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x1a + } + if len(x.ServiceType) > 0 { + i -= len(x.ServiceType) + copy(dAtA[i:], x.ServiceType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceType))) i-- dAtA[i] = 0x12 } @@ -6471,7 +7105,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorInfo_IBCChannel) + x := input.Message.Interface().(*Service) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6503,10 +7137,10 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_IBCChannel: wiretype end group for non-group") + 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: ValidatorInfo_IBCChannel: illegal tag %d (wire type %d)", fieldNum, wire) + 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: @@ -6543,7 +7177,7 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6571,7 +7205,357 @@ func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Met if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Port = string(dAtA[iNdEx:postIndex]) + x.ServiceType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 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 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) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 7: + 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 = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Permissions[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -6621,584 +7605,6 @@ const ( _ = 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_genesis_proto_enumTypes[0].Descriptor() -} - -func (AssetType) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_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_genesis_proto_enumTypes[1].Descriptor() -} - -func (DIDNamespace) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_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_ECDSA KeyAlgorithm = 6 // Fixed typo from EDCSA to ECDSA -) - -// 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_ECDSA", - } - 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_ECDSA": 6, - } -) - -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_genesis_proto_enumTypes[2].Descriptor() -} - -func (KeyAlgorithm) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_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 // NIST P-256 - 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 - KeyCurve_KEY_CURVE_BLS12381 KeyCurve = 9 - KeyCurve_KEY_CURVE_KECCAK256 KeyCurve = 10 -) - -// 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", - 9: "KEY_CURVE_BLS12381", - 10: "KEY_CURVE_KECCAK256", - } - 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, - "KEY_CURVE_BLS12381": 9, - "KEY_CURVE_KECCAK256": 10, - } -) - -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_genesis_proto_enumTypes[3].Descriptor() -} - -func (KeyCurve) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_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 -) - -// 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", - } - KeyEncoding_value = map[string]int32{ - "KEY_ENCODING_UNSPECIFIED": 0, - "KEY_ENCODING_RAW": 1, - "KEY_ENCODING_HEX": 2, - "KEY_ENCODING_MULTIBASE": 3, - } -) - -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_genesis_proto_enumTypes[4].Descriptor() -} - -func (KeyEncoding) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_proto_rawDescGZIP(), []int{4} -} - -// KeyRole defines the kind of key -type KeyRole int32 - -const ( - KeyRole_KEY_ROLE_UNSPECIFIED KeyRole = 0 - 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_genesis_proto_enumTypes[5].Descriptor() -} - -func (KeyRole) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_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 - KeyType_KEY_TYPE_MPC KeyType = 6 - KeyType_KEY_TYPE_ZK KeyType = 7 - KeyType_KEY_TYPE_WEBAUTHN KeyType = 8 - KeyType_KEY_TYPE_BIP32 KeyType = 9 -) - -// 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", - 6: "KEY_TYPE_MPC", - 7: "KEY_TYPE_ZK", - 8: "KEY_TYPE_WEBAUTHN", - 9: "KEY_TYPE_BIP32", - } - 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, - "KEY_TYPE_MPC": 6, - "KEY_TYPE_ZK": 7, - "KEY_TYPE_WEBAUTHN": 8, - "KEY_TYPE_BIP32": 9, - } -) - -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[6].Descriptor() -} - -func (KeyType) Type() protoreflect.EnumType { - return &file_did_v1_genesis_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_genesis_proto_rawDescGZIP(), []int{6} -} - -type KeyshareRole int32 - -const ( - KeyshareRole_KEYSHARE_ROLE_UNSPECIFIED KeyshareRole = 0 - KeyshareRole_KEYSHARE_ROLE_USER KeyshareRole = 1 - KeyshareRole_KEYSHARE_ROLE_VALIDATOR KeyshareRole = 2 -) - -// Enum value maps for KeyshareRole. -var ( - KeyshareRole_name = map[int32]string{ - 0: "KEYSHARE_ROLE_UNSPECIFIED", - 1: "KEYSHARE_ROLE_USER", - 2: "KEYSHARE_ROLE_VALIDATOR", - } - KeyshareRole_value = map[string]int32{ - "KEYSHARE_ROLE_UNSPECIFIED": 0, - "KEYSHARE_ROLE_USER": 1, - "KEYSHARE_ROLE_VALIDATOR": 2, - } -) - -func (x KeyshareRole) Enum() *KeyshareRole { - p := new(KeyshareRole) - *p = x - return p -} - -func (x KeyshareRole) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (KeyshareRole) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_genesis_proto_enumTypes[7].Descriptor() -} - -func (KeyshareRole) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[7] -} - -func (x KeyshareRole) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use KeyshareRole.Descriptor instead. -func (KeyshareRole) EnumDescriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{7} -} - -// 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_PERMISSIONS_READ PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_PERMISSIONS_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_PERMISSIONS_READ", - 3: "PERMISSION_SCOPE_PERMISSIONS_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_PERMISSIONS_READ": 2, - "PERMISSION_SCOPE_PERMISSIONS_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[8].Descriptor() -} - -func (PermissionScope) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[8] -} - -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{8} -} - // GenesisState defines the module genesis state type GenesisState struct { state protoimpl.MessageState @@ -7400,7 +7806,7 @@ type AssetInfo struct { // 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"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` // The name of the asset Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // The icon url @@ -7448,11 +7854,11 @@ func (x *AssetInfo) GetSymbol() string { return "" } -func (x *AssetInfo) GetAssetType() AssetType { +func (x *AssetInfo) GetAssetType() string { if x != nil { return x.AssetType } - return AssetType_ASSET_TYPE_UNSPECIFIED + return "" } func (x *AssetInfo) GetName() string { @@ -7469,23 +7875,107 @@ func (x *AssetInfo) GetIconUrl() string { return "" } +// Document defines a DID document +type Document 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"` // The DID of the controller + Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,7,rep,name=service,proto3" json:"service,omitempty"` +} + +func (x *Document) Reset() { + *x = Document{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} +} + +func (x *Document) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Document) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Document) GetAuthentication() []string { + if x != nil { + return x.Authentication + } + return nil +} + +func (x *Document) GetAssertionMethod() []string { + if x != nil { + return x.AssertionMethod + } + return nil +} + +func (x *Document) GetCapabilityDelegation() []string { + if x != nil { + return x.CapabilityDelegation + } + return nil +} + +func (x *Document) GetCapabilityInvocation() []string { + if x != nil { + return x.CapabilityInvocation + } + return nil +} + +func (x *Document) GetService() []string { + if x != nil { + return x.Service + } + return nil +} + // KeyInfo defines information for accepted PubKey types type KeyInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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" + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1" + Type_ string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" } func (x *KeyInfo) Reset() { *x = KeyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[4] + mi := &file_did_v1_genesis_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7499,132 +7989,145 @@ func (*KeyInfo) ProtoMessage() {} // Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead. func (*KeyInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5} } -func (x *KeyInfo) GetRole() KeyRole { +func (x *KeyInfo) GetRole() string { if x != nil { return x.Role } - return KeyRole_KEY_ROLE_UNSPECIFIED + return "" } -func (x *KeyInfo) GetAlgorithm() KeyAlgorithm { +func (x *KeyInfo) GetAlgorithm() string { if x != nil { return x.Algorithm } - return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED + return "" } -func (x *KeyInfo) GetEncoding() KeyEncoding { +func (x *KeyInfo) GetEncoding() string { if x != nil { return x.Encoding } - return KeyEncoding_KEY_ENCODING_UNSPECIFIED + return "" } -func (x *KeyInfo) GetCurve() KeyCurve { +func (x *KeyInfo) GetCurve() string { if x != nil { return x.Curve } - return KeyCurve_KEY_CURVE_UNSPECIFIED + return "" } -func (x *KeyInfo) GetType_() KeyType { +func (x *KeyInfo) GetType_() string { if x != nil { return x.Type_ } - return KeyType_KEY_TYPE_UNSPECIFIED + return "" } -// ValidatorInfo defines information for accepted Validator nodes -type ValidatorInfo struct { +// PubKey defines a public key for a did +type PubKey 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"` + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` + KeyType string `protobuf:"bytes,5,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` + Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` } -func (x *ValidatorInfo) Reset() { - *x = ValidatorInfo{} +func (x *PubKey) Reset() { + *x = PubKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[5] + mi := &file_did_v1_genesis_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ValidatorInfo) String() string { +func (x *PubKey) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidatorInfo) ProtoMessage() {} +func (*PubKey) ProtoMessage() {} -// Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead. -func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{5} +// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. +func (*PubKey) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6} } -func (x *ValidatorInfo) GetMoniker() string { +func (x *PubKey) GetRole() string { if x != nil { - return x.Moniker + return x.Role } return "" } -func (x *ValidatorInfo) GetGrpcEndpoints() []*ValidatorInfo_Endpoint { +func (x *PubKey) GetAlgorithm() string { if x != nil { - return x.GrpcEndpoints + return x.Algorithm + } + return "" +} + +func (x *PubKey) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *PubKey) GetCurve() string { + if x != nil { + return x.Curve + } + return "" +} + +func (x *PubKey) GetKeyType() string { + if x != nil { + return x.KeyType + } + return "" +} + +func (x *PubKey) GetRaw() []byte { + if x != nil { + return x.Raw } return nil } -func (x *ValidatorInfo) GetRestEndpoints() []*ValidatorInfo_Endpoint { +func (x *PubKey) GetJwk() *PubKey_JWK { if x != nil { - return x.RestEndpoints + return x.Jwk } 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 ValidatorInfo_Endpoint struct { +// Service defines a Decentralized Service on the Sonr Blockchain +type Service struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + 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"` + Permissions map[string]string `protobuf:"bytes,7,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *ValidatorInfo_Endpoint) Reset() { - *x = ValidatorInfo_Endpoint{} +func (x *Service) Reset() { + *x = Service{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_genesis_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7632,90 +8135,82 @@ func (x *ValidatorInfo_Endpoint) Reset() { } } -func (x *ValidatorInfo_Endpoint) String() string { +func (x *Service) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidatorInfo_Endpoint) ProtoMessage() {} +func (*Service) ProtoMessage() {} -// Deprecated: Use ValidatorInfo_Endpoint.ProtoReflect.Descriptor instead. -func (*ValidatorInfo_Endpoint) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 0} +// Deprecated: Use Service.ProtoReflect.Descriptor instead. +func (*Service) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{7} } -func (x *ValidatorInfo_Endpoint) GetUrl() string { +func (x *Service) GetId() string { if x != nil { - return x.Url + return x.Id } return "" } -func (x *ValidatorInfo_Endpoint) GetIsPrimary() bool { +func (x *Service) GetServiceType() string { if x != nil { - return x.IsPrimary + return x.ServiceType } - return false + return "" } -// ExplorerInfo defines the explorer info -type ValidatorInfo_ExplorerInfo struct { +func (x *Service) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *Service) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Service) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Service) GetServiceEndpoints() map[string]string { + if x != nil { + return x.ServiceEndpoints + } + return nil +} + +func (x *Service) GetPermissions() map[string]string { + if x != nil { + return x.Permissions + } + return nil +} + +// JWK represents a JSON Web Key +type PubKey_JWK struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type + Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys) + X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys) + Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys) + N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys) + E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys) } -func (x *ValidatorInfo_ExplorerInfo) Reset() { - *x = ValidatorInfo_ExplorerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorInfo_ExplorerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorInfo_ExplorerInfo) ProtoMessage() {} - -// Deprecated: Use ValidatorInfo_ExplorerInfo.ProtoReflect.Descriptor instead. -func (*ValidatorInfo_ExplorerInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 1} -} - -func (x *ValidatorInfo_ExplorerInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ValidatorInfo_ExplorerInfo) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// FeeInfo defines a fee info -type ValidatorInfo_FeeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (x *ValidatorInfo_FeeInfo) Reset() { - *x = ValidatorInfo_FeeInfo{} +func (x *PubKey_JWK) Reset() { + *x = PubKey_JWK{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_genesis_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7723,92 +8218,55 @@ func (x *ValidatorInfo_FeeInfo) Reset() { } } -func (x *ValidatorInfo_FeeInfo) String() string { +func (x *PubKey_JWK) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidatorInfo_FeeInfo) ProtoMessage() {} +func (*PubKey_JWK) ProtoMessage() {} -// Deprecated: Use ValidatorInfo_FeeInfo.ProtoReflect.Descriptor instead. -func (*ValidatorInfo_FeeInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{5, 2} +// Deprecated: Use PubKey_JWK.ProtoReflect.Descriptor instead. +func (*PubKey_JWK) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 0} } -func (x *ValidatorInfo_FeeInfo) GetBaseDenom() string { +func (x *PubKey_JWK) GetKty() string { if x != nil { - return x.BaseDenom + return x.Kty } return "" } -func (x *ValidatorInfo_FeeInfo) GetFeeRates() []string { +func (x *PubKey_JWK) GetCrv() string { if x != nil { - return x.FeeRates - } - return nil -} - -func (x *ValidatorInfo_FeeInfo) GetInitGasLimit() int32 { - if x != nil { - return x.InitGasLimit - } - return 0 -} - -func (x *ValidatorInfo_FeeInfo) GetIsSimulable() bool { - if x != nil { - return x.IsSimulable - } - return false -} - -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{5, 3} -} - -func (x *ValidatorInfo_IBCChannel) GetId() string { - if x != nil { - return x.Id + return x.Crv } return "" } -func (x *ValidatorInfo_IBCChannel) GetPort() string { +func (x *PubKey_JWK) GetX() string { if x != nil { - return x.Port + return x.X + } + return "" +} + +func (x *PubKey_JWK) GetY() string { + if x != nil { + return x.Y + } + return "" +} + +func (x *PubKey_JWK) GetN() string { + if x != nil { + return x.N + } + return "" +} + +func (x *PubKey_JWK) GetE() string { + if x != nil { + return x.E } return "" } @@ -7866,212 +8324,96 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 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, 0xac, 0x01, 0x0a, 0x09, 0x41, + 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x99, 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, 0x19, - 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 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, 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, 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, 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, 0xc4, 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, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, - 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x10, 0x06, 0x2a, 0x81, - 0x02, 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, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x42, - 0x4c, 0x53, 0x31, 0x32, 0x33, 0x38, 0x31, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, - 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, 0x4b, 0x32, 0x35, 0x36, - 0x10, 0x0a, 0x2a, 0x73, 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, 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, 0xd9, 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, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x50, 0x43, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x5a, 0x4b, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, - 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x49, 0x50, 0x33, 0x32, 0x10, 0x09, - 0x2a, 0x62, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x45, 0x59, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x52, 0x4f, 0x4c, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x53, 0x48, 0x41, 0x52, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, - 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x45, 0x59, 0x53, 0x48, - 0x41, 0x52, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, - 0x4f, 0x52, 0x10, 0x02, 0x2a, 0xa7, 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, 0x25, 0x0a, 0x21, 0x50, - 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, - 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, - 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, - 0x4e, 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, - 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, + 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, + 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, + 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x91, 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, 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, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, + 0x04, 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, + 0x05, 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, 0x06, 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, 0x07, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x07, 0x4b, + 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 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, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa2, + 0x02, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 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, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x24, 0x0a, 0x03, 0x6a, 0x77, + 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x57, 0x4b, 0x52, 0x03, 0x6a, 0x77, 0x6b, + 0x1a, 0x61, 0x0a, 0x03, 0x4a, 0x57, 0x4b, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x72, 0x76, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x01, 0x65, 0x22, 0xb1, 0x03, 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, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 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, 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, 0x52, 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, 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, 0x42, + 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x1a, 0x3e, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 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 ( @@ -8086,52 +8428,35 @@ 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, 9) -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_did_v1_genesis_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 - (KeyshareRole)(0), // 7: did.v1.KeyshareRole - (PermissionScope)(0), // 8: did.v1.PermissionScope - (*GenesisState)(nil), // 9: did.v1.GenesisState - (*GlobalIntegrity)(nil), // 10: did.v1.GlobalIntegrity - (*Params)(nil), // 11: did.v1.Params - (*AssetInfo)(nil), // 12: did.v1.AssetInfo - (*KeyInfo)(nil), // 13: did.v1.KeyInfo - (*ValidatorInfo)(nil), // 14: did.v1.ValidatorInfo - nil, // 15: did.v1.Params.AllowedPublicKeysEntry - (*ValidatorInfo_Endpoint)(nil), // 16: did.v1.ValidatorInfo.Endpoint - (*ValidatorInfo_ExplorerInfo)(nil), // 17: did.v1.ValidatorInfo.ExplorerInfo - (*ValidatorInfo_FeeInfo)(nil), // 18: did.v1.ValidatorInfo.FeeInfo - (*ValidatorInfo_IBCChannel)(nil), // 19: did.v1.ValidatorInfo.IBCChannel + (*GenesisState)(nil), // 0: did.v1.GenesisState + (*GlobalIntegrity)(nil), // 1: did.v1.GlobalIntegrity + (*Params)(nil), // 2: did.v1.Params + (*AssetInfo)(nil), // 3: did.v1.AssetInfo + (*Document)(nil), // 4: did.v1.Document + (*KeyInfo)(nil), // 5: did.v1.KeyInfo + (*PubKey)(nil), // 6: did.v1.PubKey + (*Service)(nil), // 7: did.v1.Service + nil, // 8: did.v1.Params.AllowedPublicKeysEntry + (*PubKey_JWK)(nil), // 9: did.v1.PubKey.JWK + nil, // 10: did.v1.Service.ServiceEndpointsEntry + nil, // 11: did.v1.Service.PermissionsEntry } var file_did_v1_genesis_proto_depIdxs = []int32{ - 11, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 10, // 1: did.v1.GenesisState.global_integrity:type_name -> did.v1.GlobalIntegrity - 12, // 2: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo - 15, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.Params.AllowedPublicKeysEntry - 0, // 4: did.v1.AssetInfo.asset_type:type_name -> did.v1.AssetType - 5, // 5: did.v1.KeyInfo.role:type_name -> did.v1.KeyRole - 2, // 6: did.v1.KeyInfo.algorithm:type_name -> did.v1.KeyAlgorithm - 4, // 7: did.v1.KeyInfo.encoding:type_name -> did.v1.KeyEncoding - 3, // 8: did.v1.KeyInfo.curve:type_name -> did.v1.KeyCurve - 6, // 9: did.v1.KeyInfo.type:type_name -> did.v1.KeyType - 16, // 10: did.v1.ValidatorInfo.grpc_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint - 16, // 11: did.v1.ValidatorInfo.rest_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint - 17, // 12: did.v1.ValidatorInfo.explorer:type_name -> did.v1.ValidatorInfo.ExplorerInfo - 18, // 13: did.v1.ValidatorInfo.fee_info:type_name -> did.v1.ValidatorInfo.FeeInfo - 19, // 14: did.v1.ValidatorInfo.ibc_channel:type_name -> did.v1.ValidatorInfo.IBCChannel - 13, // 15: did.v1.Params.AllowedPublicKeysEntry.value:type_name -> did.v1.KeyInfo - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 2, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params + 1, // 1: did.v1.GenesisState.global_integrity:type_name -> did.v1.GlobalIntegrity + 3, // 2: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 8, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.Params.AllowedPublicKeysEntry + 9, // 4: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JWK + 10, // 5: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry + 11, // 6: did.v1.Service.permissions:type_name -> did.v1.Service.PermissionsEntry + 5, // 7: did.v1.Params.AllowedPublicKeysEntry.value:type_name -> did.v1.KeyInfo + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -8139,7 +8464,6 @@ func file_did_v1_genesis_proto_init() { if File_did_v1_genesis_proto != nil { return } - file_did_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -8190,7 +8514,7 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyInfo); i { + switch v := v.(*Document); i { case 0: return &v.state case 1: @@ -8202,7 +8526,19 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorInfo); i { + switch v := v.(*KeyInfo); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubKey); i { case 0: return &v.state case 1: @@ -8214,19 +8550,7 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - 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 { + switch v := v.(*Service); i { case 0: return &v.state case 1: @@ -8238,19 +8562,7 @@ func file_did_v1_genesis_proto_init() { } } 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 { + switch v := v.(*PubKey_JWK); i { case 0: return &v.state case 1: @@ -8267,14 +8579,13 @@ func file_did_v1_genesis_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, - NumEnums: 9, - NumMessages: 11, + NumEnums: 0, + NumMessages: 12, 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 deleted file mode 100644 index 4cea413c9..000000000 --- a/api/did/v1/models.pulsar.go +++ /dev/null @@ -1,10267 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -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" - io "io" - reflect "reflect" - sort "sort" - sync "sync" -) - -var ( - md_Alias protoreflect.MessageDescriptor - fd_Alias_subject protoreflect.FieldDescriptor - fd_Alias_origin protoreflect.FieldDescriptor - fd_Alias_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Alias = File_did_v1_models_proto.Messages().ByName("Alias") - fd_Alias_subject = md_Alias.Fields().ByName("subject") - fd_Alias_origin = md_Alias.Fields().ByName("origin") - fd_Alias_controller = md_Alias.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_Alias)(nil) - -type fastReflection_Alias Alias - -func (x *Alias) ProtoReflect() protoreflect.Message { - return (*fastReflection_Alias)(x) -} - -func (x *Alias) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Alias_messageType fastReflection_Alias_messageType -var _ protoreflect.MessageType = fastReflection_Alias_messageType{} - -type fastReflection_Alias_messageType struct{} - -func (x fastReflection_Alias_messageType) Zero() protoreflect.Message { - return (*fastReflection_Alias)(nil) -} -func (x fastReflection_Alias_messageType) New() protoreflect.Message { - return new(fastReflection_Alias) -} -func (x fastReflection_Alias_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Alias -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Alias) Descriptor() protoreflect.MessageDescriptor { - return md_Alias -} - -// 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_Alias) Type() protoreflect.MessageType { - return _fastReflection_Alias_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Alias) New() protoreflect.Message { - return new(fastReflection_Alias) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Alias) Interface() protoreflect.ProtoMessage { - return (*Alias)(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_Alias) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Alias_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Alias_origin, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Alias_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Alias) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Alias.subject": - return x.Subject != "" - case "did.v1.Alias.origin": - return x.Origin != "" - case "did.v1.Alias.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Alias.subject": - x.Subject = "" - case "did.v1.Alias.origin": - x.Origin = "" - case "did.v1.Alias.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Alias.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Alias.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Alias.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Alias.subject": - x.Subject = value.Interface().(string) - case "did.v1.Alias.origin": - x.Origin = value.Interface().(string) - case "did.v1.Alias.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Alias.subject": - panic(fmt.Errorf("field subject of message did.v1.Alias is not mutable")) - case "did.v1.Alias.origin": - panic(fmt.Errorf("field origin of message did.v1.Alias is not mutable")) - case "did.v1.Alias.controller": - panic(fmt.Errorf("field controller of message did.v1.Alias is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Alias.subject": - return protoreflect.ValueOfString("") - case "did.v1.Alias.origin": - return protoreflect.ValueOfString("") - case "did.v1.Alias.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) - } - panic(fmt.Errorf("message did.v1.Alias 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_Alias) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Alias", 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_Alias) 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_Alias) 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_Alias) 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_Alias) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Alias) - 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.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)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Alias) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 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.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - 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().(*Alias) - 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: Alias: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: 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 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 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 Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Credential_6_list)(nil) - -type _Credential_6_list struct { - list *[]string -} - -func (x *_Credential_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Credential_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Credential_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Credential_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Credential_6_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind")) -} - -func (x *_Credential_6_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Credential_6_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Credential_6_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Credential protoreflect.MessageDescriptor - fd_Credential_subject protoreflect.FieldDescriptor - fd_Credential_attestation_type protoreflect.FieldDescriptor - fd_Credential_origin protoreflect.FieldDescriptor - fd_Credential_credential_id protoreflect.FieldDescriptor - fd_Credential_public_key protoreflect.FieldDescriptor - fd_Credential_transport protoreflect.FieldDescriptor - fd_Credential_sign_count protoreflect.FieldDescriptor - fd_Credential_user_present protoreflect.FieldDescriptor - fd_Credential_user_verified protoreflect.FieldDescriptor - fd_Credential_backup_eligible protoreflect.FieldDescriptor - fd_Credential_backup_state protoreflect.FieldDescriptor - fd_Credential_clone_warning protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Credential = File_did_v1_models_proto.Messages().ByName("Credential") - fd_Credential_subject = md_Credential.Fields().ByName("subject") - fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type") - fd_Credential_origin = md_Credential.Fields().ByName("origin") - fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") - fd_Credential_public_key = md_Credential.Fields().ByName("public_key") - fd_Credential_transport = md_Credential.Fields().ByName("transport") - fd_Credential_sign_count = md_Credential.Fields().ByName("sign_count") - fd_Credential_user_present = md_Credential.Fields().ByName("user_present") - fd_Credential_user_verified = md_Credential.Fields().ByName("user_verified") - fd_Credential_backup_eligible = md_Credential.Fields().ByName("backup_eligible") - fd_Credential_backup_state = md_Credential.Fields().ByName("backup_state") - fd_Credential_clone_warning = md_Credential.Fields().ByName("clone_warning") -} - -var _ protoreflect.Message = (*fastReflection_Credential)(nil) - -type fastReflection_Credential Credential - -func (x *Credential) ProtoReflect() protoreflect.Message { - return (*fastReflection_Credential)(x) -} - -func (x *Credential) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Credential_messageType fastReflection_Credential_messageType -var _ protoreflect.MessageType = fastReflection_Credential_messageType{} - -type fastReflection_Credential_messageType struct{} - -func (x fastReflection_Credential_messageType) Zero() protoreflect.Message { - return (*fastReflection_Credential)(nil) -} -func (x fastReflection_Credential_messageType) New() protoreflect.Message { - return new(fastReflection_Credential) -} -func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Credential -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor { - return md_Credential -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Credential) Type() protoreflect.MessageType { - return _fastReflection_Credential_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Credential) New() protoreflect.Message { - return new(fastReflection_Credential) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage { - return (*Credential)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Credential_subject, value) { - return - } - } - if x.AttestationType != "" { - value := protoreflect.ValueOfString(x.AttestationType) - if !f(fd_Credential_attestation_type, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Credential_origin, value) { - return - } - } - if len(x.CredentialId) != 0 { - value := protoreflect.ValueOfBytes(x.CredentialId) - if !f(fd_Credential_credential_id, value) { - return - } - } - if len(x.PublicKey) != 0 { - value := protoreflect.ValueOfBytes(x.PublicKey) - if !f(fd_Credential_public_key, value) { - return - } - } - if len(x.Transport) != 0 { - value := protoreflect.ValueOfList(&_Credential_6_list{list: &x.Transport}) - if !f(fd_Credential_transport, value) { - return - } - } - if x.SignCount != uint32(0) { - value := protoreflect.ValueOfUint32(x.SignCount) - if !f(fd_Credential_sign_count, value) { - return - } - } - if x.UserPresent != false { - value := protoreflect.ValueOfBool(x.UserPresent) - if !f(fd_Credential_user_present, value) { - return - } - } - if x.UserVerified != false { - value := protoreflect.ValueOfBool(x.UserVerified) - if !f(fd_Credential_user_verified, value) { - return - } - } - if x.BackupEligible != false { - value := protoreflect.ValueOfBool(x.BackupEligible) - if !f(fd_Credential_backup_eligible, value) { - return - } - } - if x.BackupState != false { - value := protoreflect.ValueOfBool(x.BackupState) - if !f(fd_Credential_backup_state, value) { - return - } - } - if x.CloneWarning != false { - value := protoreflect.ValueOfBool(x.CloneWarning) - if !f(fd_Credential_clone_warning, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Credential.subject": - return x.Subject != "" - case "did.v1.Credential.attestation_type": - return x.AttestationType != "" - case "did.v1.Credential.origin": - return x.Origin != "" - case "did.v1.Credential.credential_id": - return len(x.CredentialId) != 0 - case "did.v1.Credential.public_key": - return len(x.PublicKey) != 0 - case "did.v1.Credential.transport": - return len(x.Transport) != 0 - case "did.v1.Credential.sign_count": - return x.SignCount != uint32(0) - case "did.v1.Credential.user_present": - return x.UserPresent != false - case "did.v1.Credential.user_verified": - return x.UserVerified != false - case "did.v1.Credential.backup_eligible": - return x.BackupEligible != false - case "did.v1.Credential.backup_state": - return x.BackupState != false - case "did.v1.Credential.clone_warning": - return x.CloneWarning != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Credential.subject": - x.Subject = "" - case "did.v1.Credential.attestation_type": - x.AttestationType = "" - case "did.v1.Credential.origin": - x.Origin = "" - case "did.v1.Credential.credential_id": - x.CredentialId = nil - case "did.v1.Credential.public_key": - x.PublicKey = nil - case "did.v1.Credential.transport": - x.Transport = nil - case "did.v1.Credential.sign_count": - x.SignCount = uint32(0) - case "did.v1.Credential.user_present": - x.UserPresent = false - case "did.v1.Credential.user_verified": - x.UserVerified = false - case "did.v1.Credential.backup_eligible": - x.BackupEligible = false - case "did.v1.Credential.backup_state": - x.BackupState = false - case "did.v1.Credential.clone_warning": - x.CloneWarning = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Credential.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Credential.attestation_type": - value := x.AttestationType - return protoreflect.ValueOfString(value) - case "did.v1.Credential.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Credential.credential_id": - value := x.CredentialId - return protoreflect.ValueOfBytes(value) - case "did.v1.Credential.public_key": - value := x.PublicKey - return protoreflect.ValueOfBytes(value) - case "did.v1.Credential.transport": - if len(x.Transport) == 0 { - return protoreflect.ValueOfList(&_Credential_6_list{}) - } - listValue := &_Credential_6_list{list: &x.Transport} - return protoreflect.ValueOfList(listValue) - case "did.v1.Credential.sign_count": - value := x.SignCount - return protoreflect.ValueOfUint32(value) - case "did.v1.Credential.user_present": - value := x.UserPresent - return protoreflect.ValueOfBool(value) - case "did.v1.Credential.user_verified": - value := x.UserVerified - return protoreflect.ValueOfBool(value) - case "did.v1.Credential.backup_eligible": - value := x.BackupEligible - return protoreflect.ValueOfBool(value) - case "did.v1.Credential.backup_state": - value := x.BackupState - return protoreflect.ValueOfBool(value) - case "did.v1.Credential.clone_warning": - value := x.CloneWarning - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Credential.subject": - x.Subject = value.Interface().(string) - case "did.v1.Credential.attestation_type": - x.AttestationType = value.Interface().(string) - case "did.v1.Credential.origin": - x.Origin = value.Interface().(string) - case "did.v1.Credential.credential_id": - x.CredentialId = value.Bytes() - case "did.v1.Credential.public_key": - x.PublicKey = value.Bytes() - case "did.v1.Credential.transport": - lv := value.List() - clv := lv.(*_Credential_6_list) - x.Transport = *clv.list - case "did.v1.Credential.sign_count": - x.SignCount = uint32(value.Uint()) - case "did.v1.Credential.user_present": - x.UserPresent = value.Bool() - case "did.v1.Credential.user_verified": - x.UserVerified = value.Bool() - case "did.v1.Credential.backup_eligible": - x.BackupEligible = value.Bool() - case "did.v1.Credential.backup_state": - x.BackupState = value.Bool() - case "did.v1.Credential.clone_warning": - x.CloneWarning = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Credential.transport": - if x.Transport == nil { - x.Transport = []string{} - } - value := &_Credential_6_list{list: &x.Transport} - return protoreflect.ValueOfList(value) - case "did.v1.Credential.subject": - panic(fmt.Errorf("field subject of message did.v1.Credential is not mutable")) - case "did.v1.Credential.attestation_type": - panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable")) - case "did.v1.Credential.origin": - panic(fmt.Errorf("field origin of message did.v1.Credential is not mutable")) - case "did.v1.Credential.credential_id": - panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) - case "did.v1.Credential.public_key": - panic(fmt.Errorf("field public_key of message did.v1.Credential is not mutable")) - case "did.v1.Credential.sign_count": - panic(fmt.Errorf("field sign_count of message did.v1.Credential is not mutable")) - case "did.v1.Credential.user_present": - panic(fmt.Errorf("field user_present of message did.v1.Credential is not mutable")) - case "did.v1.Credential.user_verified": - panic(fmt.Errorf("field user_verified of message did.v1.Credential is not mutable")) - case "did.v1.Credential.backup_eligible": - panic(fmt.Errorf("field backup_eligible of message did.v1.Credential is not mutable")) - case "did.v1.Credential.backup_state": - panic(fmt.Errorf("field backup_state of message did.v1.Credential is not mutable")) - case "did.v1.Credential.clone_warning": - panic(fmt.Errorf("field clone_warning of message did.v1.Credential is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Credential.subject": - return protoreflect.ValueOfString("") - case "did.v1.Credential.attestation_type": - return protoreflect.ValueOfString("") - case "did.v1.Credential.origin": - return protoreflect.ValueOfString("") - case "did.v1.Credential.credential_id": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Credential.public_key": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Credential.transport": - list := []string{} - return protoreflect.ValueOfList(&_Credential_6_list{list: &list}) - case "did.v1.Credential.sign_count": - return protoreflect.ValueOfUint32(uint32(0)) - case "did.v1.Credential.user_present": - return protoreflect.ValueOfBool(false) - case "did.v1.Credential.user_verified": - return protoreflect.ValueOfBool(false) - case "did.v1.Credential.backup_eligible": - return protoreflect.ValueOfBool(false) - case "did.v1.Credential.backup_state": - return protoreflect.ValueOfBool(false) - case "did.v1.Credential.clone_warning": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Credential", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Credential) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AttestationType) - 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.CredentialId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PublicKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Transport) > 0 { - for _, s := range x.Transport { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.SignCount != 0 { - n += 1 + runtime.Sov(uint64(x.SignCount)) - } - if x.UserPresent { - n += 2 - } - if x.UserVerified { - n += 2 - } - if x.BackupEligible { - n += 2 - } - if x.BackupState { - n += 2 - } - if x.CloneWarning { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CloneWarning { - i-- - if x.CloneWarning { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if x.BackupState { - i-- - if x.BackupState { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if x.BackupEligible { - i-- - if x.BackupEligible { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if x.UserVerified { - i-- - if x.UserVerified { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if x.UserPresent { - i-- - if x.UserPresent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if x.SignCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SignCount)) - i-- - dAtA[i] = 0x38 - } - if len(x.Transport) > 0 { - for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Transport[iNdEx]) - copy(dAtA[i:], x.Transport[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Transport[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(x.PublicKey) > 0 { - i -= len(x.PublicKey) - copy(dAtA[i:], x.PublicKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) - i-- - dAtA[i] = 0x2a - } - if len(x.CredentialId) > 0 { - i -= len(x.CredentialId) - copy(dAtA[i:], x.CredentialId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) - i-- - dAtA[i] = 0x22 - } - if len(x.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.AttestationType) > 0 { - i -= len(x.AttestationType) - copy(dAtA[i:], x.AttestationType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) - i-- - dAtA[i] = 0x12 - } - 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] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 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 CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if x.CredentialId == nil { - x.CredentialId = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if x.PublicKey == nil { - x.PublicKey = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignCount", wireType) - } - x.SignCount = 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.SignCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserPresent", 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.UserPresent = bool(v != 0) - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserVerified", 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.UserVerified = bool(v != 0) - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupEligible", 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.BackupEligible = bool(v != 0) - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupState", 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.BackupState = bool(v != 0) - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CloneWarning", 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.CloneWarning = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Document_3_list)(nil) - -type _Document_3_list struct { - list *[]string -} - -func (x *_Document_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) -} - -func (x *_Document_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_4_list)(nil) - -type _Document_4_list struct { - list *[]string -} - -func (x *_Document_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) -} - -func (x *_Document_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_5_list)(nil) - -type _Document_5_list struct { - list *[]string -} - -func (x *_Document_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) -} - -func (x *_Document_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_6_list)(nil) - -type _Document_6_list struct { - list *[]string -} - -func (x *_Document_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_6_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) -} - -func (x *_Document_6_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_6_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_7_list)(nil) - -type _Document_7_list struct { - list *[]string -} - -func (x *_Document_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind")) -} - -func (x *_Document_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Document protoreflect.MessageDescriptor - fd_Document_id protoreflect.FieldDescriptor - fd_Document_controller protoreflect.FieldDescriptor - fd_Document_authentication protoreflect.FieldDescriptor - fd_Document_assertion_method protoreflect.FieldDescriptor - fd_Document_capability_delegation protoreflect.FieldDescriptor - fd_Document_capability_invocation protoreflect.FieldDescriptor - fd_Document_service protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Document = File_did_v1_models_proto.Messages().ByName("Document") - fd_Document_id = md_Document.Fields().ByName("id") - fd_Document_controller = md_Document.Fields().ByName("controller") - fd_Document_authentication = md_Document.Fields().ByName("authentication") - fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") - fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") - fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation") - fd_Document_service = md_Document.Fields().ByName("service") -} - -var _ protoreflect.Message = (*fastReflection_Document)(nil) - -type fastReflection_Document Document - -func (x *Document) ProtoReflect() protoreflect.Message { - return (*fastReflection_Document)(x) -} - -func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_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_Document_messageType fastReflection_Document_messageType -var _ protoreflect.MessageType = fastReflection_Document_messageType{} - -type fastReflection_Document_messageType struct{} - -func (x fastReflection_Document_messageType) Zero() protoreflect.Message { - return (*fastReflection_Document)(nil) -} -func (x fastReflection_Document_messageType) New() protoreflect.Message { - return new(fastReflection_Document) -} -func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Document) Type() protoreflect.MessageType { - return _fastReflection_Document_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Document) New() protoreflect.Message { - return new(fastReflection_Document) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { - return (*Document)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Document_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Document_controller, value) { - return - } - } - if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_Document_3_list{list: &x.Authentication}) - if !f(fd_Document_authentication, value) { - return - } - } - if len(x.AssertionMethod) != 0 { - value := protoreflect.ValueOfList(&_Document_4_list{list: &x.AssertionMethod}) - if !f(fd_Document_assertion_method, value) { - return - } - } - if len(x.CapabilityDelegation) != 0 { - value := protoreflect.ValueOfList(&_Document_5_list{list: &x.CapabilityDelegation}) - if !f(fd_Document_capability_delegation, value) { - return - } - } - if len(x.CapabilityInvocation) != 0 { - value := protoreflect.ValueOfList(&_Document_6_list{list: &x.CapabilityInvocation}) - if !f(fd_Document_capability_invocation, value) { - return - } - } - if len(x.Service) != 0 { - value := protoreflect.ValueOfList(&_Document_7_list{list: &x.Service}) - if !f(fd_Document_service, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Document.id": - return x.Id != "" - case "did.v1.Document.controller": - return x.Controller != "" - case "did.v1.Document.authentication": - return len(x.Authentication) != 0 - case "did.v1.Document.assertion_method": - return len(x.AssertionMethod) != 0 - case "did.v1.Document.capability_delegation": - return len(x.CapabilityDelegation) != 0 - case "did.v1.Document.capability_invocation": - return len(x.CapabilityInvocation) != 0 - 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")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Document.id": - x.Id = "" - case "did.v1.Document.controller": - x.Controller = "" - case "did.v1.Document.authentication": - x.Authentication = nil - case "did.v1.Document.assertion_method": - x.AssertionMethod = nil - case "did.v1.Document.capability_delegation": - x.CapabilityDelegation = nil - case "did.v1.Document.capability_invocation": - x.CapabilityInvocation = nil - 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")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Document.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Document.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Document.authentication": - if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_Document_3_list{}) - } - listValue := &_Document_3_list{list: &x.Authentication} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.assertion_method": - if len(x.AssertionMethod) == 0 { - return protoreflect.ValueOfList(&_Document_4_list{}) - } - listValue := &_Document_4_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.capability_delegation": - if len(x.CapabilityDelegation) == 0 { - return protoreflect.ValueOfList(&_Document_5_list{}) - } - listValue := &_Document_5_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.capability_invocation": - if len(x.CapabilityInvocation) == 0 { - return protoreflect.ValueOfList(&_Document_6_list{}) - } - listValue := &_Document_6_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.service": - if len(x.Service) == 0 { - return protoreflect.ValueOfList(&_Document_7_list{}) - } - listValue := &_Document_7_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")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Document.id": - x.Id = value.Interface().(string) - case "did.v1.Document.controller": - x.Controller = value.Interface().(string) - case "did.v1.Document.authentication": - lv := value.List() - clv := lv.(*_Document_3_list) - x.Authentication = *clv.list - case "did.v1.Document.assertion_method": - lv := value.List() - clv := lv.(*_Document_4_list) - x.AssertionMethod = *clv.list - case "did.v1.Document.capability_delegation": - lv := value.List() - clv := lv.(*_Document_5_list) - x.CapabilityDelegation = *clv.list - case "did.v1.Document.capability_invocation": - lv := value.List() - clv := lv.(*_Document_6_list) - x.CapabilityInvocation = *clv.list - case "did.v1.Document.service": - lv := value.List() - clv := lv.(*_Document_7_list) - x.Service = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Document.authentication": - if x.Authentication == nil { - x.Authentication = []string{} - } - value := &_Document_3_list{list: &x.Authentication} - return protoreflect.ValueOfList(value) - case "did.v1.Document.assertion_method": - if x.AssertionMethod == nil { - x.AssertionMethod = []string{} - } - value := &_Document_4_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(value) - case "did.v1.Document.capability_delegation": - if x.CapabilityDelegation == nil { - x.CapabilityDelegation = []string{} - } - value := &_Document_5_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(value) - case "did.v1.Document.capability_invocation": - if x.CapabilityInvocation == nil { - x.CapabilityInvocation = []string{} - } - value := &_Document_6_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(value) - case "did.v1.Document.service": - if x.Service == nil { - x.Service = []string{} - } - value := &_Document_7_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")) - case "did.v1.Document.controller": - panic(fmt.Errorf("field controller of message did.v1.Document is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Document.id": - return protoreflect.ValueOfString("") - case "did.v1.Document.controller": - return protoreflect.ValueOfString("") - case "did.v1.Document.authentication": - list := []string{} - return protoreflect.ValueOfList(&_Document_3_list{list: &list}) - case "did.v1.Document.assertion_method": - list := []string{} - return protoreflect.ValueOfList(&_Document_4_list{list: &list}) - case "did.v1.Document.capability_delegation": - list := []string{} - return protoreflect.ValueOfList(&_Document_5_list{list: &list}) - case "did.v1.Document.capability_invocation": - list := []string{} - return protoreflect.ValueOfList(&_Document_6_list{list: &list}) - case "did.v1.Document.service": - list := []string{} - return protoreflect.ValueOfList(&_Document_7_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Document) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Document) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - 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)) - } - if len(x.Authentication) > 0 { - for _, s := range x.Authentication { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.AssertionMethod) > 0 { - for _, s := range x.AssertionMethod { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.CapabilityDelegation) > 0 { - for _, s := range x.CapabilityDelegation { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.CapabilityInvocation) > 0 { - for _, s := range x.CapabilityInvocation { - l = len(s) - 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) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Document) - 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.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] = 0x3a - } - } - if len(x.CapabilityInvocation) > 0 { - for iNdEx := len(x.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], x.CapabilityInvocation[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(x.CapabilityDelegation) > 0 { - for iNdEx := len(x.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], x.CapabilityDelegation[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.AssertionMethod) > 0 { - for iNdEx := len(x.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AssertionMethod[iNdEx]) - copy(dAtA[i:], x.AssertionMethod[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Authentication) > 0 { - for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Authentication[iNdEx]) - copy(dAtA[i:], x.Authentication[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx]))) - 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().(*Document) - 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: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 Authentication", 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.Authentication = append(x.Authentication, 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 AssertionMethod", 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.AssertionMethod = append(x.AssertionMethod, 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 CapabilityDelegation", 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.CapabilityDelegation = append(x.CapabilityDelegation, 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 CapabilityInvocation", 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.CapabilityInvocation = append(x.CapabilityInvocation, 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 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:]) - 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 = (*_Keyshare_1_map)(nil) - -type _Keyshare_1_map struct { - m *map[string]string -} - -func (x *_Keyshare_1_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Keyshare_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Keyshare_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 *_Keyshare_1_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Keyshare_1_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_Keyshare_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Keyshare_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 *_Keyshare_1_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Keyshare_1_map) IsValid() bool { - return x.m != nil -} - -var _ protoreflect.Map = (*_Keyshare_2_map)(nil) - -type _Keyshare_2_map struct { - m *map[string][]byte -} - -func (x *_Keyshare_2_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Keyshare_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfBytes(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Keyshare_2_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Keyshare_2_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Keyshare_2_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfBytes(v) -} - -func (x *_Keyshare_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Keyshare_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_Keyshare_2_map) NewValue() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_Keyshare_2_map) IsValid() bool { - return x.m != nil -} - -var ( - md_Keyshare protoreflect.MessageDescriptor - fd_Keyshare_metadata protoreflect.FieldDescriptor - fd_Keyshare_payloads protoreflect.FieldDescriptor - fd_Keyshare_protocol protoreflect.FieldDescriptor - fd_Keyshare_public_key protoreflect.FieldDescriptor - fd_Keyshare_version protoreflect.FieldDescriptor - fd_Keyshare_role protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Keyshare = File_did_v1_models_proto.Messages().ByName("Keyshare") - fd_Keyshare_metadata = md_Keyshare.Fields().ByName("metadata") - fd_Keyshare_payloads = md_Keyshare.Fields().ByName("payloads") - fd_Keyshare_protocol = md_Keyshare.Fields().ByName("protocol") - fd_Keyshare_public_key = md_Keyshare.Fields().ByName("public_key") - fd_Keyshare_version = md_Keyshare.Fields().ByName("version") - fd_Keyshare_role = md_Keyshare.Fields().ByName("role") -} - -var _ protoreflect.Message = (*fastReflection_Keyshare)(nil) - -type fastReflection_Keyshare Keyshare - -func (x *Keyshare) ProtoReflect() protoreflect.Message { - return (*fastReflection_Keyshare)(x) -} - -func (x *Keyshare) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Keyshare_messageType fastReflection_Keyshare_messageType -var _ protoreflect.MessageType = fastReflection_Keyshare_messageType{} - -type fastReflection_Keyshare_messageType struct{} - -func (x fastReflection_Keyshare_messageType) Zero() protoreflect.Message { - return (*fastReflection_Keyshare)(nil) -} -func (x fastReflection_Keyshare_messageType) New() protoreflect.Message { - return new(fastReflection_Keyshare) -} -func (x fastReflection_Keyshare_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Keyshare -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Keyshare) Descriptor() protoreflect.MessageDescriptor { - return md_Keyshare -} - -// 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_Keyshare) Type() protoreflect.MessageType { - return _fastReflection_Keyshare_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Keyshare) New() protoreflect.Message { - return new(fastReflection_Keyshare) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Keyshare) Interface() protoreflect.ProtoMessage { - return (*Keyshare)(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_Keyshare) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Metadata) != 0 { - value := protoreflect.ValueOfMap(&_Keyshare_1_map{m: &x.Metadata}) - if !f(fd_Keyshare_metadata, value) { - return - } - } - if len(x.Payloads) != 0 { - value := protoreflect.ValueOfMap(&_Keyshare_2_map{m: &x.Payloads}) - if !f(fd_Keyshare_payloads, value) { - return - } - } - if x.Protocol != "" { - value := protoreflect.ValueOfString(x.Protocol) - if !f(fd_Keyshare_protocol, value) { - return - } - } - if len(x.PublicKey) != 0 { - value := protoreflect.ValueOfBytes(x.PublicKey) - if !f(fd_Keyshare_public_key, value) { - return - } - } - if x.Version != uint32(0) { - value := protoreflect.ValueOfUint32(x.Version) - if !f(fd_Keyshare_version, value) { - return - } - } - if x.Role != int32(0) { - value := protoreflect.ValueOfInt32(x.Role) - if !f(fd_Keyshare_role, 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_Keyshare) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Keyshare.metadata": - return len(x.Metadata) != 0 - case "did.v1.Keyshare.payloads": - return len(x.Payloads) != 0 - case "did.v1.Keyshare.protocol": - return x.Protocol != "" - case "did.v1.Keyshare.public_key": - return len(x.PublicKey) != 0 - case "did.v1.Keyshare.version": - return x.Version != uint32(0) - case "did.v1.Keyshare.role": - return x.Role != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Keyshare.metadata": - x.Metadata = nil - case "did.v1.Keyshare.payloads": - x.Payloads = nil - case "did.v1.Keyshare.protocol": - x.Protocol = "" - case "did.v1.Keyshare.public_key": - x.PublicKey = nil - case "did.v1.Keyshare.version": - x.Version = uint32(0) - case "did.v1.Keyshare.role": - x.Role = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Keyshare.metadata": - if len(x.Metadata) == 0 { - return protoreflect.ValueOfMap(&_Keyshare_1_map{}) - } - mapValue := &_Keyshare_1_map{m: &x.Metadata} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Keyshare.payloads": - if len(x.Payloads) == 0 { - return protoreflect.ValueOfMap(&_Keyshare_2_map{}) - } - mapValue := &_Keyshare_2_map{m: &x.Payloads} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Keyshare.protocol": - value := x.Protocol - return protoreflect.ValueOfString(value) - case "did.v1.Keyshare.public_key": - value := x.PublicKey - return protoreflect.ValueOfBytes(value) - case "did.v1.Keyshare.version": - value := x.Version - return protoreflect.ValueOfUint32(value) - case "did.v1.Keyshare.role": - value := x.Role - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Keyshare.metadata": - mv := value.Map() - cmv := mv.(*_Keyshare_1_map) - x.Metadata = *cmv.m - case "did.v1.Keyshare.payloads": - mv := value.Map() - cmv := mv.(*_Keyshare_2_map) - x.Payloads = *cmv.m - case "did.v1.Keyshare.protocol": - x.Protocol = value.Interface().(string) - case "did.v1.Keyshare.public_key": - x.PublicKey = value.Bytes() - case "did.v1.Keyshare.version": - x.Version = uint32(value.Uint()) - case "did.v1.Keyshare.role": - x.Role = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Keyshare.metadata": - if x.Metadata == nil { - x.Metadata = make(map[string]string) - } - value := &_Keyshare_1_map{m: &x.Metadata} - return protoreflect.ValueOfMap(value) - case "did.v1.Keyshare.payloads": - if x.Payloads == nil { - x.Payloads = make(map[string][]byte) - } - value := &_Keyshare_2_map{m: &x.Payloads} - return protoreflect.ValueOfMap(value) - case "did.v1.Keyshare.protocol": - panic(fmt.Errorf("field protocol of message did.v1.Keyshare is not mutable")) - case "did.v1.Keyshare.public_key": - panic(fmt.Errorf("field public_key of message did.v1.Keyshare is not mutable")) - case "did.v1.Keyshare.version": - panic(fmt.Errorf("field version of message did.v1.Keyshare is not mutable")) - case "did.v1.Keyshare.role": - panic(fmt.Errorf("field role of message did.v1.Keyshare is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Keyshare.metadata": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Keyshare_1_map{m: &m}) - case "did.v1.Keyshare.payloads": - m := make(map[string][]byte) - return protoreflect.ValueOfMap(&_Keyshare_2_map{m: &m}) - case "did.v1.Keyshare.protocol": - return protoreflect.ValueOfString("") - case "did.v1.Keyshare.public_key": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Keyshare.version": - return protoreflect.ValueOfUint32(uint32(0)) - case "did.v1.Keyshare.role": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare")) - } - panic(fmt.Errorf("message did.v1.Keyshare 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_Keyshare) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Keyshare", 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_Keyshare) 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_Keyshare) 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_Keyshare) 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_Keyshare) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Keyshare) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Metadata) > 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.Metadata)) - for k := range x.Metadata { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Metadata[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Metadata { - SiZeMaP(k, v) - } - } - } - if len(x.Payloads) > 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.Payloads)) - for k := range x.Payloads { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Payloads[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Payloads { - SiZeMaP(k, v) - } - } - } - l = len(x.Protocol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PublicKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - if x.Role != 0 { - n += 1 + runtime.Sov(uint64(x.Role)) - } - 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().(*Keyshare) - 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.Role != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Role)) - i-- - dAtA[i] = 0x30 - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x28 - } - if len(x.PublicKey) > 0 { - i -= len(x.PublicKey) - copy(dAtA[i:], x.PublicKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey))) - i-- - dAtA[i] = 0x22 - } - if len(x.Protocol) > 0 { - i -= len(x.Protocol) - copy(dAtA[i:], x.Protocol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Protocol))) - i-- - dAtA[i] = 0x1a - } - if len(x.Payloads) > 0 { - MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForPayloads := make([]string, 0, len(x.Payloads)) - for k := range x.Payloads { - keysForPayloads = append(keysForPayloads, string(k)) - } - sort.Slice(keysForPayloads, func(i, j int) bool { - return keysForPayloads[i] < keysForPayloads[j] - }) - for iNdEx := len(keysForPayloads) - 1; iNdEx >= 0; iNdEx-- { - v := x.Payloads[string(keysForPayloads[iNdEx])] - out, err := MaRsHaLmAp(keysForPayloads[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Payloads { - v := x.Payloads[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.Metadata) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForMetadata := make([]string, 0, len(x.Metadata)) - for k := range x.Metadata { - keysForMetadata = append(keysForMetadata, string(k)) - } - sort.Slice(keysForMetadata, func(i, j int) bool { - return keysForMetadata[i] < keysForMetadata[j] - }) - for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { - v := x.Metadata[string(keysForMetadata[iNdEx])] - out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Metadata { - v := x.Metadata[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Keyshare) - 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: Keyshare: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshare: 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 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 = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Metadata[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payloads", 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.Payloads == nil { - x.Payloads = 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.Payloads[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Protocol", 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.Protocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var 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.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...) - if x.PublicKey == nil { - x.PublicKey = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 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.Version |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - 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 |= int32(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 = (*_Permissions_1_list)(nil) - -type _Permissions_1_list struct { - list *[]DIDNamespace -} - -func (x *_Permissions_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Permissions_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) -} - -func (x *_Permissions_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (DIDNamespace)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_Permissions_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (DIDNamespace)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Permissions_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Grants as it is not of Message kind")) -} - -func (x *_Permissions_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Permissions_1_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) -} - -func (x *_Permissions_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Permissions_2_list)(nil) - -type _Permissions_2_list struct { - list *[]PermissionScope -} - -func (x *_Permissions_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Permissions_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) -} - -func (x *_Permissions_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_Permissions_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Permissions_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Scopes as it is not of Message kind")) -} - -func (x *_Permissions_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Permissions_2_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) -} - -func (x *_Permissions_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Permissions protoreflect.MessageDescriptor - fd_Permissions_grants protoreflect.FieldDescriptor - fd_Permissions_scopes protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_Permissions = File_did_v1_models_proto.Messages().ByName("Permissions") - fd_Permissions_grants = md_Permissions.Fields().ByName("grants") - fd_Permissions_scopes = md_Permissions.Fields().ByName("scopes") -} - -var _ protoreflect.Message = (*fastReflection_Permissions)(nil) - -type fastReflection_Permissions Permissions - -func (x *Permissions) ProtoReflect() protoreflect.Message { - return (*fastReflection_Permissions)(x) -} - -func (x *Permissions) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_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_Permissions_messageType fastReflection_Permissions_messageType -var _ protoreflect.MessageType = fastReflection_Permissions_messageType{} - -type fastReflection_Permissions_messageType struct{} - -func (x fastReflection_Permissions_messageType) Zero() protoreflect.Message { - return (*fastReflection_Permissions)(nil) -} -func (x fastReflection_Permissions_messageType) New() protoreflect.Message { - return new(fastReflection_Permissions) -} -func (x fastReflection_Permissions_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Permissions -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Permissions) Descriptor() protoreflect.MessageDescriptor { - return md_Permissions -} - -// 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_Permissions) Type() protoreflect.MessageType { - return _fastReflection_Permissions_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Permissions) New() protoreflect.Message { - return new(fastReflection_Permissions) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Permissions) Interface() protoreflect.ProtoMessage { - return (*Permissions)(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_Permissions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Grants) != 0 { - value := protoreflect.ValueOfList(&_Permissions_1_list{list: &x.Grants}) - if !f(fd_Permissions_grants, value) { - return - } - } - if len(x.Scopes) != 0 { - value := protoreflect.ValueOfList(&_Permissions_2_list{list: &x.Scopes}) - if !f(fd_Permissions_scopes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Permissions) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Permissions.grants": - return len(x.Grants) != 0 - case "did.v1.Permissions.scopes": - return len(x.Scopes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Permissions.grants": - x.Grants = nil - case "did.v1.Permissions.scopes": - x.Scopes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Permissions.grants": - if len(x.Grants) == 0 { - return protoreflect.ValueOfList(&_Permissions_1_list{}) - } - listValue := &_Permissions_1_list{list: &x.Grants} - return protoreflect.ValueOfList(listValue) - case "did.v1.Permissions.scopes": - if len(x.Scopes) == 0 { - return protoreflect.ValueOfList(&_Permissions_2_list{}) - } - listValue := &_Permissions_2_list{list: &x.Scopes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Permissions.grants": - lv := value.List() - clv := lv.(*_Permissions_1_list) - x.Grants = *clv.list - case "did.v1.Permissions.scopes": - lv := value.List() - clv := lv.(*_Permissions_2_list) - x.Scopes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Permissions.grants": - if x.Grants == nil { - x.Grants = []DIDNamespace{} - } - value := &_Permissions_1_list{list: &x.Grants} - return protoreflect.ValueOfList(value) - case "did.v1.Permissions.scopes": - if x.Scopes == nil { - x.Scopes = []PermissionScope{} - } - value := &_Permissions_2_list{list: &x.Scopes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Permissions.grants": - list := []DIDNamespace{} - return protoreflect.ValueOfList(&_Permissions_1_list{list: &list}) - case "did.v1.Permissions.scopes": - list := []PermissionScope{} - return protoreflect.ValueOfList(&_Permissions_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions")) - } - panic(fmt.Errorf("message did.v1.Permissions 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_Permissions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Permissions", 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_Permissions) 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_Permissions) 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_Permissions) 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_Permissions) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Permissions) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Grants) > 0 { - l = 0 - for _, e := range x.Grants { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if len(x.Scopes) > 0 { - l = 0 - for _, e := range x.Scopes { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Permissions) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Scopes) > 0 { - var pksize2 int - for _, num := range x.Scopes { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num1 := range x.Scopes { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x12 - } - if len(x.Grants) > 0 { - var pksize4 int - for _, num := range x.Grants { - pksize4 += runtime.Sov(uint64(num)) - } - i -= pksize4 - j3 := i - for _, num1 := range x.Grants { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA[j3] = uint8(num) - j3++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) - 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().(*Permissions) - 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: Permissions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v DIDNamespace - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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 |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Grants = append(x.Grants, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(x.Grants) == 0 { - x.Grants = make([]DIDNamespace, 0, elementCount) - } - for iNdEx < postIndex { - var v DIDNamespace - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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 |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Grants = append(x.Grants, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) - } - case 2: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Scopes = append(x.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(x.Scopes) == 0 { - x.Scopes = make([]PermissionScope, 0, elementCount) - } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Scopes = append(x.Scopes, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_role protoreflect.FieldDescriptor - fd_PubKey_algorithm protoreflect.FieldDescriptor - fd_PubKey_encoding protoreflect.FieldDescriptor - fd_PubKey_curve protoreflect.FieldDescriptor - fd_PubKey_key_type protoreflect.FieldDescriptor - fd_PubKey_raw 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_role = md_PubKey.Fields().ByName("role") - fd_PubKey_algorithm = md_PubKey.Fields().ByName("algorithm") - fd_PubKey_encoding = md_PubKey.Fields().ByName("encoding") - fd_PubKey_curve = md_PubKey.Fields().ByName("curve") - fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type") - fd_PubKey_raw = md_PubKey.Fields().ByName("raw") - fd_PubKey_jwk = md_PubKey.Fields().ByName("jwk") -} - -var _ protoreflect.Message = (*fastReflection_PubKey)(nil) - -type fastReflection_PubKey PubKey - -func (x *PubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey)(x) -} - -func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_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_PubKey_messageType fastReflection_PubKey_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} - -type fastReflection_PubKey_messageType struct{} - -func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey)(nil) -} -func (x fastReflection_PubKey_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey) -} -func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_PubKey) Type() protoreflect.MessageType { - return _fastReflection_PubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey) New() protoreflect.Message { - return new(fastReflection_PubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { - return (*PubKey)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Role != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role)) - if !f(fd_PubKey_role, value) { - return - } - } - if x.Algorithm != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm)) - if !f(fd_PubKey_algorithm, value) { - return - } - } - if x.Encoding != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding)) - if !f(fd_PubKey_encoding, value) { - return - } - } - if x.Curve != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Curve)) - if !f(fd_PubKey_curve, value) { - return - } - } - if x.KeyType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.KeyType)) - if !f(fd_PubKey_key_type, value) { - return - } - } - if len(x.Raw) != 0 { - value := protoreflect.ValueOfBytes(x.Raw) - if !f(fd_PubKey_raw, value) { - return - } - } - if x.Jwk != nil { - value := protoreflect.ValueOfMessage(x.Jwk.ProtoReflect()) - if !f(fd_PubKey_jwk, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.PubKey.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.curve": - return x.Curve != 0 - case "did.v1.PubKey.key_type": - return x.KeyType != 0 - case "did.v1.PubKey.raw": - return len(x.Raw) != 0 - case "did.v1.PubKey.jwk": - return x.Jwk != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.PubKey.role": - x.Role = 0 - case "did.v1.PubKey.algorithm": - x.Algorithm = 0 - case "did.v1.PubKey.encoding": - x.Encoding = 0 - case "did.v1.PubKey.curve": - x.Curve = 0 - case "did.v1.PubKey.key_type": - x.KeyType = 0 - case "did.v1.PubKey.raw": - x.Raw = 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")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.PubKey.role": - value := x.Role - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - 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.curve": - value := x.Curve - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.PubKey.key_type": - value := x.KeyType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.PubKey.raw": - value := x.Raw - return protoreflect.ValueOfBytes(value) - case "did.v1.PubKey.jwk": - value := x.Jwk - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.PubKey.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.curve": - x.Curve = (KeyCurve)(value.Enum()) - case "did.v1.PubKey.key_type": - x.KeyType = (KeyType)(value.Enum()) - case "did.v1.PubKey.raw": - x.Raw = value.Bytes() - case "did.v1.PubKey.jwk": - x.Jwk = value.Message().Interface().(*PubKey_JWK) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.jwk": - if x.Jwk == nil { - x.Jwk = new(PubKey_JWK) - } - return protoreflect.ValueOfMessage(x.Jwk.ProtoReflect()) - 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.curve": - panic(fmt.Errorf("field curve of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.key_type": - panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.raw": - panic(fmt.Errorf("field raw of message did.v1.PubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.role": - return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.algorithm": - return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.encoding": - return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.curve": - return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.key_type": - return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.raw": - return protoreflect.ValueOfBytes(nil) - case "did.v1.PubKey.jwk": - m := new(PubKey_JWK) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_PubKey) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - 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.KeyType != 0 { - n += 1 + runtime.Sov(uint64(x.KeyType)) - } - l = len(x.Raw) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Jwk != nil { - l = options.Size(x.Jwk) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Jwk != nil { - encoded, err := options.Marshal(x.Jwk) - 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.Raw) > 0 { - i -= len(x.Raw) - copy(dAtA[i:], x.Raw) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Raw))) - i-- - dAtA[i] = 0x32 - } - if x.KeyType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.KeyType)) - 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().(*PubKey) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 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 KeyType", wireType) - } - x.KeyType = 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.KeyType |= KeyType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - 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 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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.Raw = append(x.Raw[:0], dAtA[iNdEx:postIndex]...) - if x.Raw == nil { - x.Raw = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - 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 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.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.Jwk == nil { - x.Jwk = &PubKey_JWK{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Jwk); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PubKey_JWK protoreflect.MessageDescriptor - fd_PubKey_JWK_kty protoreflect.FieldDescriptor - fd_PubKey_JWK_crv protoreflect.FieldDescriptor - fd_PubKey_JWK_x protoreflect.FieldDescriptor - fd_PubKey_JWK_y protoreflect.FieldDescriptor - fd_PubKey_JWK_n protoreflect.FieldDescriptor - fd_PubKey_JWK_e protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_PubKey_JWK = File_did_v1_models_proto.Messages().ByName("PubKey").Messages().ByName("JWK") - fd_PubKey_JWK_kty = md_PubKey_JWK.Fields().ByName("kty") - fd_PubKey_JWK_crv = md_PubKey_JWK.Fields().ByName("crv") - fd_PubKey_JWK_x = md_PubKey_JWK.Fields().ByName("x") - fd_PubKey_JWK_y = md_PubKey_JWK.Fields().ByName("y") - fd_PubKey_JWK_n = md_PubKey_JWK.Fields().ByName("n") - fd_PubKey_JWK_e = md_PubKey_JWK.Fields().ByName("e") -} - -var _ protoreflect.Message = (*fastReflection_PubKey_JWK)(nil) - -type fastReflection_PubKey_JWK PubKey_JWK - -func (x *PubKey_JWK) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey_JWK)(x) -} - -func (x *PubKey_JWK) 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_PubKey_JWK_messageType fastReflection_PubKey_JWK_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_JWK_messageType{} - -type fastReflection_PubKey_JWK_messageType struct{} - -func (x fastReflection_PubKey_JWK_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey_JWK)(nil) -} -func (x fastReflection_PubKey_JWK_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey_JWK) -} -func (x fastReflection_PubKey_JWK_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey_JWK -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey_JWK) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey_JWK -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_PubKey_JWK) Type() protoreflect.MessageType { - return _fastReflection_PubKey_JWK_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey_JWK) New() protoreflect.Message { - return new(fastReflection_PubKey_JWK) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey_JWK) Interface() protoreflect.ProtoMessage { - return (*PubKey_JWK)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_PubKey_JWK) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Kty != "" { - value := protoreflect.ValueOfString(x.Kty) - if !f(fd_PubKey_JWK_kty, value) { - return - } - } - if x.Crv != "" { - value := protoreflect.ValueOfString(x.Crv) - if !f(fd_PubKey_JWK_crv, value) { - return - } - } - if x.X != "" { - value := protoreflect.ValueOfString(x.X) - if !f(fd_PubKey_JWK_x, value) { - return - } - } - if x.Y != "" { - value := protoreflect.ValueOfString(x.Y) - if !f(fd_PubKey_JWK_y, value) { - return - } - } - if x.N != "" { - value := protoreflect.ValueOfString(x.N) - if !f(fd_PubKey_JWK_n, value) { - return - } - } - if x.E != "" { - value := protoreflect.ValueOfString(x.E) - if !f(fd_PubKey_JWK_e, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_PubKey_JWK) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.PubKey.JWK.kty": - return x.Kty != "" - case "did.v1.PubKey.JWK.crv": - return x.Crv != "" - case "did.v1.PubKey.JWK.x": - return x.X != "" - case "did.v1.PubKey.JWK.y": - return x.Y != "" - case "did.v1.PubKey.JWK.n": - return x.N != "" - case "did.v1.PubKey.JWK.e": - return x.E != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey_JWK) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.PubKey.JWK.kty": - x.Kty = "" - case "did.v1.PubKey.JWK.crv": - x.Crv = "" - case "did.v1.PubKey.JWK.x": - x.X = "" - case "did.v1.PubKey.JWK.y": - x.Y = "" - case "did.v1.PubKey.JWK.n": - x.N = "" - case "did.v1.PubKey.JWK.e": - x.E = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_PubKey_JWK) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.PubKey.JWK.kty": - value := x.Kty - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.JWK.crv": - value := x.Crv - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.JWK.x": - value := x.X - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.JWK.y": - value := x.Y - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.JWK.n": - value := x.N - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.JWK.e": - value := x.E - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey_JWK) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.PubKey.JWK.kty": - x.Kty = value.Interface().(string) - case "did.v1.PubKey.JWK.crv": - x.Crv = value.Interface().(string) - case "did.v1.PubKey.JWK.x": - x.X = value.Interface().(string) - case "did.v1.PubKey.JWK.y": - x.Y = value.Interface().(string) - case "did.v1.PubKey.JWK.n": - x.N = value.Interface().(string) - case "did.v1.PubKey.JWK.e": - x.E = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey_JWK) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.JWK.kty": - panic(fmt.Errorf("field kty of message did.v1.PubKey.JWK is not mutable")) - case "did.v1.PubKey.JWK.crv": - panic(fmt.Errorf("field crv of message did.v1.PubKey.JWK is not mutable")) - case "did.v1.PubKey.JWK.x": - panic(fmt.Errorf("field x of message did.v1.PubKey.JWK is not mutable")) - case "did.v1.PubKey.JWK.y": - panic(fmt.Errorf("field y of message did.v1.PubKey.JWK is not mutable")) - case "did.v1.PubKey.JWK.n": - panic(fmt.Errorf("field n of message did.v1.PubKey.JWK is not mutable")) - case "did.v1.PubKey.JWK.e": - panic(fmt.Errorf("field e of message did.v1.PubKey.JWK is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_PubKey_JWK) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.JWK.kty": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.JWK.crv": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.JWK.x": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.JWK.y": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.JWK.n": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.JWK.e": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK")) - } - panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_PubKey_JWK) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey.JWK", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_PubKey_JWK) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey_JWK) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_PubKey_JWK) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_PubKey_JWK) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey_JWK) - 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.Kty) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Crv) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.X) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Y) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.N) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.E) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey_JWK) - 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.E) > 0 { - i -= len(x.E) - copy(dAtA[i:], x.E) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.E))) - i-- - dAtA[i] = 0x32 - } - if len(x.N) > 0 { - i -= len(x.N) - copy(dAtA[i:], x.N) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.N))) - i-- - dAtA[i] = 0x2a - } - if len(x.Y) > 0 { - i -= len(x.Y) - copy(dAtA[i:], x.Y) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Y))) - i-- - dAtA[i] = 0x22 - } - if len(x.X) > 0 { - i -= len(x.X) - copy(dAtA[i:], x.X) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.X))) - i-- - dAtA[i] = 0x1a - } - if len(x.Crv) > 0 { - i -= len(x.Crv) - copy(dAtA[i:], x.Crv) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Crv))) - i-- - dAtA[i] = 0x12 - } - if len(x.Kty) > 0 { - i -= len(x.Kty) - copy(dAtA[i:], x.Kty) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kty))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PubKey_JWK) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: 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 Kty", 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.Kty = 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 Crv", 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.Crv = 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 X", 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.X = 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 Y", 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.Y = 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 N", 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.N = 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 E", 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.E = 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 = (*_Service_6_map)(nil) - -type _Service_6_map struct { - m *map[string]string -} - -func (x *_Service_6_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Service_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Service_6_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Service_6_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Service_6_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_Service_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Service_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_6_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Service_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_authority protoreflect.FieldDescriptor - fd_Service_origin protoreflect.FieldDescriptor - fd_Service_description protoreflect.FieldDescriptor - fd_Service_service_endpoints protoreflect.FieldDescriptor - fd_Service_permissions 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_service_type = md_Service.Fields().ByName("service_type") - fd_Service_authority = md_Service.Fields().ByName("authority") - fd_Service_origin = md_Service.Fields().ByName("origin") - fd_Service_description = md_Service.Fields().ByName("description") - fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") - fd_Service_permissions = md_Service.Fields().ByName("permissions") -} - -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[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_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.ServiceType != "" { - value := protoreflect.ValueOfString(x.ServiceType) - if !f(fd_Service_service_type, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_Service_authority, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Service_origin, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_Service_description, value) { - return - } - } - if len(x.ServiceEndpoints) != 0 { - value := protoreflect.ValueOfMap(&_Service_6_map{m: &x.ServiceEndpoints}) - if !f(fd_Service_service_endpoints, value) { - return - } - } - if x.Permissions != nil { - value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) - if !f(fd_Service_permissions, 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.service_type": - return x.ServiceType != "" - case "did.v1.Service.authority": - return x.Authority != "" - case "did.v1.Service.origin": - return x.Origin != "" - case "did.v1.Service.description": - return x.Description != "" - case "did.v1.Service.service_endpoints": - return len(x.ServiceEndpoints) != 0 - case "did.v1.Service.permissions": - return x.Permissions != 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.service_type": - x.ServiceType = "" - case "did.v1.Service.authority": - x.Authority = "" - case "did.v1.Service.origin": - x.Origin = "" - case "did.v1.Service.description": - x.Description = "" - case "did.v1.Service.service_endpoints": - x.ServiceEndpoints = nil - case "did.v1.Service.permissions": - x.Permissions = 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.service_type": - value := x.ServiceType - return protoreflect.ValueOfString(value) - case "did.v1.Service.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.Service.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Service.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.Service.service_endpoints": - if len(x.ServiceEndpoints) == 0 { - return protoreflect.ValueOfMap(&_Service_6_map{}) - } - mapValue := &_Service_6_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Service.permissions": - value := x.Permissions - 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.service_type": - x.ServiceType = value.Interface().(string) - case "did.v1.Service.authority": - x.Authority = value.Interface().(string) - case "did.v1.Service.origin": - x.Origin = value.Interface().(string) - case "did.v1.Service.description": - x.Description = value.Interface().(string) - case "did.v1.Service.service_endpoints": - mv := value.Map() - cmv := mv.(*_Service_6_map) - x.ServiceEndpoints = *cmv.m - case "did.v1.Service.permissions": - x.Permissions = value.Message().Interface().(*Permissions) - 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.service_endpoints": - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - value := &_Service_6_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(value) - case "did.v1.Service.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.authority": - panic(fmt.Errorf("field authority 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")) - case "did.v1.Service.description": - panic(fmt.Errorf("field description 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.service_type": - return protoreflect.ValueOfString("") - case "did.v1.Service.authority": - return protoreflect.ValueOfString("") - case "did.v1.Service.origin": - return protoreflect.ValueOfString("") - case "did.v1.Service.description": - return protoreflect.ValueOfString("") - case "did.v1.Service.service_endpoints": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Service_6_map{m: &m}) - case "did.v1.Service.permissions": - m := new(Permissions) - 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.ServiceType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - 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.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)) - } - 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.Permissions != nil { - l = options.Size(x.Permissions) - 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.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] = 0x3a - } - 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] = 0x32 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) - } - sort.Slice(keysForServiceEndpoints, func(i, j int) bool { - return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] - }) - for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { - v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] - out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.ServiceEndpoints { - v := x.ServiceEndpoints[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.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.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.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x1a - } - if len(x.ServiceType) > 0 { - i -= len(x.ServiceType) - copy(dAtA[i:], x.ServiceType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceType))) - 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 ServiceType", 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.ServiceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 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 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 7: - 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 - 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_ServiceInfo protoreflect.MessageDescriptor - fd_ServiceInfo_exists protoreflect.FieldDescriptor - fd_ServiceInfo_origin protoreflect.FieldDescriptor - fd_ServiceInfo_fingerprint protoreflect.FieldDescriptor - fd_ServiceInfo_service protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_ServiceInfo = File_did_v1_models_proto.Messages().ByName("ServiceInfo") - fd_ServiceInfo_exists = md_ServiceInfo.Fields().ByName("exists") - fd_ServiceInfo_origin = md_ServiceInfo.Fields().ByName("origin") - fd_ServiceInfo_fingerprint = md_ServiceInfo.Fields().ByName("fingerprint") - fd_ServiceInfo_service = md_ServiceInfo.Fields().ByName("service") -} - -var _ protoreflect.Message = (*fastReflection_ServiceInfo)(nil) - -type fastReflection_ServiceInfo ServiceInfo - -func (x *ServiceInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ServiceInfo)(x) -} - -func (x *ServiceInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_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_ServiceInfo_messageType fastReflection_ServiceInfo_messageType -var _ protoreflect.MessageType = fastReflection_ServiceInfo_messageType{} - -type fastReflection_ServiceInfo_messageType struct{} - -func (x fastReflection_ServiceInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ServiceInfo)(nil) -} -func (x fastReflection_ServiceInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ServiceInfo) -} -func (x fastReflection_ServiceInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ServiceInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceInfo -} - -// 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_ServiceInfo) Type() protoreflect.MessageType { - return _fastReflection_ServiceInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ServiceInfo) New() protoreflect.Message { - return new(fastReflection_ServiceInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ServiceInfo) Interface() protoreflect.ProtoMessage { - return (*ServiceInfo)(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_ServiceInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Exists != false { - value := protoreflect.ValueOfBool(x.Exists) - if !f(fd_ServiceInfo_exists, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_ServiceInfo_origin, value) { - return - } - } - if x.Fingerprint != "" { - value := protoreflect.ValueOfString(x.Fingerprint) - if !f(fd_ServiceInfo_fingerprint, value) { - return - } - } - if x.Service != nil { - value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - if !f(fd_ServiceInfo_service, 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_ServiceInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ServiceInfo.exists": - return x.Exists != false - case "did.v1.ServiceInfo.origin": - return x.Origin != "" - case "did.v1.ServiceInfo.fingerprint": - return x.Fingerprint != "" - case "did.v1.ServiceInfo.service": - return x.Service != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ServiceInfo.exists": - x.Exists = false - case "did.v1.ServiceInfo.origin": - x.Origin = "" - case "did.v1.ServiceInfo.fingerprint": - x.Fingerprint = "" - case "did.v1.ServiceInfo.service": - x.Service = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ServiceInfo.exists": - value := x.Exists - return protoreflect.ValueOfBool(value) - case "did.v1.ServiceInfo.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.ServiceInfo.fingerprint": - value := x.Fingerprint - return protoreflect.ValueOfString(value) - case "did.v1.ServiceInfo.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.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ServiceInfo.exists": - x.Exists = value.Bool() - case "did.v1.ServiceInfo.origin": - x.Origin = value.Interface().(string) - case "did.v1.ServiceInfo.fingerprint": - x.Fingerprint = value.Interface().(string) - case "did.v1.ServiceInfo.service": - x.Service = value.Message().Interface().(*Service) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ServiceInfo.service": - if x.Service == nil { - x.Service = new(Service) - } - return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - case "did.v1.ServiceInfo.exists": - panic(fmt.Errorf("field exists of message did.v1.ServiceInfo is not mutable")) - case "did.v1.ServiceInfo.origin": - panic(fmt.Errorf("field origin of message did.v1.ServiceInfo is not mutable")) - case "did.v1.ServiceInfo.fingerprint": - panic(fmt.Errorf("field fingerprint of message did.v1.ServiceInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ServiceInfo.exists": - return protoreflect.ValueOfBool(false) - case "did.v1.ServiceInfo.origin": - return protoreflect.ValueOfString("") - case "did.v1.ServiceInfo.fingerprint": - return protoreflect.ValueOfString("") - case "did.v1.ServiceInfo.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.ServiceInfo")) - } - panic(fmt.Errorf("message did.v1.ServiceInfo 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_ServiceInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ServiceInfo", 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_ServiceInfo) 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_ServiceInfo) 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_ServiceInfo) 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_ServiceInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ServiceInfo) - 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 - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Fingerprint) - if l > 0 { - 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) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ServiceInfo) - 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.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] = 0x22 - } - if len(x.Fingerprint) > 0 { - i -= len(x.Fingerprint) - copy(dAtA[i:], x.Fingerprint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fingerprint))) - 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 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().(*ServiceInfo) - 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: ServiceInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceInfo: 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 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 Fingerprint", 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.Fingerprint = 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 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_FirstPartyCaveat protoreflect.MessageDescriptor - fd_FirstPartyCaveat_scope protoreflect.FieldDescriptor - fd_FirstPartyCaveat_exp protoreflect.FieldDescriptor - fd_FirstPartyCaveat_cnf protoreflect.FieldDescriptor - fd_FirstPartyCaveat_aud protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_FirstPartyCaveat = File_did_v1_models_proto.Messages().ByName("FirstPartyCaveat") - fd_FirstPartyCaveat_scope = md_FirstPartyCaveat.Fields().ByName("scope") - fd_FirstPartyCaveat_exp = md_FirstPartyCaveat.Fields().ByName("exp") - fd_FirstPartyCaveat_cnf = md_FirstPartyCaveat.Fields().ByName("cnf") - fd_FirstPartyCaveat_aud = md_FirstPartyCaveat.Fields().ByName("aud") -} - -var _ protoreflect.Message = (*fastReflection_FirstPartyCaveat)(nil) - -type fastReflection_FirstPartyCaveat FirstPartyCaveat - -func (x *FirstPartyCaveat) ProtoReflect() protoreflect.Message { - return (*fastReflection_FirstPartyCaveat)(x) -} - -func (x *FirstPartyCaveat) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_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_FirstPartyCaveat_messageType fastReflection_FirstPartyCaveat_messageType -var _ protoreflect.MessageType = fastReflection_FirstPartyCaveat_messageType{} - -type fastReflection_FirstPartyCaveat_messageType struct{} - -func (x fastReflection_FirstPartyCaveat_messageType) Zero() protoreflect.Message { - return (*fastReflection_FirstPartyCaveat)(nil) -} -func (x fastReflection_FirstPartyCaveat_messageType) New() protoreflect.Message { - return new(fastReflection_FirstPartyCaveat) -} -func (x fastReflection_FirstPartyCaveat_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_FirstPartyCaveat -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_FirstPartyCaveat) Descriptor() protoreflect.MessageDescriptor { - return md_FirstPartyCaveat -} - -// 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_FirstPartyCaveat) Type() protoreflect.MessageType { - return _fastReflection_FirstPartyCaveat_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_FirstPartyCaveat) New() protoreflect.Message { - return new(fastReflection_FirstPartyCaveat) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_FirstPartyCaveat) Interface() protoreflect.ProtoMessage { - return (*FirstPartyCaveat)(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_FirstPartyCaveat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Scope != nil { - value := protoreflect.ValueOfMessage(x.Scope.ProtoReflect()) - if !f(fd_FirstPartyCaveat_scope, value) { - return - } - } - if x.Exp != int64(0) { - value := protoreflect.ValueOfInt64(x.Exp) - if !f(fd_FirstPartyCaveat_exp, value) { - return - } - } - if x.Cnf != "" { - value := protoreflect.ValueOfString(x.Cnf) - if !f(fd_FirstPartyCaveat_cnf, value) { - return - } - } - if x.Aud != "" { - value := protoreflect.ValueOfString(x.Aud) - if !f(fd_FirstPartyCaveat_aud, 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_FirstPartyCaveat) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.FirstPartyCaveat.scope": - return x.Scope != nil - case "did.v1.FirstPartyCaveat.exp": - return x.Exp != int64(0) - case "did.v1.FirstPartyCaveat.cnf": - return x.Cnf != "" - case "did.v1.FirstPartyCaveat.aud": - return x.Aud != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.FirstPartyCaveat.scope": - x.Scope = nil - case "did.v1.FirstPartyCaveat.exp": - x.Exp = int64(0) - case "did.v1.FirstPartyCaveat.cnf": - x.Cnf = "" - case "did.v1.FirstPartyCaveat.aud": - x.Aud = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.FirstPartyCaveat.scope": - value := x.Scope - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.FirstPartyCaveat.exp": - value := x.Exp - return protoreflect.ValueOfInt64(value) - case "did.v1.FirstPartyCaveat.cnf": - value := x.Cnf - return protoreflect.ValueOfString(value) - case "did.v1.FirstPartyCaveat.aud": - value := x.Aud - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.FirstPartyCaveat.scope": - x.Scope = value.Message().Interface().(*Permissions) - case "did.v1.FirstPartyCaveat.exp": - x.Exp = value.Int() - case "did.v1.FirstPartyCaveat.cnf": - x.Cnf = value.Interface().(string) - case "did.v1.FirstPartyCaveat.aud": - x.Aud = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.FirstPartyCaveat.scope": - if x.Scope == nil { - x.Scope = new(Permissions) - } - return protoreflect.ValueOfMessage(x.Scope.ProtoReflect()) - case "did.v1.FirstPartyCaveat.exp": - panic(fmt.Errorf("field exp of message did.v1.FirstPartyCaveat is not mutable")) - case "did.v1.FirstPartyCaveat.cnf": - panic(fmt.Errorf("field cnf of message did.v1.FirstPartyCaveat is not mutable")) - case "did.v1.FirstPartyCaveat.aud": - panic(fmt.Errorf("field aud of message did.v1.FirstPartyCaveat is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.FirstPartyCaveat.scope": - m := new(Permissions) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.FirstPartyCaveat.exp": - return protoreflect.ValueOfInt64(int64(0)) - case "did.v1.FirstPartyCaveat.cnf": - return protoreflect.ValueOfString("") - case "did.v1.FirstPartyCaveat.aud": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.FirstPartyCaveat 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_FirstPartyCaveat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.FirstPartyCaveat", 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_FirstPartyCaveat) 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_FirstPartyCaveat) 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_FirstPartyCaveat) 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_FirstPartyCaveat) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*FirstPartyCaveat) - 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.Scope != nil { - l = options.Size(x.Scope) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Exp != 0 { - n += 1 + runtime.Sov(uint64(x.Exp)) - } - l = len(x.Cnf) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Aud) - 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().(*FirstPartyCaveat) - 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.Aud) > 0 { - i -= len(x.Aud) - copy(dAtA[i:], x.Aud) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aud))) - i-- - dAtA[i] = 0x22 - } - if len(x.Cnf) > 0 { - i -= len(x.Cnf) - copy(dAtA[i:], x.Cnf) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cnf))) - i-- - dAtA[i] = 0x1a - } - if x.Exp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Exp)) - i-- - dAtA[i] = 0x10 - } - if x.Scope != nil { - encoded, err := options.Marshal(x.Scope) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*FirstPartyCaveat) - 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: FirstPartyCaveat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FirstPartyCaveat: 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 Scope", 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.Scope == nil { - x.Scope = &Permissions{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scope); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType) - } - x.Exp = 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.Exp |= int64(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 Cnf", 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.Cnf = 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 Aud", 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.Aud = 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_ThirdPartyCaveat protoreflect.MessageDescriptor - fd_ThirdPartyCaveat_scope protoreflect.FieldDescriptor - fd_ThirdPartyCaveat_exp protoreflect.FieldDescriptor - fd_ThirdPartyCaveat_cnf protoreflect.FieldDescriptor - fd_ThirdPartyCaveat_aud protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_models_proto_init() - md_ThirdPartyCaveat = File_did_v1_models_proto.Messages().ByName("ThirdPartyCaveat") - fd_ThirdPartyCaveat_scope = md_ThirdPartyCaveat.Fields().ByName("scope") - fd_ThirdPartyCaveat_exp = md_ThirdPartyCaveat.Fields().ByName("exp") - fd_ThirdPartyCaveat_cnf = md_ThirdPartyCaveat.Fields().ByName("cnf") - fd_ThirdPartyCaveat_aud = md_ThirdPartyCaveat.Fields().ByName("aud") -} - -var _ protoreflect.Message = (*fastReflection_ThirdPartyCaveat)(nil) - -type fastReflection_ThirdPartyCaveat ThirdPartyCaveat - -func (x *ThirdPartyCaveat) ProtoReflect() protoreflect.Message { - return (*fastReflection_ThirdPartyCaveat)(x) -} - -func (x *ThirdPartyCaveat) 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_ThirdPartyCaveat_messageType fastReflection_ThirdPartyCaveat_messageType -var _ protoreflect.MessageType = fastReflection_ThirdPartyCaveat_messageType{} - -type fastReflection_ThirdPartyCaveat_messageType struct{} - -func (x fastReflection_ThirdPartyCaveat_messageType) Zero() protoreflect.Message { - return (*fastReflection_ThirdPartyCaveat)(nil) -} -func (x fastReflection_ThirdPartyCaveat_messageType) New() protoreflect.Message { - return new(fastReflection_ThirdPartyCaveat) -} -func (x fastReflection_ThirdPartyCaveat_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ThirdPartyCaveat -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ThirdPartyCaveat) Descriptor() protoreflect.MessageDescriptor { - return md_ThirdPartyCaveat -} - -// 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_ThirdPartyCaveat) Type() protoreflect.MessageType { - return _fastReflection_ThirdPartyCaveat_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ThirdPartyCaveat) New() protoreflect.Message { - return new(fastReflection_ThirdPartyCaveat) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ThirdPartyCaveat) Interface() protoreflect.ProtoMessage { - return (*ThirdPartyCaveat)(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_ThirdPartyCaveat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Scope != nil { - value := protoreflect.ValueOfMessage(x.Scope.ProtoReflect()) - if !f(fd_ThirdPartyCaveat_scope, value) { - return - } - } - if x.Exp != int64(0) { - value := protoreflect.ValueOfInt64(x.Exp) - if !f(fd_ThirdPartyCaveat_exp, value) { - return - } - } - if x.Cnf != "" { - value := protoreflect.ValueOfString(x.Cnf) - if !f(fd_ThirdPartyCaveat_cnf, value) { - return - } - } - if x.Aud != "" { - value := protoreflect.ValueOfString(x.Aud) - if !f(fd_ThirdPartyCaveat_aud, 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_ThirdPartyCaveat) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - return x.Scope != nil - case "did.v1.ThirdPartyCaveat.exp": - return x.Exp != int64(0) - case "did.v1.ThirdPartyCaveat.cnf": - return x.Cnf != "" - case "did.v1.ThirdPartyCaveat.aud": - return x.Aud != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - x.Scope = nil - case "did.v1.ThirdPartyCaveat.exp": - x.Exp = int64(0) - case "did.v1.ThirdPartyCaveat.cnf": - x.Cnf = "" - case "did.v1.ThirdPartyCaveat.aud": - x.Aud = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - value := x.Scope - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ThirdPartyCaveat.exp": - value := x.Exp - return protoreflect.ValueOfInt64(value) - case "did.v1.ThirdPartyCaveat.cnf": - value := x.Cnf - return protoreflect.ValueOfString(value) - case "did.v1.ThirdPartyCaveat.aud": - value := x.Aud - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - x.Scope = value.Message().Interface().(*Permissions) - case "did.v1.ThirdPartyCaveat.exp": - x.Exp = value.Int() - case "did.v1.ThirdPartyCaveat.cnf": - x.Cnf = value.Interface().(string) - case "did.v1.ThirdPartyCaveat.aud": - x.Aud = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - if x.Scope == nil { - x.Scope = new(Permissions) - } - return protoreflect.ValueOfMessage(x.Scope.ProtoReflect()) - case "did.v1.ThirdPartyCaveat.exp": - panic(fmt.Errorf("field exp of message did.v1.ThirdPartyCaveat is not mutable")) - case "did.v1.ThirdPartyCaveat.cnf": - panic(fmt.Errorf("field cnf of message did.v1.ThirdPartyCaveat is not mutable")) - case "did.v1.ThirdPartyCaveat.aud": - panic(fmt.Errorf("field aud of message did.v1.ThirdPartyCaveat is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ThirdPartyCaveat.scope": - m := new(Permissions) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ThirdPartyCaveat.exp": - return protoreflect.ValueOfInt64(int64(0)) - case "did.v1.ThirdPartyCaveat.cnf": - return protoreflect.ValueOfString("") - case "did.v1.ThirdPartyCaveat.aud": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat")) - } - panic(fmt.Errorf("message did.v1.ThirdPartyCaveat 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_ThirdPartyCaveat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ThirdPartyCaveat", 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_ThirdPartyCaveat) 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_ThirdPartyCaveat) 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_ThirdPartyCaveat) 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_ThirdPartyCaveat) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ThirdPartyCaveat) - 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.Scope != nil { - l = options.Size(x.Scope) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Exp != 0 { - n += 1 + runtime.Sov(uint64(x.Exp)) - } - l = len(x.Cnf) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Aud) - 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().(*ThirdPartyCaveat) - 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.Aud) > 0 { - i -= len(x.Aud) - copy(dAtA[i:], x.Aud) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aud))) - i-- - dAtA[i] = 0x22 - } - if len(x.Cnf) > 0 { - i -= len(x.Cnf) - copy(dAtA[i:], x.Cnf) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cnf))) - i-- - dAtA[i] = 0x1a - } - if x.Exp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Exp)) - i-- - dAtA[i] = 0x10 - } - if x.Scope != nil { - encoded, err := options.Marshal(x.Scope) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ThirdPartyCaveat) - 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: ThirdPartyCaveat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ThirdPartyCaveat: 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 Scope", 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.Scope == nil { - x.Scope = &Permissions{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scope); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType) - } - x.Exp = 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.Exp |= int64(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 Cnf", 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.Cnf = 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 Aud", 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.Aud = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/models.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) -) - -// Alias defines a subject/origin pair -type Alias struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *Alias) Reset() { - *x = Alias{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Alias) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Alias) ProtoMessage() {} - -// Deprecated: Use Alias.ProtoReflect.Descriptor instead. -func (*Alias) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{0} -} - -func (x *Alias) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Alias) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Alias) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -type Credential struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - AttestationType string `protobuf:"bytes,2,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - Transport []string `protobuf:"bytes,6,rep,name=transport,proto3" json:"transport,omitempty"` - SignCount uint32 `protobuf:"varint,7,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"` - UserPresent bool `protobuf:"varint,8,opt,name=user_present,json=userPresent,proto3" json:"user_present,omitempty"` - UserVerified bool `protobuf:"varint,9,opt,name=user_verified,json=userVerified,proto3" json:"user_verified,omitempty"` - BackupEligible bool `protobuf:"varint,10,opt,name=backup_eligible,json=backupEligible,proto3" json:"backup_eligible,omitempty"` - BackupState bool `protobuf:"varint,11,opt,name=backup_state,json=backupState,proto3" json:"backup_state,omitempty"` - CloneWarning bool `protobuf:"varint,12,opt,name=clone_warning,json=cloneWarning,proto3" json:"clone_warning,omitempty"` -} - -func (x *Credential) Reset() { - *x = Credential{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Credential) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Credential) ProtoMessage() {} - -// Deprecated: Use Credential.ProtoReflect.Descriptor instead. -func (*Credential) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{1} -} - -func (x *Credential) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Credential) GetAttestationType() string { - if x != nil { - return x.AttestationType - } - return "" -} - -func (x *Credential) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Credential) GetCredentialId() []byte { - if x != nil { - return x.CredentialId - } - return nil -} - -func (x *Credential) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *Credential) GetTransport() []string { - if x != nil { - return x.Transport - } - return nil -} - -func (x *Credential) GetSignCount() uint32 { - if x != nil { - return x.SignCount - } - return 0 -} - -func (x *Credential) GetUserPresent() bool { - if x != nil { - return x.UserPresent - } - return false -} - -func (x *Credential) GetUserVerified() bool { - if x != nil { - return x.UserVerified - } - return false -} - -func (x *Credential) GetBackupEligible() bool { - if x != nil { - return x.BackupEligible - } - return false -} - -func (x *Credential) GetBackupState() bool { - if x != nil { - return x.BackupState - } - return false -} - -func (x *Credential) GetCloneWarning() bool { - if x != nil { - return x.CloneWarning - } - return false -} - -// Document defines a DID document -type Document 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"` // The DID of the controller - Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` - Service []string `protobuf:"bytes,7,rep,name=service,proto3" json:"service,omitempty"` -} - -func (x *Document) Reset() { - *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Document) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Document) ProtoMessage() {} - -// Deprecated: Use Document.ProtoReflect.Descriptor instead. -func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{2} -} - -func (x *Document) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Document) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Document) GetAuthentication() []string { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *Document) GetAssertionMethod() []string { - if x != nil { - return x.AssertionMethod - } - return nil -} - -func (x *Document) GetCapabilityDelegation() []string { - if x != nil { - return x.CapabilityDelegation - } - return nil -} - -func (x *Document) GetCapabilityInvocation() []string { - if x != nil { - return x.CapabilityInvocation - } - return nil -} - -func (x *Document) GetService() []string { - if x != nil { - return x.Service - } - return nil -} - -// Keyshare defines a keyshare from the MPC protocol -type Keyshare struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Payloads map[string][]byte `protobuf:"bytes,2,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"` - PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` - Role int32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` // 0 =none, 1 = validator, 2 = user -} - -func (x *Keyshare) Reset() { - *x = Keyshare{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Keyshare) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Keyshare) ProtoMessage() {} - -// Deprecated: Use Keyshare.ProtoReflect.Descriptor instead. -func (*Keyshare) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{3} -} - -func (x *Keyshare) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Keyshare) GetPayloads() map[string][]byte { - if x != nil { - return x.Payloads - } - return nil -} - -func (x *Keyshare) GetProtocol() string { - if x != nil { - return x.Protocol - } - return "" -} - -func (x *Keyshare) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *Keyshare) GetVersion() uint32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Keyshare) GetRole() int32 { - if x != nil { - return x.Role - } - return 0 -} - -// Permissions contains a list of grants and access control rules for -// a Service. -type Permissions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grants []DIDNamespace `protobuf:"varint,1,rep,packed,name=grants,proto3,enum=did.v1.DIDNamespace" json:"grants,omitempty"` - Scopes []PermissionScope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` -} - -func (x *Permissions) Reset() { - *x = Permissions{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Permissions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Permissions) ProtoMessage() {} - -// Deprecated: Use Permissions.ProtoReflect.Descriptor instead. -func (*Permissions) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{4} -} - -func (x *Permissions) GetGrants() []DIDNamespace { - if x != nil { - return x.Grants - } - return nil -} - -func (x *Permissions) GetScopes() []PermissionScope { - if x != nil { - return x.Scopes - } - return nil -} - -// PubKey defines a public key for a did -type PubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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"` - KeyType KeyType `protobuf:"varint,5,opt,name=key_type,json=keyType,proto3,enum=did.v1.KeyType" json:"key_type,omitempty"` - Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` - Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` -} - -func (x *PubKey) Reset() { - *x = PubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey) ProtoMessage() {} - -// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. -func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{5} -} - -func (x *PubKey) GetRole() KeyRole { - if x != nil { - return x.Role - } - return KeyRole_KEY_ROLE_UNSPECIFIED -} - -func (x *PubKey) GetAlgorithm() KeyAlgorithm { - if x != nil { - 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) GetCurve() KeyCurve { - if x != nil { - return x.Curve - } - return KeyCurve_KEY_CURVE_UNSPECIFIED -} - -func (x *PubKey) GetKeyType() KeyType { - if x != nil { - return x.KeyType - } - return KeyType_KEY_TYPE_UNSPECIFIED -} - -func (x *PubKey) GetRaw() []byte { - if x != nil { - return x.Raw - } - return nil -} - -func (x *PubKey) GetJwk() *PubKey_JWK { - if x != nil { - 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"` - ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - 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"` - Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (x *Service) Reset() { - *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[6] - 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{6} -} - -func (x *Service) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Service) GetServiceType() string { - if x != nil { - return x.ServiceType - } - return "" -} - -func (x *Service) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *Service) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Service) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Service) GetServiceEndpoints() map[string]string { - if x != nil { - return x.ServiceEndpoints - } - return nil -} - -func (x *Service) GetPermissions() *Permissions { - if x != nil { - return x.Permissions - } - return nil -} - -// ServicceInfo defines a Decentralized Service on the Sonr Blockchain -type ServiceInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` - Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` -} - -func (x *ServiceInfo) Reset() { - *x = ServiceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceInfo) ProtoMessage() {} - -// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead. -func (*ServiceInfo) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{7} -} - -func (x *ServiceInfo) GetExists() bool { - if x != nil { - return x.Exists - } - return false -} - -func (x *ServiceInfo) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *ServiceInfo) GetFingerprint() string { - if x != nil { - return x.Fingerprint - } - return "" -} - -func (x *ServiceInfo) GetService() *Service { - if x != nil { - return x.Service - } - return nil -} - -// FirstPartyCaveat defines a first party caveat -type FirstPartyCaveat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` - Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"` - Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"` - Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"` -} - -func (x *FirstPartyCaveat) Reset() { - *x = FirstPartyCaveat{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FirstPartyCaveat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FirstPartyCaveat) ProtoMessage() {} - -// Deprecated: Use FirstPartyCaveat.ProtoReflect.Descriptor instead. -func (*FirstPartyCaveat) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{8} -} - -func (x *FirstPartyCaveat) GetScope() *Permissions { - if x != nil { - return x.Scope - } - return nil -} - -func (x *FirstPartyCaveat) GetExp() int64 { - if x != nil { - return x.Exp - } - return 0 -} - -func (x *FirstPartyCaveat) GetCnf() string { - if x != nil { - return x.Cnf - } - return "" -} - -func (x *FirstPartyCaveat) GetAud() string { - if x != nil { - return x.Aud - } - return "" -} - -// ThirdPartyCaveat defines a third party caveat -type ThirdPartyCaveat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` - Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"` - Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"` - Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"` -} - -func (x *ThirdPartyCaveat) Reset() { - *x = ThirdPartyCaveat{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ThirdPartyCaveat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ThirdPartyCaveat) ProtoMessage() {} - -// Deprecated: Use ThirdPartyCaveat.ProtoReflect.Descriptor instead. -func (*ThirdPartyCaveat) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{9} -} - -func (x *ThirdPartyCaveat) GetScope() *Permissions { - if x != nil { - return x.Scope - } - return nil -} - -func (x *ThirdPartyCaveat) GetExp() int64 { - if x != nil { - return x.Exp - } - return 0 -} - -func (x *ThirdPartyCaveat) GetCnf() string { - if x != nil { - return x.Cnf - } - return "" -} - -func (x *ThirdPartyCaveat) GetAud() string { - if x != nil { - return x.Aud - } - return "" -} - -// JWK represents a JSON Web Key -type PubKey_JWK struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type - Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys) - X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys) - Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys) - N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys) - E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys) -} - -func (x *PubKey_JWK) Reset() { - *x = PubKey_JWK{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey_JWK) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey_JWK) ProtoMessage() {} - -// Deprecated: Use PubKey_JWK.ProtoReflect.Descriptor instead. -func (*PubKey_JWK) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *PubKey_JWK) GetKty() string { - if x != nil { - return x.Kty - } - return "" -} - -func (x *PubKey_JWK) GetCrv() string { - if x != nil { - return x.Crv - } - return "" -} - -func (x *PubKey_JWK) GetX() string { - if x != nil { - return x.X - } - return "" -} - -func (x *PubKey_JWK) GetY() string { - if x != nil { - return x.Y - } - return "" -} - -func (x *PubKey_JWK) GetN() string { - if x != nil { - return x.N - } - return "" -} - -func (x *PubKey_JWK) GetE() string { - if x != nil { - return x.E - } - return "" -} - -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, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x05, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 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, 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, 0x22, 0xa3, 0x03, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, - 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 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, 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, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x65, - 0x73, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, - 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, - 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x77, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6c, - 0x6f, 0x6e, 0x65, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x91, 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, 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, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, 0x04, 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, 0x05, 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, 0x06, 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, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xe5, - 0x02, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 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, 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, 0x03, 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, 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, 0x2a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 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, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, - 0x24, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x57, 0x4b, - 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x1a, 0x61, 0x0a, 0x03, 0x4a, 0x57, 0x4b, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, 0x76, - 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, - 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0xe4, 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, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 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, 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, - 0x52, 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, 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, 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, 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, 0x22, - 0x8a, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, - 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 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, 0x73, 0x0a, 0x10, - 0x46, 0x69, 0x72, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, - 0x12, 0x29, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 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, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6e, 0x66, 0x12, - 0x10, 0x0a, 0x03, 0x61, 0x75, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x75, - 0x64, 0x22, 0x73, 0x0a, 0x10, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, - 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, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, - 0x78, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x63, 0x6e, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x75, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x61, 0x75, 0x64, 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 ( - file_did_v1_models_proto_rawDescOnce sync.Once - file_did_v1_models_proto_rawDescData = file_did_v1_models_proto_rawDesc -) - -func file_did_v1_models_proto_rawDescGZIP() []byte { - file_did_v1_models_proto_rawDescOnce.Do(func() { - file_did_v1_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_models_proto_rawDescData) - }) - return file_did_v1_models_proto_rawDescData -} - -var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_did_v1_models_proto_goTypes = []interface{}{ - (*Alias)(nil), // 0: did.v1.Alias - (*Credential)(nil), // 1: did.v1.Credential - (*Document)(nil), // 2: did.v1.Document - (*Keyshare)(nil), // 3: did.v1.Keyshare - (*Permissions)(nil), // 4: did.v1.Permissions - (*PubKey)(nil), // 5: did.v1.PubKey - (*Service)(nil), // 6: did.v1.Service - (*ServiceInfo)(nil), // 7: did.v1.ServiceInfo - (*FirstPartyCaveat)(nil), // 8: did.v1.FirstPartyCaveat - (*ThirdPartyCaveat)(nil), // 9: did.v1.ThirdPartyCaveat - nil, // 10: did.v1.Keyshare.MetadataEntry - nil, // 11: did.v1.Keyshare.PayloadsEntry - (*PubKey_JWK)(nil), // 12: did.v1.PubKey.JWK - nil, // 13: did.v1.Service.ServiceEndpointsEntry - (DIDNamespace)(0), // 14: did.v1.DIDNamespace - (PermissionScope)(0), // 15: did.v1.PermissionScope - (KeyRole)(0), // 16: did.v1.KeyRole - (KeyAlgorithm)(0), // 17: did.v1.KeyAlgorithm - (KeyEncoding)(0), // 18: did.v1.KeyEncoding - (KeyCurve)(0), // 19: did.v1.KeyCurve - (KeyType)(0), // 20: did.v1.KeyType -} -var file_did_v1_models_proto_depIdxs = []int32{ - 10, // 0: did.v1.Keyshare.metadata:type_name -> did.v1.Keyshare.MetadataEntry - 11, // 1: did.v1.Keyshare.payloads:type_name -> did.v1.Keyshare.PayloadsEntry - 14, // 2: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace - 15, // 3: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope - 16, // 4: did.v1.PubKey.role:type_name -> did.v1.KeyRole - 17, // 5: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm - 18, // 6: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding - 19, // 7: did.v1.PubKey.curve:type_name -> did.v1.KeyCurve - 20, // 8: did.v1.PubKey.key_type:type_name -> did.v1.KeyType - 12, // 9: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JWK - 13, // 10: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry - 4, // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions - 6, // 12: did.v1.ServiceInfo.service:type_name -> did.v1.Service - 4, // 13: did.v1.FirstPartyCaveat.scope:type_name -> did.v1.Permissions - 4, // 14: did.v1.ThirdPartyCaveat.scope:type_name -> did.v1.Permissions - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_did_v1_models_proto_init() } -func file_did_v1_models_proto_init() { - if File_did_v1_models_proto != nil { - return - } - 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.(*Alias); 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[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Credential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Keyshare); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Permissions); 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[5].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[6].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[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceInfo); 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[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FirstPartyCaveat); 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.(*ThirdPartyCaveat); 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[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey_JWK); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_models_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_models_proto_goTypes, - DependencyIndexes: file_did_v1_models_proto_depIdxs, - MessageInfos: file_did_v1_models_proto_msgTypes, - }.Build() - File_did_v1_models_proto = out.File - file_did_v1_models_proto_rawDesc = nil - file_did_v1_models_proto_goTypes = nil - file_did_v1_models_proto_depIdxs = nil -} diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index f3ca4e4e9..1a3a88011 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -10,7 +10,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" - sort "sort" sync "sync" ) @@ -631,7 +630,6 @@ var ( fd_QueryResponse_success protoreflect.FieldDescriptor fd_QueryResponse_query protoreflect.FieldDescriptor fd_QueryResponse_document protoreflect.FieldDescriptor - fd_QueryResponse_service protoreflect.FieldDescriptor fd_QueryResponse_params protoreflect.FieldDescriptor ) @@ -641,7 +639,6 @@ func init() { fd_QueryResponse_success = md_QueryResponse.Fields().ByName("success") fd_QueryResponse_query = md_QueryResponse.Fields().ByName("query") fd_QueryResponse_document = md_QueryResponse.Fields().ByName("document") - fd_QueryResponse_service = md_QueryResponse.Fields().ByName("service") fd_QueryResponse_params = md_QueryResponse.Fields().ByName("params") } @@ -728,12 +725,6 @@ func (x *fastReflection_QueryResponse) Range(f func(protoreflect.FieldDescriptor return } } - if x.Service != nil { - value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - if !f(fd_QueryResponse_service, value) { - return - } - } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryResponse_params, value) { @@ -761,8 +752,6 @@ func (x *fastReflection_QueryResponse) Has(fd protoreflect.FieldDescriptor) bool return x.Query != "" case "did.v1.QueryResponse.document": return x.Document != nil - case "did.v1.QueryResponse.service": - return x.Service != nil case "did.v1.QueryResponse.params": return x.Params != nil default: @@ -787,8 +776,6 @@ func (x *fastReflection_QueryResponse) Clear(fd protoreflect.FieldDescriptor) { x.Query = "" case "did.v1.QueryResponse.document": x.Document = nil - case "did.v1.QueryResponse.service": - x.Service = nil case "did.v1.QueryResponse.params": x.Params = nil default: @@ -816,9 +803,6 @@ func (x *fastReflection_QueryResponse) Get(descriptor protoreflect.FieldDescript case "did.v1.QueryResponse.document": value := x.Document return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.QueryResponse.service": - value := x.Service - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "did.v1.QueryResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -848,8 +832,6 @@ func (x *fastReflection_QueryResponse) Set(fd protoreflect.FieldDescriptor, valu x.Query = value.Interface().(string) case "did.v1.QueryResponse.document": x.Document = value.Message().Interface().(*Document) - case "did.v1.QueryResponse.service": - x.Service = value.Message().Interface().(*ServiceInfo) case "did.v1.QueryResponse.params": x.Params = value.Message().Interface().(*Params) default: @@ -877,11 +859,6 @@ func (x *fastReflection_QueryResponse) Mutable(fd protoreflect.FieldDescriptor) x.Document = new(Document) } return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) - case "did.v1.QueryResponse.service": - if x.Service == nil { - x.Service = new(ServiceInfo) - } - return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) case "did.v1.QueryResponse.params": if x.Params == nil { x.Params = new(Params) @@ -911,9 +888,6 @@ func (x *fastReflection_QueryResponse) NewField(fd protoreflect.FieldDescriptor) case "did.v1.QueryResponse.document": m := new(Document) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.QueryResponse.service": - m := new(ServiceInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.QueryResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -997,10 +971,6 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { l = options.Size(x.Document) 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.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) @@ -1048,20 +1018,6 @@ func (x *fastReflection_QueryResponse) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x2a } - 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] = 0x22 - } if x.Document != nil { encoded, err := options.Marshal(x.Document) if err != nil { @@ -1230,42 +1186,6 @@ func (x *fastReflection_QueryResponse) 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 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 = &ServiceInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); 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 Params", wireType) @@ -1772,77 +1692,26 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.List = (*_QueryParamsAssetsResponse_1_list)(nil) - -type _QueryParamsAssetsResponse_1_list struct { - list *[]*AssetInfo -} - -func (x *_QueryParamsAssetsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryParamsAssetsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AssetInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryParamsAssetsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AssetInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryParamsAssetsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(AssetInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryParamsAssetsResponse_1_list) NewElement() protoreflect.Value { - v := new(AssetInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryParamsAssetsResponse protoreflect.MessageDescriptor - fd_QueryParamsAssetsResponse_assets protoreflect.FieldDescriptor + md_QueryResolveResponse protoreflect.MessageDescriptor + fd_QueryResolveResponse_document protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryParamsAssetsResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsAssetsResponse") - fd_QueryParamsAssetsResponse_assets = md_QueryParamsAssetsResponse.Fields().ByName("assets") + md_QueryResolveResponse = File_did_v1_query_proto.Messages().ByName("QueryResolveResponse") + fd_QueryResolveResponse_document = md_QueryResolveResponse.Fields().ByName("document") } -var _ protoreflect.Message = (*fastReflection_QueryParamsAssetsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryResolveResponse)(nil) -type fastReflection_QueryParamsAssetsResponse QueryParamsAssetsResponse +type fastReflection_QueryResolveResponse QueryResolveResponse -func (x *QueryParamsAssetsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsAssetsResponse)(x) +func (x *QueryResolveResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolveResponse)(x) } -func (x *QueryParamsAssetsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryResolveResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1854,43 +1723,43 @@ func (x *QueryParamsAssetsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsAssetsResponse_messageType fastReflection_QueryParamsAssetsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsAssetsResponse_messageType{} +var _fastReflection_QueryResolveResponse_messageType fastReflection_QueryResolveResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolveResponse_messageType{} -type fastReflection_QueryParamsAssetsResponse_messageType struct{} +type fastReflection_QueryResolveResponse_messageType struct{} -func (x fastReflection_QueryParamsAssetsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsAssetsResponse)(nil) +func (x fastReflection_QueryResolveResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolveResponse)(nil) } -func (x fastReflection_QueryParamsAssetsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsAssetsResponse) +func (x fastReflection_QueryResolveResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolveResponse) } -func (x fastReflection_QueryParamsAssetsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsAssetsResponse +func (x fastReflection_QueryResolveResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolveResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsAssetsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsAssetsResponse +func (x *fastReflection_QueryResolveResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolveResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsAssetsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsAssetsResponse_messageType +func (x *fastReflection_QueryResolveResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryResolveResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsAssetsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsAssetsResponse) +func (x *fastReflection_QueryResolveResponse) New() protoreflect.Message { + return new(fastReflection_QueryResolveResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsAssetsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsAssetsResponse)(x) +func (x *fastReflection_QueryResolveResponse) Interface() protoreflect.ProtoMessage { + return (*QueryResolveResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1898,10 +1767,10 @@ func (x *fastReflection_QueryParamsAssetsResponse) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryParamsAssetsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Assets) != 0 { - value := protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{list: &x.Assets}) - if !f(fd_QueryParamsAssetsResponse_assets, value) { +func (x *fastReflection_QueryResolveResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Document != nil { + value := protoreflect.ValueOfMessage(x.Document.ProtoReflect()) + if !f(fd_QueryResolveResponse_document, value) { return } } @@ -1918,15 +1787,15 @@ func (x *fastReflection_QueryParamsAssetsResponse) Range(f func(protoreflect.Fie // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsAssetsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryResolveResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - return len(x.Assets) != 0 + case "did.v1.QueryResolveResponse.document": + return x.Document != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", fd.FullName())) } } @@ -1936,15 +1805,15 @@ func (x *fastReflection_QueryParamsAssetsResponse) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsAssetsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryResolveResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - x.Assets = nil + case "did.v1.QueryResolveResponse.document": + x.Document = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", fd.FullName())) } } @@ -1954,1141 +1823,16 @@ func (x *fastReflection_QueryParamsAssetsResponse) Clear(fd protoreflect.FieldDe // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsAssetsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryResolveResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - if len(x.Assets) == 0 { - return protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{}) - } - listValue := &_QueryParamsAssetsResponse_1_list{list: &x.Assets} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsAssetsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - lv := value.List() - clv := lv.(*_QueryParamsAssetsResponse_1_list) - x.Assets = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsAssetsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - if x.Assets == nil { - x.Assets = []*AssetInfo{} - } - value := &_QueryParamsAssetsResponse_1_list{list: &x.Assets} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsAssetsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - list := []*AssetInfo{} - return protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsAssetsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsAssetsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsAssetsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsAssetsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsAssetsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsAssetsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsAssetsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Assets) > 0 { - for _, e := range x.Assets { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsAssetsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Assets) > 0 { - for iNdEx := len(x.Assets) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Assets[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsAssetsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsAssetsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsAssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Assets = append(x.Assets, &AssetInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Assets[len(x.Assets)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.Map = (*_QueryParamsKeysResponse_1_map)(nil) - -type _QueryParamsKeysResponse_1_map struct { - m *map[string]*KeyInfo -} - -func (x *_QueryParamsKeysResponse_1_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_QueryParamsKeysResponse_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_QueryParamsKeysResponse_1_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_QueryParamsKeysResponse_1_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_QueryParamsKeysResponse_1_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*KeyInfo) - (*x.m)[concreteKey] = concreteValue -} - -func (x *_QueryParamsKeysResponse_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if ok { - return protoreflect.ValueOfMessage(v.ProtoReflect()) - } - newValue := new(KeyInfo) - (*x.m)[concreteKey] = newValue - return protoreflect.ValueOfMessage(newValue.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_1_map) NewValue() protoreflect.Value { - v := new(KeyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_1_map) IsValid() bool { - return x.m != nil -} - -var ( - md_QueryParamsKeysResponse protoreflect.MessageDescriptor - fd_QueryParamsKeysResponse_keys protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsKeysResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsKeysResponse") - fd_QueryParamsKeysResponse_keys = md_QueryParamsKeysResponse.Fields().ByName("keys") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsKeysResponse)(nil) - -type fastReflection_QueryParamsKeysResponse QueryParamsKeysResponse - -func (x *QueryParamsKeysResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsKeysResponse)(x) -} - -func (x *QueryParamsKeysResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[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_QueryParamsKeysResponse_messageType fastReflection_QueryParamsKeysResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsKeysResponse_messageType{} - -type fastReflection_QueryParamsKeysResponse_messageType struct{} - -func (x fastReflection_QueryParamsKeysResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsKeysResponse)(nil) -} -func (x fastReflection_QueryParamsKeysResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsKeysResponse) -} -func (x fastReflection_QueryParamsKeysResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsKeysResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsKeysResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsKeysResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsKeysResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsKeysResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsKeysResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsKeysResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsKeysResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsKeysResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsKeysResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Keys) != 0 { - value := protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{m: &x.Keys}) - if !f(fd_QueryParamsKeysResponse_keys, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsKeysResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - return len(x.Keys) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsKeysResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - x.Keys = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsKeysResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - if len(x.Keys) == 0 { - return protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{}) - } - mapValue := &_QueryParamsKeysResponse_1_map{m: &x.Keys} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsKeysResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - mv := value.Map() - cmv := mv.(*_QueryParamsKeysResponse_1_map) - x.Keys = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsKeysResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - if x.Keys == nil { - x.Keys = make(map[string]*KeyInfo) - } - value := &_QueryParamsKeysResponse_1_map{m: &x.Keys} - return protoreflect.ValueOfMap(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsKeysResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - m := make(map[string]*KeyInfo) - return protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsKeysResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsKeysResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsKeysResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsKeysResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsKeysResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsKeysResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsKeysResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Keys) > 0 { - SiZeMaP := func(k string, v *KeyInfo) { - l := 0 - if v != nil { - l = options.Size(v) - } - l += 1 + runtime.Sov(uint64(l)) - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Keys)) - for k := range x.Keys { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Keys[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Keys { - SiZeMaP(k, v) - } - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsKeysResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Keys) > 0 { - MaRsHaLmAp := func(k string, v *KeyInfo) (protoiface.MarshalOutput, error) { - baseI := i - encoded, err := options.Marshal(v) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForKeys := make([]string, 0, len(x.Keys)) - for k := range x.Keys { - keysForKeys = append(keysForKeys, string(k)) - } - sort.Slice(keysForKeys, func(i, j int) bool { - return keysForKeys[i] < keysForKeys[j] - }) - for iNdEx := len(keysForKeys) - 1; iNdEx >= 0; iNdEx-- { - v := x.Keys[string(keysForKeys[iNdEx])] - out, err := MaRsHaLmAp(keysForKeys[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Keys { - v := x.Keys[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsKeysResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsKeysResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Keys == nil { - x.Keys = make(map[string]*KeyInfo) - } - var mapkey string - var mapvalue *KeyInfo - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postmsgIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = &KeyInfo{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Keys[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsByKeyResponse protoreflect.MessageDescriptor - fd_QueryParamsByKeyResponse_key protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsByKeyResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsByKeyResponse") - fd_QueryParamsByKeyResponse_key = md_QueryParamsByKeyResponse.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsByKeyResponse)(nil) - -type fastReflection_QueryParamsByKeyResponse QueryParamsByKeyResponse - -func (x *QueryParamsByKeyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsByKeyResponse)(x) -} - -func (x *QueryParamsByKeyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[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_QueryParamsByKeyResponse_messageType fastReflection_QueryParamsByKeyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsByKeyResponse_messageType{} - -type fastReflection_QueryParamsByKeyResponse_messageType struct{} - -func (x fastReflection_QueryParamsByKeyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsByKeyResponse)(nil) -} -func (x fastReflection_QueryParamsByKeyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsByKeyResponse) -} -func (x fastReflection_QueryParamsByKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByKeyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsByKeyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByKeyResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsByKeyResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsByKeyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsByKeyResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsByKeyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsByKeyResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsByKeyResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsByKeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != nil { - value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) - if !f(fd_QueryParamsByKeyResponse_key, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsByKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - return x.Key != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByKeyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsByKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - value := x.Key + case "did.v1.QueryResolveResponse.document": + value := x.Document return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", descriptor.FullName())) } } @@ -3102,15 +1846,15 @@ func (x *fastReflection_QueryParamsByKeyResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByKeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryResolveResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - x.Key = value.Message().Interface().(*KeyInfo) + case "did.v1.QueryResolveResponse.document": + x.Document = value.Message().Interface().(*Document) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", fd.FullName())) } } @@ -3124,44 +1868,44 @@ func (x *fastReflection_QueryParamsByKeyResponse) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryResolveResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - if x.Key == nil { - x.Key = new(KeyInfo) + case "did.v1.QueryResolveResponse.document": + if x.Document == nil { + x.Document = new(Document) } - return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsByKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryResolveResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - m := new(KeyInfo) + case "did.v1.QueryResolveResponse.document": + m := new(Document) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryResolveResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsByKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryResolveResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsByKeyResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryResolveResponse", d.FullName())) } panic("unreachable") } @@ -3169,7 +1913,7 @@ func (x *fastReflection_QueryParamsByKeyResponse) WhichOneof(d protoreflect.Oneo // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsByKeyResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryResolveResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3180,7 +1924,7 @@ func (x *fastReflection_QueryParamsByKeyResponse) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByKeyResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryResolveResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3192,7 +1936,7 @@ func (x *fastReflection_QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse) IsValid() bool { +func (x *fastReflection_QueryResolveResponse) IsValid() bool { return x != nil } @@ -3202,9 +1946,9 @@ func (x *fastReflection_QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsByKeyResponse) + x := input.Message.Interface().(*QueryResolveResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3216,8 +1960,8 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met var n int var l int _ = l - if x.Key != nil { - l = options.Size(x.Key) + if x.Document != nil { + l = options.Size(x.Document) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -3230,7 +1974,7 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsByKeyResponse) + x := input.Message.Interface().(*QueryResolveResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3249,8 +1993,8 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Key != nil { - encoded, err := options.Marshal(x.Key) + if x.Document != nil { + encoded, err := options.Marshal(x.Document) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3274,7 +2018,7 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsByKeyResponse) + x := input.Message.Interface().(*QueryResolveResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3306,15 +2050,15 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsByKeyResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolveResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsByKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolveResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3341,10 +2085,10 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Key == nil { - x.Key = &KeyInfo{} + if x.Document == nil { + x.Document = &Document{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Document); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -3384,26 +2128,26 @@ func (x *fastReflection_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Met } var ( - md_QueryParamsByAssetResponse protoreflect.MessageDescriptor - fd_QueryParamsByAssetResponse_asset protoreflect.FieldDescriptor + md_SyncRequest protoreflect.MessageDescriptor + fd_SyncRequest_did protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryParamsByAssetResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsByAssetResponse") - fd_QueryParamsByAssetResponse_asset = md_QueryParamsByAssetResponse.Fields().ByName("asset") + md_SyncRequest = File_did_v1_query_proto.Messages().ByName("SyncRequest") + fd_SyncRequest_did = md_SyncRequest.Fields().ByName("did") } -var _ protoreflect.Message = (*fastReflection_QueryParamsByAssetResponse)(nil) +var _ protoreflect.Message = (*fastReflection_SyncRequest)(nil) -type fastReflection_QueryParamsByAssetResponse QueryParamsByAssetResponse +type fastReflection_SyncRequest SyncRequest -func (x *QueryParamsByAssetResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsByAssetResponse)(x) +func (x *SyncRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncRequest)(x) } -func (x *QueryParamsByAssetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[6] +func (x *SyncRequest) 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 { @@ -3414,52 +2158,43 @@ func (x *QueryParamsByAssetResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsByAssetResponse_messageType fastReflection_QueryParamsByAssetResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsByAssetResponse_messageType{} +var _fastReflection_SyncRequest_messageType fastReflection_SyncRequest_messageType +var _ protoreflect.MessageType = fastReflection_SyncRequest_messageType{} -type fastReflection_QueryParamsByAssetResponse_messageType struct{} +type fastReflection_SyncRequest_messageType struct{} -func (x fastReflection_QueryParamsByAssetResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsByAssetResponse)(nil) +func (x fastReflection_SyncRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncRequest)(nil) } -func (x fastReflection_QueryParamsByAssetResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsByAssetResponse) +func (x fastReflection_SyncRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SyncRequest) } -func (x fastReflection_QueryParamsByAssetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByAssetResponse +func (x fastReflection_SyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsByAssetResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByAssetResponse +func (x *fastReflection_SyncRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsByAssetResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsByAssetResponse_messageType +func (x *fastReflection_SyncRequest) Type() protoreflect.MessageType { + return _fastReflection_SyncRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsByAssetResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsByAssetResponse) -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) +func (x *fastReflection_SyncRequest) New() protoreflect.Message { + return new(fastReflection_SyncRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsByAssetResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsByAssetResponse)(x) -func (x *fastReflection_QueryServiceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryServiceRequest)(x) +func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { + return (*SyncRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -3467,14 +2202,10 @@ func (x *fastReflection_QueryServiceRequest) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryParamsByAssetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Asset != nil { - value := protoreflect.ValueOfMessage(x.Asset.ProtoReflect()) - if !f(fd_QueryParamsByAssetResponse_asset, value) { -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) { +func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_SyncRequest_did, value) { return } } @@ -3491,24 +2222,15 @@ func (x *fastReflection_QueryServiceRequest) Range(f func(protoreflect.FieldDesc // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsByAssetResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - return x.Asset != nil + case "did.v1.SyncRequest.did": + return x.Did != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", fd.FullName())) -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())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -3518,24 +2240,15 @@ func (x *fastReflection_QueryServiceRequest) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByAssetResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - x.Asset = nil + case "did.v1.SyncRequest.did": + x.Did = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", fd.FullName())) -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())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -3545,26 +2258,16 @@ func (x *fastReflection_QueryServiceRequest) Clear(fd protoreflect.FieldDescript // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsByAssetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - value := x.Asset - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", descriptor.FullName())) -func (x *fastReflection_QueryServiceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryServiceRequest.origin": - value := x.Origin + case "did.v1.SyncRequest.did": + value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", descriptor.FullName())) } } @@ -3578,24 +2281,15 @@ func (x *fastReflection_QueryServiceRequest) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsByAssetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_SyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - x.Asset = value.Message().Interface().(*AssetInfo) + case "did.v1.SyncRequest.did": + x.Did = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", fd.FullName())) -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())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", fd.FullName())) } } @@ -3609,66 +2303,40 @@ func (x *fastReflection_QueryServiceRequest) 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_QueryParamsByAssetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - if x.Asset == nil { - x.Asset = new(AssetInfo) - } - return protoreflect.ValueOfMessage(x.Asset.ProtoReflect()) + case "did.v1.SyncRequest.did": + panic(fmt.Errorf("field did of message did.v1.SyncRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", fd.FullName())) -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())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsByAssetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - m := new(AssetInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse does not contain field %s", fd.FullName())) -func (x *fastReflection_QueryServiceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": + case "did.v1.SyncRequest.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) } - panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.SyncRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsByAssetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsByAssetResponse", d.FullName())) -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(fmt.Errorf("%s is not a oneof field in did.v1.SyncRequest", d.FullName())) } panic("unreachable") } @@ -3676,8 +2344,7 @@ func (x *fastReflection_QueryServiceRequest) WhichOneof(d protoreflect.OneofDesc // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsByAssetResponse) GetUnknown() protoreflect.RawFields { -func (x *fastReflection_QueryServiceRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3688,8 +2355,7 @@ func (x *fastReflection_QueryServiceRequest) 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_QueryParamsByAssetResponse) SetUnknown(fields protoreflect.RawFields) { -func (x *fastReflection_QueryServiceRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3701,8 +2367,7 @@ func (x *fastReflection_QueryServiceRequest) SetUnknown(fields protoreflect.RawF // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsByAssetResponse) IsValid() bool { -func (x *fastReflection_QueryServiceRequest) IsValid() bool { +func (x *fastReflection_SyncRequest) IsValid() bool { return x != nil } @@ -3712,12 +2377,9 @@ func (x *fastReflection_QueryServiceRequest) 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_QueryParamsByAssetResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsByAssetResponse) -func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServiceRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3729,9 +2391,7 @@ func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.Asset != nil { - l = options.Size(x.Asset) - l = len(x.Origin) + l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3745,8 +2405,7 @@ func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsByAssetResponse) - x := input.Message.Interface().(*QueryServiceRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3765,21 +2424,10 @@ func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Asset != nil { - encoded, err := options.Marshal(x.Asset) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + 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 } @@ -3794,8 +2442,7 @@ func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsByAssetResponse) - x := input.Message.Interface().(*QueryServiceRequest) + x := input.Message.Interface().(*SyncRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3827,620 +2474,15 @@ func (x *fastReflection_QueryServiceRequest) 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: QueryParamsByAssetResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsByAssetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Asset == nil { - x.Asset = &AssetInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Asset); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - 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.List = (*_QueryRegistrationOptionsByKeyResponse_1_list)(nil) - -type _QueryRegistrationOptionsByKeyResponse_1_list struct { - list *[]string -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryRegistrationOptionsByKeyResponse at list field RegistrationOptions as it is not of Message kind")) -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_QueryRegistrationOptionsByKeyResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryRegistrationOptionsByKeyResponse protoreflect.MessageDescriptor - fd_QueryRegistrationOptionsByKeyResponse_registration_options protoreflect.FieldDescriptor - md_QueryServiceResponse protoreflect.MessageDescriptor - fd_QueryServiceResponse_options protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryRegistrationOptionsByKeyResponse = File_did_v1_query_proto.Messages().ByName("QueryRegistrationOptionsByKeyResponse") - fd_QueryRegistrationOptionsByKeyResponse_registration_options = md_QueryRegistrationOptionsByKeyResponse.Fields().ByName("registration_options") -} - -var _ protoreflect.Message = (*fastReflection_QueryRegistrationOptionsByKeyResponse)(nil) - -type fastReflection_QueryRegistrationOptionsByKeyResponse QueryRegistrationOptionsByKeyResponse - -func (x *QueryRegistrationOptionsByKeyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryRegistrationOptionsByKeyResponse)(x) -} - -func (x *QueryRegistrationOptionsByKeyResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[7] - md_QueryServiceResponse = File_did_v1_query_proto.Messages().ByName("QueryServiceResponse") - fd_QueryServiceResponse_options = md_QueryServiceResponse.Fields().ByName("options") -} - -var _ protoreflect.Message = (*fastReflection_QueryServiceResponse)(nil) - -type fastReflection_QueryServiceResponse QueryServiceResponse - -func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryServiceResponse)(x) -} - -func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryRegistrationOptionsByKeyResponse_messageType fastReflection_QueryRegistrationOptionsByKeyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryRegistrationOptionsByKeyResponse_messageType{} - -type fastReflection_QueryRegistrationOptionsByKeyResponse_messageType struct{} - -func (x fastReflection_QueryRegistrationOptionsByKeyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryRegistrationOptionsByKeyResponse)(nil) -} -func (x fastReflection_QueryRegistrationOptionsByKeyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryRegistrationOptionsByKeyResponse) -} -func (x fastReflection_QueryRegistrationOptionsByKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegistrationOptionsByKeyResponse -var _fastReflection_QueryServiceResponse_messageType fastReflection_QueryServiceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryServiceResponse_messageType{} - -type fastReflection_QueryServiceResponse_messageType struct{} - -func (x fastReflection_QueryServiceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryServiceResponse)(nil) -} -func (x fastReflection_QueryServiceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryServiceResponse) -} -func (x fastReflection_QueryServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryRegistrationOptionsByKeyResponse -func (x *fastReflection_QueryServiceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryRegistrationOptionsByKeyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) New() protoreflect.Message { - return new(fastReflection_QueryRegistrationOptionsByKeyResponse) -func (x *fastReflection_QueryServiceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryServiceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryServiceResponse) New() protoreflect.Message { - return new(fastReflection_QueryServiceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) Interface() protoreflect.ProtoMessage { - return (*QueryRegistrationOptionsByKeyResponse)(x) -func (x *fastReflection_QueryServiceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryServiceResponse)(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_QueryRegistrationOptionsByKeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.RegistrationOptions) != 0 { - value := protoreflect.ValueOfList(&_QueryRegistrationOptionsByKeyResponse_1_list{list: &x.RegistrationOptions}) - if !f(fd_QueryRegistrationOptionsByKeyResponse_registration_options, value) { -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) { - 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_QueryRegistrationOptionsByKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - return len(x.RegistrationOptions) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", fd.FullName())) -func (x *fastReflection_QueryServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - return x.Options != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryRegistrationOptionsByKeyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - x.RegistrationOptions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", fd.FullName())) -func (x *fastReflection_QueryServiceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - x.Options = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryRegistrationOptionsByKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - if len(x.RegistrationOptions) == 0 { - return protoreflect.ValueOfList(&_QueryRegistrationOptionsByKeyResponse_1_list{}) - } - listValue := &_QueryRegistrationOptionsByKeyResponse_1_list{list: &x.RegistrationOptions} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", descriptor.FullName())) -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) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryRegistrationOptionsByKeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - lv := value.List() - clv := lv.(*_QueryRegistrationOptionsByKeyResponse_1_list) - x.RegistrationOptions = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", fd.FullName())) -func (x *fastReflection_QueryServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - x.Options = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse 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_QueryRegistrationOptionsByKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - if x.RegistrationOptions == nil { - x.RegistrationOptions = []string{} - } - value := &_QueryRegistrationOptionsByKeyResponse_1_list{list: &x.RegistrationOptions} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", fd.FullName())) -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")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryRegistrationOptionsByKeyResponse.registration_options": - list := []string{} - return protoreflect.ValueOfList(&_QueryRegistrationOptionsByKeyResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRegistrationOptionsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryRegistrationOptionsByKeyResponse does not contain field %s", fd.FullName())) -func (x *fastReflection_QueryServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) - } - panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryRegistrationOptionsByKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryRegistrationOptionsByKeyResponse", d.FullName())) -func (x *fastReflection_QueryServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceResponse", 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_QueryRegistrationOptionsByKeyResponse) GetUnknown() protoreflect.RawFields { -func (x *fastReflection_QueryServiceResponse) 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_QueryRegistrationOptionsByKeyResponse) SetUnknown(fields protoreflect.RawFields) { -func (x *fastReflection_QueryServiceResponse) 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_QueryRegistrationOptionsByKeyResponse) IsValid() bool { -func (x *fastReflection_QueryServiceResponse) 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_QueryRegistrationOptionsByKeyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryRegistrationOptionsByKeyResponse) -func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServiceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.RegistrationOptions) > 0 { - for _, s := range x.RegistrationOptions { - 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().(*QueryRegistrationOptionsByKeyResponse) - x := input.Message.Interface().(*QueryServiceResponse) - 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.RegistrationOptions) > 0 { - for iNdEx := len(x.RegistrationOptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.RegistrationOptions[iNdEx]) - copy(dAtA[i:], x.RegistrationOptions[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RegistrationOptions[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryRegistrationOptionsByKeyResponse) - x := input.Message.Interface().(*QueryServiceResponse) - 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: QueryRegistrationOptionsByKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRegistrationOptionsByKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: 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 RegistrationOptions", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4468,7 +2510,7 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.RegistrationOptions = append(x.RegistrationOptions, string(dAtA[iNdEx:postIndex])) + x.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4505,6 +2547,416 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_SyncResponse protoreflect.MessageDescriptor + fd_SyncResponse_success protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_SyncResponse = File_did_v1_query_proto.Messages().ByName("SyncResponse") + fd_SyncResponse_success = md_SyncResponse.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_SyncResponse)(nil) + +type fastReflection_SyncResponse SyncResponse + +func (x *SyncResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncResponse)(x) +} + +func (x *SyncResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[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_SyncResponse_messageType fastReflection_SyncResponse_messageType +var _ protoreflect.MessageType = fastReflection_SyncResponse_messageType{} + +type fastReflection_SyncResponse_messageType struct{} + +func (x fastReflection_SyncResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncResponse)(nil) +} +func (x fastReflection_SyncResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SyncResponse) +} +func (x fastReflection_SyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_SyncResponse) Type() protoreflect.MessageType { + return _fastReflection_SyncResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncResponse) New() protoreflect.Message { + return new(fastReflection_SyncResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { + return (*SyncResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_SyncResponse_success, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.SyncResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + panic(fmt.Errorf("field success of message did.v1.SyncResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_SyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.SyncResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_SyncResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*SyncResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*SyncResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4584,11 +3036,10 @@ type QueryResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` - Service *ServiceInfo `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryResponse) Reset() { @@ -4632,13 +3083,6 @@ func (x *QueryResponse) GetDocument() *Document { return nil } -func (x *QueryResponse) GetService() *ServiceInfo { - if x != nil { - return x.Service - } - return nil -} - func (x *QueryResponse) GetParams() *Params { if x != nil { return x.Params @@ -4652,6 +3096,7 @@ type QueryParamsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // params defines the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -4682,59 +3127,18 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -type QueryParamsAssetsResponse struct { -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -type QueryAccountsRequest struct { +// QueryResolveResponse is the response type for the Query/Resolve RPC method. +type QueryResolveResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Assets []*AssetInfo `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` + // document is the DID document + Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` } -func (x *QueryParamsAssetsResponse) Reset() { - *x = QueryParamsAssetsResponse{} - 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 - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` -} - -func (x *QueryAccountsResponse) Reset() { - *x = QueryAccountsResponse{} +func (x *QueryResolveResponse) Reset() { + *x = QueryResolveResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4742,49 +3146,35 @@ func (x *QueryAccountsResponse) Reset() { } } -func (x *QueryParamsAssetsResponse) String() string { +func (x *QueryResolveResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsAssetsResponse) ProtoMessage() {} +func (*QueryResolveResponse) ProtoMessage() {} -// Deprecated: Use QueryParamsAssetsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsAssetsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. +func (*QueryResolveResponse) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{3} } -func (x *QueryParamsAssetsResponse) GetAssets() []*AssetInfo { -func (x *QueryAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryAccountsResponse) GetExists() bool { +func (x *QueryResolveResponse) GetDocument() *Document { if x != nil { - return x.Assets + return x.Document } return nil } -type QueryParamsKeysResponse struct { -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -type QueryCredentialsRequest struct { +// SyncRequest is the request type for the Sync RPC method. +type SyncRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (x *QueryCredentialsRequest) Reset() { - *x = QueryCredentialsRequest{} +func (x *SyncRequest) Reset() { + *x = SyncRequest{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4792,42 +3182,35 @@ func (x *QueryCredentialsRequest) Reset() { } } -func (x *QueryCredentialsRequest) String() string { +func (x *SyncRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryCredentialsRequest) ProtoMessage() {} +func (*SyncRequest) ProtoMessage() {} -// Deprecated: Use QueryCredentialsRequest.ProtoReflect.Descriptor instead. -func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. +func (*SyncRequest) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{4} } -func (x *QueryCredentialsRequest) GetDid() string { +func (x *SyncRequest) 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 { +// SyncResponse is the response type for the Sync RPC method. +type SyncResponse 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"` } -func (x *QueryCredentialsResponse) Reset() { - *x = QueryCredentialsResponse{} +func (x *SyncResponse) Reset() { + *x = SyncResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4835,517 +3218,84 @@ func (x *QueryCredentialsResponse) Reset() { } } -func (x *QueryCredentialsResponse) String() string { +func (x *SyncResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryCredentialsResponse) ProtoMessage() {} +func (*SyncResponse) ProtoMessage() {} -// Deprecated: Use QueryCredentialsResponse.ProtoReflect.Descriptor instead. -func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. +func (*SyncResponse) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryCredentialsResponse) GetCredentials() map[string][]byte { +func (x *SyncResponse) GetSuccess() bool { if x != nil { - return x.Credentials - } - return nil -} - -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -type QueryIdentitiesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QueryIdentitiesRequest) Reset() { - *x = QueryIdentitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIdentitiesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIdentitiesRequest) ProtoMessage() {} - -// Deprecated: Use QueryIdentitiesRequest.ProtoReflect.Descriptor instead. -func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryIdentitiesRequest) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -type QueryIdentitiesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` -} - -func (x *QueryIdentitiesResponse) Reset() { - *x = QueryIdentitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIdentitiesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIdentitiesResponse) ProtoMessage() {} - -// Deprecated: Use QueryIdentitiesResponse.ProtoReflect.Descriptor instead. -func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryIdentitiesResponse) GetExists() bool { - if x != nil { - return x.Exists + return x.Success } 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 - - Keys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QueryParamsKeysResponse) Reset() { - *x = QueryParamsKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsKeysResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsKeysResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsKeysResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryParamsKeysResponse) GetKeys() map[string]*KeyInfo { - if x != nil { - return x.Keys -// 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 nil -} - -type QueryParamsByKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *KeyInfo `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // document is the DID document - Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` -} - -func (x *QueryParamsByKeyResponse) Reset() { - *x = QueryParamsByKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsByKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsByKeyResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsByKeyResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsByKeyResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryParamsByKeyResponse) GetKey() *KeyInfo { -// Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. -func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryResolveResponse) GetDocument() *Document { - if x != nil { - return x.Key - } - return nil -} - -type QueryParamsByAssetResponse struct { -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -type QueryServiceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Asset *AssetInfo `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` -} - -func (x *QueryParamsByAssetResponse) Reset() { - *x = QueryParamsByAssetResponse{} - 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 *QueryParamsByAssetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsByAssetResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsByAssetResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsByAssetResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryParamsByAssetResponse) GetAsset() *AssetInfo { - if x != nil { - return x.Asset -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 nil -} - -type QueryRegistrationOptionsByKeyResponse struct { -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryServiceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RegistrationOptions []string `protobuf:"bytes,1,rep,name=registration_options,json=registrationOptions,proto3" json:"registration_options,omitempty"` -} - -func (x *QueryRegistrationOptionsByKeyResponse) Reset() { - *x = QueryRegistrationOptionsByKeyResponse{} -func (x *QueryServiceResponse) Reset() { - *x = QueryServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRegistrationOptionsByKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRegistrationOptionsByKeyResponse) ProtoMessage() {} - -// Deprecated: Use QueryRegistrationOptionsByKeyResponse.ProtoReflect.Descriptor instead. -func (*QueryRegistrationOptionsByKeyResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryRegistrationOptionsByKeyResponse) GetRegistrationOptions() []string { -func (x *QueryServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryServiceResponse) ProtoMessage() {} - -// Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead. -func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryServiceResponse) GetOptions() string { - if x != nil { - return x.RegistrationOptions - } - return nil -} - 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, 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, 0x60, 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, 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, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0xc4, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 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, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x05, 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, 0x3d, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x46, 0x0a, - 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x1a, 0x48, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d, 0x0a, 0x18, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x45, 0x0a, 0x1a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x22, 0x5a, 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x4b, 0x65, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xc2, 0x05, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x0d, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, - 0x16, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x7d, 0x12, 0x4f, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x56, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, - 0x12, 0x70, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x21, 0x12, 0x1f, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2f, - 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x4a, 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, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 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, 0x51, - 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, - 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x7d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 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, - 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, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, + 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, 0x60, 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, 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, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x03, 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, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 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, 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, 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, + 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, + 0x22, 0x28, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xea, 0x01, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, + 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x40, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x13, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07, + 0x22, 0x05, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 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 ( @@ -5360,95 +3310,33 @@ 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, 9) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryRequest)(nil), // 0: did.v1.QueryRequest - (*QueryResponse)(nil), // 1: did.v1.QueryResponse - (*QueryParamsResponse)(nil), // 2: did.v1.QueryParamsResponse - (*QueryParamsAssetsResponse)(nil), // 3: did.v1.QueryParamsAssetsResponse - (*QueryParamsKeysResponse)(nil), // 4: did.v1.QueryParamsKeysResponse - (*QueryParamsByKeyResponse)(nil), // 5: did.v1.QueryParamsByKeyResponse - (*QueryParamsByAssetResponse)(nil), // 6: did.v1.QueryParamsByAssetResponse - (*QueryRegistrationOptionsByKeyResponse)(nil), // 7: did.v1.QueryRegistrationOptionsByKeyResponse - nil, // 8: did.v1.QueryParamsKeysResponse.KeysEntry - (*Document)(nil), // 9: did.v1.Document - (*ServiceInfo)(nil), // 10: did.v1.ServiceInfo - (*Params)(nil), // 11: did.v1.Params - (*AssetInfo)(nil), // 12: did.v1.AssetInfo - (*KeyInfo)(nil), // 13: did.v1.KeyInfo + (*QueryRequest)(nil), // 0: did.v1.QueryRequest + (*QueryResponse)(nil), // 1: did.v1.QueryResponse + (*QueryParamsResponse)(nil), // 2: did.v1.QueryParamsResponse + (*QueryResolveResponse)(nil), // 3: did.v1.QueryResolveResponse + (*SyncRequest)(nil), // 4: did.v1.SyncRequest + (*SyncResponse)(nil), // 5: did.v1.SyncResponse + (*Document)(nil), // 6: did.v1.Document + (*Params)(nil), // 7: did.v1.Params } var file_did_v1_query_proto_depIdxs = []int32{ - 9, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document - 10, // 1: did.v1.QueryResponse.service:type_name -> did.v1.ServiceInfo - 11, // 2: did.v1.QueryResponse.params:type_name -> did.v1.Params - 11, // 3: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 12, // 4: did.v1.QueryParamsAssetsResponse.assets:type_name -> did.v1.AssetInfo - 8, // 5: did.v1.QueryParamsKeysResponse.keys:type_name -> did.v1.QueryParamsKeysResponse.KeysEntry - 13, // 6: did.v1.QueryParamsByKeyResponse.key:type_name -> did.v1.KeyInfo - 12, // 7: did.v1.QueryParamsByAssetResponse.asset:type_name -> did.v1.AssetInfo - 13, // 8: did.v1.QueryParamsKeysResponse.KeysEntry.value:type_name -> did.v1.KeyInfo - 0, // 9: did.v1.Query.Params:input_type -> did.v1.QueryRequest - 0, // 10: did.v1.Query.ParamsAssets:input_type -> did.v1.QueryRequest - 0, // 11: did.v1.Query.ParamsByAsset:input_type -> did.v1.QueryRequest - 0, // 12: did.v1.Query.ParamsKeys:input_type -> did.v1.QueryRequest - 0, // 13: did.v1.Query.ParamsByKey:input_type -> did.v1.QueryRequest - 0, // 14: did.v1.Query.RegistrationOptionsByKey:input_type -> did.v1.QueryRequest - 0, // 15: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest - 0, // 16: did.v1.Query.Service:input_type -> did.v1.QueryRequest - 2, // 17: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 1, // 18: did.v1.Query.ParamsAssets:output_type -> did.v1.QueryResponse - 1, // 19: did.v1.Query.ParamsByAsset:output_type -> did.v1.QueryResponse - 1, // 20: did.v1.Query.ParamsKeys:output_type -> did.v1.QueryResponse - 1, // 21: did.v1.Query.ParamsByKey:output_type -> did.v1.QueryResponse - 1, // 22: did.v1.Query.RegistrationOptionsByKey:output_type -> did.v1.QueryResponse - 1, // 23: did.v1.Query.Resolve:output_type -> did.v1.QueryResponse - 1, // 24: did.v1.Query.Service:output_type -> did.v1.QueryResponse - 17, // [17:25] is the sub-list for method output_type - 9, // [9:17] 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 -var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse - (*QueryAccountsRequest)(nil), // 2: did.v1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 3: did.v1.QueryAccountsResponse - (*QueryCredentialsRequest)(nil), // 4: did.v1.QueryCredentialsRequest - (*QueryCredentialsResponse)(nil), // 5: did.v1.QueryCredentialsResponse - (*QueryIdentitiesRequest)(nil), // 6: did.v1.QueryIdentitiesRequest - (*QueryIdentitiesResponse)(nil), // 7: did.v1.QueryIdentitiesResponse - (*QueryResolveRequest)(nil), // 8: did.v1.QueryResolveRequest - (*QueryResolveResponse)(nil), // 9: did.v1.QueryResolveResponse - (*QueryServiceRequest)(nil), // 10: did.v1.QueryServiceRequest - (*QueryServiceResponse)(nil), // 11: did.v1.QueryServiceResponse - nil, // 12: did.v1.QueryCredentialsResponse.CredentialsEntry - (*Params)(nil), // 13: did.v1.Params - (*VerificationMethod)(nil), // 14: did.v1.VerificationMethod - (*Document)(nil), // 15: did.v1.Document -} -var file_did_v1_query_proto_depIdxs = []int32{ - 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 + 6, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document + 7, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params + 7, // 2: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 6, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document + 0, // 4: did.v1.Query.Params:input_type -> did.v1.QueryRequest + 0, // 5: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest + 4, // 6: did.v1.Query.Sync:input_type -> did.v1.SyncRequest + 2, // 7: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 3, // 8: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse + 5, // 9: did.v1.Query.Sync:output_type -> did.v1.SyncResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_did_v1_query_proto_init() } @@ -5457,8 +3345,6 @@ func file_did_v1_query_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_models_proto_init() - file_did_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRequest); i { @@ -5486,7 +3372,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.(*QueryParamsResponse); i { - switch v := v.(*QueryAccountsRequest); i { case 0: return &v.state case 1: @@ -5498,83 +3383,6 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsAssetsResponse); i { - switch v := v.(*QueryAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsKeysResponse); i { - 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{} { - switch v := v.(*QueryParamsByKeyResponse); i { - switch v := v.(*QueryCredentialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsByAssetResponse); i { - 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.(*QueryRegistrationOptionsByKeyResponse); i { - switch v := v.(*QueryIdentitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResolveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResolveResponse); i { case 0: return &v.state @@ -5586,8 +3394,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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncRequest); i { case 0: return &v.state case 1: @@ -5598,8 +3406,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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncResponse); i { case 0: return &v.state case 1: @@ -5617,8 +3425,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 9, - NumMessages: 13, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index 553f71c68..77258f332 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -19,14 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/did.v1.Query/Params" - Query_ParamsAssets_FullMethodName = "/did.v1.Query/ParamsAssets" - Query_ParamsByAsset_FullMethodName = "/did.v1.Query/ParamsByAsset" - Query_ParamsKeys_FullMethodName = "/did.v1.Query/ParamsKeys" - Query_ParamsByKey_FullMethodName = "/did.v1.Query/ParamsByKey" - Query_RegistrationOptionsByKey_FullMethodName = "/did.v1.Query/RegistrationOptionsByKey" - Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" - Query_Service_FullMethodName = "/did.v1.Query/Service" + Query_Params_FullMethodName = "/did.v1.Query/Params" + Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" + Query_Sync_FullMethodName = "/did.v1.Query/Sync" ) // QueryClient is the client API for Query service. @@ -35,22 +30,10 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Service returns associated ServiceInfo for a given Origin - // if the servie is not found, a fingerprint is generated to be used - // as a TXT record in DNS. v=sonr, o=origin, p=protocol - Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) } type queryClient struct { @@ -70,53 +53,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc return out, nil } -func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_ParamsAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_ParamsByAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_ParamsKeys_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_ParamsByKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_RegistrationOptionsByKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) +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 { return nil, err @@ -124,9 +62,9 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...) +func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -139,22 +77,10 @@ func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grp type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(context.Context, *QueryRequest) (*QueryResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByKey(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - RegistrationOptionsByKey(context.Context, *QueryRequest) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryRequest) (*QueryResponse, error) - // Service returns associated ServiceInfo for a given Origin - // if the servie is not found, a fingerprint is generated to be used - // as a TXT record in DNS. v=sonr, o=origin, p=protocol - Service(context.Context, *QueryRequest) (*QueryResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(context.Context, *SyncRequest) (*SyncResponse, error) mustEmbedUnimplementedQueryServer() } @@ -165,26 +91,11 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) ParamsAssets(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsAssets not implemented") -} -func (UnimplementedQueryServer) ParamsByAsset(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByAsset not implemented") -} -func (UnimplementedQueryServer) ParamsKeys(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsKeys not implemented") -} -func (UnimplementedQueryServer) ParamsByKey(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByKey not implemented") -} -func (UnimplementedQueryServer) RegistrationOptionsByKey(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegistrationOptionsByKey not implemented") -} -func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResponse, error) { +func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } -func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") +func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -217,96 +128,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ParamsAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsAssets(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsByAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByAsset(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsKeys(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsByKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByKey(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RegistrationOptionsByKey_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).RegistrationOptionsByKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_RegistrationOptionsByKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RegistrationOptionsByKey(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { @@ -325,20 +146,20 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter 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(QueryRequest) +func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Service(ctx, in) + return srv.(QueryServer).Sync(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_Service_FullMethodName, + FullMethod: Query_Sync_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Service(ctx, req.(*QueryRequest)) + return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) } return interceptor(ctx, in, info, handler) } @@ -354,33 +175,13 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "ParamsAssets", - Handler: _Query_ParamsAssets_Handler, - }, - { - MethodName: "ParamsByAsset", - Handler: _Query_ParamsByAsset_Handler, - }, - { - MethodName: "ParamsKeys", - Handler: _Query_ParamsKeys_Handler, - }, - { - MethodName: "ParamsByKey", - Handler: _Query_ParamsByKey_Handler, - }, - { - MethodName: "RegistrationOptionsByKey", - Handler: _Query_RegistrationOptionsByKey_Handler, - }, { MethodName: "Resolve", Handler: _Query_Resolve_Handler, }, { - MethodName: "Service", - Handler: _Query_Service_Handler, + MethodName: "Sync", + Handler: _Query_Sync_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index 1c83123cd..e7589f1e8 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -9,198 +9,123 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) -type AccountTable interface { - Insert(ctx context.Context, account *Account) error - Update(ctx context.Context, account *Account) error - Save(ctx context.Context, account *Account) error - Delete(ctx context.Context, account *Account) error +type AliasTable interface { + Insert(ctx context.Context, alias *Alias) error + Update(ctx context.Context, alias *Alias) error + Save(ctx context.Context, alias *Alias) error + Delete(ctx context.Context, alias *Alias) 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) (*Account, error) - HasByControllerLabel(ctx context.Context, controller string, label string) (found bool, err error) - // GetByControllerLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerLabel(ctx context.Context, controller string, label string) (*Account, error) - HasByControllerAddress(ctx context.Context, controller string, address string) (found bool, err error) - // GetByControllerAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerAddress(ctx context.Context, controller string, address string) (*Account, error) - HasByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (found bool, err error) - // GetByControllerChainCodeIndex returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (*Account, error) - List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) - ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) - DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error - DeleteRange(ctx context.Context, from, to AccountIndexKey) error - Get(ctx context.Context, id string) (*Aliases, error) - HasBySubject(ctx context.Context, subject string) (found bool, err error) - // GetBySubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubject(ctx context.Context, subject string) (*Aliases, error) - List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) - ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) - DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error - DeleteRange(ctx context.Context, from, to AliasesIndexKey) error + Get(ctx context.Context, id string) (*Alias, 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) (*Alias, error) + List(ctx context.Context, prefixKey AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error) + ListRange(ctx context.Context, from, to AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error) + DeleteBy(ctx context.Context, prefixKey AliasIndexKey) error + DeleteRange(ctx context.Context, from, to AliasIndexKey) error doNotImplement() } -type AccountIterator struct { +type AliasIterator struct { ormtable.Iterator } -func (i AccountIterator) Value() (*Account, error) { - var account Account - err := i.UnmarshalMessage(&account) - return &account, err +func (i AliasIterator) Value() (*Alias, error) { + var alias Alias + err := i.UnmarshalMessage(&alias) + return &alias, err } -type AccountIndexKey interface { +type AliasIndexKey interface { id() uint32 values() []interface{} - accountIndexKey() + aliasIndexKey() } // primary key starting index.. -type AccountPrimaryKey = AccountIdIndexKey +type AliasPrimaryKey = AliasIdIndexKey -type AccountIdIndexKey struct { +type AliasIdIndexKey struct { vs []interface{} } -func (x AccountIdIndexKey) id() uint32 { return 0 } -func (x AccountIdIndexKey) values() []interface{} { return x.vs } -func (x AccountIdIndexKey) accountIndexKey() {} +func (x AliasIdIndexKey) id() uint32 { return 0 } +func (x AliasIdIndexKey) values() []interface{} { return x.vs } +func (x AliasIdIndexKey) aliasIndexKey() {} -func (this AccountIdIndexKey) WithId(id string) AccountIdIndexKey { +func (this AliasIdIndexKey) WithId(id string) AliasIdIndexKey { this.vs = []interface{}{id} return this } -type AccountControllerLabelIndexKey struct { +type AliasSubjectOriginIndexKey struct { vs []interface{} } -func (x AccountControllerLabelIndexKey) id() uint32 { return 1 } -func (x AccountControllerLabelIndexKey) values() []interface{} { return x.vs } -func (x AccountControllerLabelIndexKey) accountIndexKey() {} +func (x AliasSubjectOriginIndexKey) id() uint32 { return 1 } +func (x AliasSubjectOriginIndexKey) values() []interface{} { return x.vs } +func (x AliasSubjectOriginIndexKey) aliasIndexKey() {} -func (this AccountControllerLabelIndexKey) WithController(controller string) AccountControllerLabelIndexKey { - this.vs = []interface{}{controller} -type AliasesSubjectIndexKey struct { - vs []interface{} -} - -func (x AliasesSubjectIndexKey) id() uint32 { return 1 } -func (x AliasesSubjectIndexKey) values() []interface{} { return x.vs } -func (x AliasesSubjectIndexKey) aliasesIndexKey() {} - -func (this AliasesSubjectIndexKey) WithSubject(subject string) AliasesSubjectIndexKey { +func (this AliasSubjectOriginIndexKey) WithSubject(subject string) AliasSubjectOriginIndexKey { this.vs = []interface{}{subject} return this } -func (this AccountControllerLabelIndexKey) WithControllerLabel(controller string, label string) AccountControllerLabelIndexKey { - this.vs = []interface{}{controller, label} +func (this AliasSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) AliasSubjectOriginIndexKey { + this.vs = []interface{}{subject, origin} return this } -type AccountControllerAddressIndexKey struct { - vs []interface{} -} - -func (x AccountControllerAddressIndexKey) id() uint32 { return 2 } -func (x AccountControllerAddressIndexKey) values() []interface{} { return x.vs } -func (x AccountControllerAddressIndexKey) accountIndexKey() {} - -func (this AccountControllerAddressIndexKey) WithController(controller string) AccountControllerAddressIndexKey { - this.vs = []interface{}{controller} - return this -} - -func (this AccountControllerAddressIndexKey) WithControllerAddress(controller string, address string) AccountControllerAddressIndexKey { - this.vs = []interface{}{controller, address} - return this -} - -type AccountControllerChainCodeIndexIndexKey struct { - vs []interface{} -} - -func (x AccountControllerChainCodeIndexIndexKey) id() uint32 { return 3 } -func (x AccountControllerChainCodeIndexIndexKey) values() []interface{} { return x.vs } -func (x AccountControllerChainCodeIndexIndexKey) accountIndexKey() {} - -func (this AccountControllerChainCodeIndexIndexKey) WithController(controller string) AccountControllerChainCodeIndexIndexKey { - this.vs = []interface{}{controller} - return this -} - -func (this AccountControllerChainCodeIndexIndexKey) WithControllerChainCode(controller string, chain_code uint32) AccountControllerChainCodeIndexIndexKey { - this.vs = []interface{}{controller, chain_code} - return this -} - -func (this AccountControllerChainCodeIndexIndexKey) WithControllerChainCodeIndex(controller string, chain_code uint32, index uint32) AccountControllerChainCodeIndexIndexKey { - this.vs = []interface{}{controller, chain_code, index} - return this -} - -type accountTable struct { +type aliasTable struct { table ormtable.Table } -func (this accountTable) Insert(ctx context.Context, account *Account) error { - return this.table.Insert(ctx, account) +func (this aliasTable) Insert(ctx context.Context, alias *Alias) error { + return this.table.Insert(ctx, alias) } -func (this accountTable) Update(ctx context.Context, account *Account) error { - return this.table.Update(ctx, account) +func (this aliasTable) Update(ctx context.Context, alias *Alias) error { + return this.table.Update(ctx, alias) } -func (this accountTable) Save(ctx context.Context, account *Account) error { - return this.table.Save(ctx, account) +func (this aliasTable) Save(ctx context.Context, alias *Alias) error { + return this.table.Save(ctx, alias) } -func (this accountTable) Delete(ctx context.Context, account *Account) error { - return this.table.Delete(ctx, account) +func (this aliasTable) Delete(ctx context.Context, alias *Alias) error { + return this.table.Delete(ctx, alias) } -func (this accountTable) Has(ctx context.Context, id string) (found bool, err error) { +func (this aliasTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this accountTable) Get(ctx context.Context, id string) (*Account, error) { - var account Account - found, err := this.table.PrimaryKey().Get(ctx, &account, id) +func (this aliasTable) Get(ctx context.Context, id string) (*Alias, error) { + var alias Alias + found, err := this.table.PrimaryKey().Get(ctx, &alias, id) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &account, nil + return &alias, nil } -func (this accountTable) HasByControllerLabel(ctx context.Context, controller string, label string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - controller, - label, - ) -} - -func (this accountTable) GetByControllerLabel(ctx context.Context, controller string, label string) (*Account, error) { - var account Account - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account, - controller, - label, -func (this aliasesTable) HasBySubject(ctx context.Context, subject string) (found bool, err error) { +func (this aliasTable) 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 aliasesTable) GetBySubject(ctx context.Context, subject string) (*Aliases, error) { - var aliases Aliases - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases, +func (this aliasTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Alias, error) { + var alias Alias + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &alias, subject, + origin, ) if err != nil { return nil, err @@ -208,83 +133,37 @@ func (this aliasesTable) GetBySubject(ctx context.Context, subject string) (*Ali if !found { return nil, ormerrors.NotFound } - return &account, nil + return &alias, nil } -func (this accountTable) HasByControllerAddress(ctx context.Context, controller string, address string) (found bool, err error) { - return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - controller, - address, - ) -} - -func (this accountTable) GetByControllerAddress(ctx context.Context, controller string, address string) (*Account, error) { - var account Account - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &account, - controller, - address, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &account, nil -} - -func (this accountTable) HasByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (found bool, err error) { - return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, - controller, - chain_code, - index, - ) -} - -func (this accountTable) GetByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (*Account, error) { - var account Account - found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &account, - controller, - chain_code, - index, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &account, nil -} - -func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { +func (this aliasTable) List(ctx context.Context, prefixKey AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return AccountIterator{it}, err + return AliasIterator{it}, err } -func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { +func (this aliasTable) ListRange(ctx context.Context, from, to AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return AccountIterator{it}, err + return AliasIterator{it}, err } -func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error { +func (this aliasTable) DeleteBy(ctx context.Context, prefixKey AliasIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error { +func (this aliasTable) DeleteRange(ctx context.Context, from, to AliasIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this accountTable) doNotImplement() {} +func (this aliasTable) doNotImplement() {} -var _ AccountTable = accountTable{} +var _ AliasTable = aliasTable{} -func NewAccountTable(db ormtable.Schema) (AccountTable, error) { - table := db.GetTable(&Account{}) +func NewAliasTable(db ormtable.Schema) (AliasTable, error) { + table := db.GetTable(&Alias{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Alias{}).ProtoReflect().Descriptor().FullName())) } - return accountTable{table}, nil + return aliasTable{table}, nil } type ControllerTable interface { @@ -295,12 +174,21 @@ 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) + HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) + // GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) + HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) + // GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) + HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) + // GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByBtcAddress(ctx context.Context, btc_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) + HasByStatusVaultCid(ctx context.Context, status string, vault_cid string) (found bool, err error) + // GetByStatusVaultCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByStatusVaultCid(ctx context.Context, status string, 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 @@ -341,16 +229,42 @@ func (this ControllerIdIndexKey) WithId(id string) ControllerIdIndexKey { return this } -type ControllerAddressIndexKey struct { +type ControllerSonrAddressIndexKey struct { vs []interface{} } -func (x ControllerAddressIndexKey) id() uint32 { return 1 } -func (x ControllerAddressIndexKey) values() []interface{} { return x.vs } -func (x ControllerAddressIndexKey) controllerIndexKey() {} +func (x ControllerSonrAddressIndexKey) id() uint32 { return 1 } +func (x ControllerSonrAddressIndexKey) values() []interface{} { return x.vs } +func (x ControllerSonrAddressIndexKey) controllerIndexKey() {} -func (this ControllerAddressIndexKey) WithAddress(address string) ControllerAddressIndexKey { - this.vs = []interface{}{address} +func (this ControllerSonrAddressIndexKey) WithSonrAddress(sonr_address string) ControllerSonrAddressIndexKey { + this.vs = []interface{}{sonr_address} + return this +} + +type ControllerEthAddressIndexKey struct { + vs []interface{} +} + +func (x ControllerEthAddressIndexKey) id() uint32 { return 2 } +func (x ControllerEthAddressIndexKey) values() []interface{} { return x.vs } +func (x ControllerEthAddressIndexKey) controllerIndexKey() {} + +func (this ControllerEthAddressIndexKey) WithEthAddress(eth_address string) ControllerEthAddressIndexKey { + this.vs = []interface{}{eth_address} + return this +} + +type ControllerBtcAddressIndexKey struct { + vs []interface{} +} + +func (x ControllerBtcAddressIndexKey) id() uint32 { return 3 } +func (x ControllerBtcAddressIndexKey) values() []interface{} { return x.vs } +func (x ControllerBtcAddressIndexKey) controllerIndexKey() {} + +func (this ControllerBtcAddressIndexKey) WithBtcAddress(btc_address string) ControllerBtcAddressIndexKey { + this.vs = []interface{}{btc_address} return this } @@ -358,7 +272,7 @@ type ControllerVaultCidIndexKey struct { vs []interface{} } -func (x ControllerVaultCidIndexKey) id() uint32 { return 2 } +func (x ControllerVaultCidIndexKey) id() uint32 { return 4 } func (x ControllerVaultCidIndexKey) values() []interface{} { return x.vs } func (x ControllerVaultCidIndexKey) controllerIndexKey() {} @@ -367,6 +281,24 @@ func (this ControllerVaultCidIndexKey) WithVaultCid(vault_cid string) Controller return this } +type ControllerStatusVaultCidIndexKey struct { + vs []interface{} +} + +func (x ControllerStatusVaultCidIndexKey) id() uint32 { return 5 } +func (x ControllerStatusVaultCidIndexKey) values() []interface{} { return x.vs } +func (x ControllerStatusVaultCidIndexKey) controllerIndexKey() {} + +func (this ControllerStatusVaultCidIndexKey) WithStatus(status string) ControllerStatusVaultCidIndexKey { + this.vs = []interface{}{status} + return this +} + +func (this ControllerStatusVaultCidIndexKey) WithStatusVaultCid(status string, vault_cid string) ControllerStatusVaultCidIndexKey { + this.vs = []interface{}{status, vault_cid} + return this +} + type controllerTable struct { table ormtable.Table } @@ -403,16 +335,56 @@ 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) { +func (this controllerTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - address, + sonr_address, ) } -func (this controllerTable) GetByAddress(ctx context.Context, address string) (*Controller, error) { +func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) { var controller Controller found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller, - address, + sonr_address, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &controller, nil +} + +func (this controllerTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + eth_address, + ) +} + +func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) { + var controller Controller + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller, + eth_address, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &controller, nil +} + +func (this controllerTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) { + return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, + btc_address, + ) +} + +func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) { + var controller Controller + found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &controller, + btc_address, ) if err != nil { return nil, err @@ -424,14 +396,36 @@ func (this controllerTable) GetByAddress(ctx context.Context, address string) (* } func (this controllerTable) HasByVaultCid(ctx context.Context, vault_cid string) (found bool, err error) { - return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + return this.table.GetIndexByID(4).(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, + found, err := this.table.GetIndexByID(4).(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) HasByStatusVaultCid(ctx context.Context, status string, vault_cid string) (found bool, err error) { + return this.table.GetIndexByID(5).(ormtable.UniqueIndex).Has(ctx, + status, + vault_cid, + ) +} + +func (this controllerTable) GetByStatusVaultCid(ctx context.Context, status string, vault_cid string) (*Controller, error) { + var controller Controller + found, err := this.table.GetIndexByID(5).(ormtable.UniqueIndex).Get(ctx, &controller, + status, vault_cid, ) if err != nil { @@ -473,130 +467,175 @@ func NewControllerTable(db ormtable.Schema) (ControllerTable, error) { return controllerTable{table}, nil } -type ProofTable interface { - Insert(ctx context.Context, proof *Proof) error - Update(ctx context.Context, proof *Proof) error - Save(ctx context.Context, proof *Proof) error - Delete(ctx context.Context, proof *Proof) error +type VerificationTable interface { + Insert(ctx context.Context, verification *Verification) error + Update(ctx context.Context, verification *Verification) error + Save(ctx context.Context, verification *Verification) error + Delete(ctx context.Context, verification *Verification) 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) (*Proof, error) - HasByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (found bool, err error) - // GetByControllerIssuerProperty returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (*Proof, error) - List(ctx context.Context, prefixKey ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) - ListRange(ctx context.Context, from, to ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) - DeleteBy(ctx context.Context, prefixKey ProofIndexKey) error - DeleteRange(ctx context.Context, from, to ProofIndexKey) error + Get(ctx context.Context, id string) (*Verification, error) + HasByIssuerSubject(ctx context.Context, issuer string, subject string) (found bool, err error) + // GetByIssuerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByIssuerSubject(ctx context.Context, issuer string, subject string) (*Verification, error) + HasByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (found bool, err error) + // GetByControllerDidMethodIssuer returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (*Verification, error) + HasByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (found bool, err error) + // GetByVerificationTypeSubjectIssuer returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (*Verification, error) + List(ctx context.Context, prefixKey VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error) + ListRange(ctx context.Context, from, to VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error) + DeleteBy(ctx context.Context, prefixKey VerificationIndexKey) error + DeleteRange(ctx context.Context, from, to VerificationIndexKey) error doNotImplement() } -type ProofIterator struct { +type VerificationIterator struct { ormtable.Iterator } -func (i ProofIterator) Value() (*Proof, error) { - var proof Proof - err := i.UnmarshalMessage(&proof) - return &proof, err +func (i VerificationIterator) Value() (*Verification, error) { + var verification Verification + err := i.UnmarshalMessage(&verification) + return &verification, err } -type ProofIndexKey interface { +type VerificationIndexKey interface { id() uint32 values() []interface{} - proofIndexKey() + verificationIndexKey() } // primary key starting index.. -type ProofPrimaryKey = ProofIdIndexKey +type VerificationPrimaryKey = VerificationIdIndexKey -type ProofIdIndexKey struct { +type VerificationIdIndexKey struct { vs []interface{} } -func (x ProofIdIndexKey) id() uint32 { return 0 } -func (x ProofIdIndexKey) values() []interface{} { return x.vs } -func (x ProofIdIndexKey) proofIndexKey() {} +func (x VerificationIdIndexKey) id() uint32 { return 0 } +func (x VerificationIdIndexKey) values() []interface{} { return x.vs } +func (x VerificationIdIndexKey) verificationIndexKey() {} -func (this ProofIdIndexKey) WithId(id string) ProofIdIndexKey { +func (this VerificationIdIndexKey) WithId(id string) VerificationIdIndexKey { this.vs = []interface{}{id} return this } -type ProofControllerIssuerPropertyIndexKey struct { +type VerificationIssuerSubjectIndexKey struct { vs []interface{} } -func (x ProofControllerIssuerPropertyIndexKey) id() uint32 { return 1 } -func (x ProofControllerIssuerPropertyIndexKey) values() []interface{} { return x.vs } -func (x ProofControllerIssuerPropertyIndexKey) proofIndexKey() {} +func (x VerificationIssuerSubjectIndexKey) id() uint32 { return 1 } +func (x VerificationIssuerSubjectIndexKey) values() []interface{} { return x.vs } +func (x VerificationIssuerSubjectIndexKey) verificationIndexKey() {} -func (this ProofControllerIssuerPropertyIndexKey) WithController(controller string) ProofControllerIssuerPropertyIndexKey { +func (this VerificationIssuerSubjectIndexKey) WithIssuer(issuer string) VerificationIssuerSubjectIndexKey { + this.vs = []interface{}{issuer} + return this +} + +func (this VerificationIssuerSubjectIndexKey) WithIssuerSubject(issuer string, subject string) VerificationIssuerSubjectIndexKey { + this.vs = []interface{}{issuer, subject} + return this +} + +type VerificationControllerDidMethodIssuerIndexKey struct { + vs []interface{} +} + +func (x VerificationControllerDidMethodIssuerIndexKey) id() uint32 { return 2 } +func (x VerificationControllerDidMethodIssuerIndexKey) values() []interface{} { return x.vs } +func (x VerificationControllerDidMethodIssuerIndexKey) verificationIndexKey() {} + +func (this VerificationControllerDidMethodIssuerIndexKey) WithController(controller string) VerificationControllerDidMethodIssuerIndexKey { this.vs = []interface{}{controller} return this } -func (this ProofControllerIssuerPropertyIndexKey) WithControllerIssuer(controller string, issuer string) ProofControllerIssuerPropertyIndexKey { - this.vs = []interface{}{controller, issuer} +func (this VerificationControllerDidMethodIssuerIndexKey) WithControllerDidMethod(controller string, did_method string) VerificationControllerDidMethodIssuerIndexKey { + this.vs = []interface{}{controller, did_method} return this } -func (this ProofControllerIssuerPropertyIndexKey) WithControllerIssuerProperty(controller string, issuer string, property string) ProofControllerIssuerPropertyIndexKey { - this.vs = []interface{}{controller, issuer, property} +func (this VerificationControllerDidMethodIssuerIndexKey) WithControllerDidMethodIssuer(controller string, did_method string, issuer string) VerificationControllerDidMethodIssuerIndexKey { + this.vs = []interface{}{controller, did_method, issuer} return this } -type proofTable struct { +type VerificationVerificationTypeSubjectIssuerIndexKey struct { + vs []interface{} +} + +func (x VerificationVerificationTypeSubjectIssuerIndexKey) id() uint32 { return 3 } +func (x VerificationVerificationTypeSubjectIssuerIndexKey) values() []interface{} { return x.vs } +func (x VerificationVerificationTypeSubjectIssuerIndexKey) verificationIndexKey() {} + +func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationType(verification_type string) VerificationVerificationTypeSubjectIssuerIndexKey { + this.vs = []interface{}{verification_type} + return this +} + +func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationTypeSubject(verification_type string, subject string) VerificationVerificationTypeSubjectIssuerIndexKey { + this.vs = []interface{}{verification_type, subject} + return this +} + +func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationTypeSubjectIssuer(verification_type string, subject string, issuer string) VerificationVerificationTypeSubjectIssuerIndexKey { + this.vs = []interface{}{verification_type, subject, issuer} + return this +} + +type verificationTable struct { table ormtable.Table } -func (this proofTable) Insert(ctx context.Context, proof *Proof) error { - return this.table.Insert(ctx, proof) +func (this verificationTable) Insert(ctx context.Context, verification *Verification) error { + return this.table.Insert(ctx, verification) } -func (this proofTable) Update(ctx context.Context, proof *Proof) error { - return this.table.Update(ctx, proof) +func (this verificationTable) Update(ctx context.Context, verification *Verification) error { + return this.table.Update(ctx, verification) } -func (this proofTable) Save(ctx context.Context, proof *Proof) error { - return this.table.Save(ctx, proof) +func (this verificationTable) Save(ctx context.Context, verification *Verification) error { + return this.table.Save(ctx, verification) } -func (this proofTable) Delete(ctx context.Context, proof *Proof) error { - return this.table.Delete(ctx, proof) +func (this verificationTable) Delete(ctx context.Context, verification *Verification) error { + return this.table.Delete(ctx, verification) } -func (this proofTable) Has(ctx context.Context, id string) (found bool, err error) { +func (this verificationTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this proofTable) Get(ctx context.Context, id string) (*Proof, error) { - var proof Proof - found, err := this.table.PrimaryKey().Get(ctx, &proof, id) +func (this verificationTable) Get(ctx context.Context, id string) (*Verification, error) { + var verification Verification + found, err := this.table.PrimaryKey().Get(ctx, &verification, id) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &proof, nil + return &verification, nil } -func (this proofTable) HasByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (found bool, err error) { +func (this verificationTable) HasByIssuerSubject(ctx context.Context, issuer string, subject string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - controller, issuer, - property, + subject, ) } -func (this proofTable) GetByControllerIssuerProperty(ctx context.Context, controller string, issuer string, property string) (*Proof, error) { - var proof Proof - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &proof, - controller, +func (this verificationTable) GetByIssuerSubject(ctx context.Context, issuer string, subject string) (*Verification, error) { + var verification Verification + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &verification, issuer, - property, + subject, ) if err != nil { return nil, err @@ -604,192 +643,23 @@ func (this proofTable) GetByControllerIssuerProperty(ctx context.Context, contro if !found { return nil, ormerrors.NotFound } - return &proof, nil + return &verification, nil } -func (this proofTable) List(ctx context.Context, prefixKey ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ProofIterator{it}, err -} - -func (this proofTable) ListRange(ctx context.Context, from, to ProofIndexKey, opts ...ormlist.Option) (ProofIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ProofIterator{it}, err -} - -func (this proofTable) DeleteBy(ctx context.Context, prefixKey ProofIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this proofTable) DeleteRange(ctx context.Context, from, to ProofIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this proofTable) doNotImplement() {} - -var _ ProofTable = proofTable{} - -func NewProofTable(db ormtable.Schema) (ProofTable, error) { - table := db.GetTable(&Proof{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Proof{}).ProtoReflect().Descriptor().FullName())) - } - return proofTable{table}, nil -} - -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) (*ServiceRecord, error) - HasByOrigin(ctx context.Context, origin string) (found bool, err error) - // GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByOrigin(ctx context.Context, origin string) (*ServiceRecord, error) - HasByAuthorityOrigin(ctx context.Context, authority string, origin string) (found bool, err error) - // GetByAuthorityOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByAuthorityOrigin(ctx context.Context, authority string, origin 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 ServiceRecordIterator struct { - ormtable.Iterator -} - -func (i ServiceRecordIterator) Value() (*ServiceRecord, error) { - var serviceRecord ServiceRecord - err := i.UnmarshalMessage(&serviceRecord) - return &serviceRecord, err -} - -type ServiceRecordIndexKey interface { - id() uint32 - values() []interface{} - serviceRecordIndexKey() -} - -// primary key starting index.. -type ServiceRecordPrimaryKey = ServiceRecordIdIndexKey - -type ServiceRecordIdIndexKey struct { - vs []interface{} -} - -func (x ServiceRecordIdIndexKey) id() uint32 { return 0 } -func (x ServiceRecordIdIndexKey) values() []interface{} { return x.vs } -func (x ServiceRecordIdIndexKey) serviceRecordIndexKey() {} - -func (this ServiceRecordIdIndexKey) WithId(id string) ServiceRecordIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type ServiceRecordOriginIndexKey struct { - vs []interface{} -} - -func (x ServiceRecordOriginIndexKey) id() uint32 { return 1 } -func (x ServiceRecordOriginIndexKey) values() []interface{} { return x.vs } -func (x ServiceRecordOriginIndexKey) serviceRecordIndexKey() {} - -func (this ServiceRecordOriginIndexKey) WithOrigin(origin string) ServiceRecordOriginIndexKey { - this.vs = []interface{}{origin} - return this -} - -type ServiceRecordAuthorityOriginIndexKey struct { - vs []interface{} -} - -func (x ServiceRecordAuthorityOriginIndexKey) id() uint32 { return 2 } -func (x ServiceRecordAuthorityOriginIndexKey) values() []interface{} { return x.vs } -func (x ServiceRecordAuthorityOriginIndexKey) serviceRecordIndexKey() {} - -func (this ServiceRecordAuthorityOriginIndexKey) WithAuthority(authority string) ServiceRecordAuthorityOriginIndexKey { - this.vs = []interface{}{authority} - return this -} - -func (this ServiceRecordAuthorityOriginIndexKey) WithAuthorityOrigin(authority string, origin string) ServiceRecordAuthorityOriginIndexKey { - this.vs = []interface{}{authority, origin} - return this -} - -type serviceRecordTable struct { - table ormtable.Table -} - -func (this serviceRecordTable) Insert(ctx context.Context, serviceRecord *ServiceRecord) error { - return this.table.Insert(ctx, serviceRecord) -} - -func (this serviceRecordTable) Update(ctx context.Context, serviceRecord *ServiceRecord) error { - return this.table.Update(ctx, serviceRecord) -} - -func (this serviceRecordTable) Save(ctx context.Context, serviceRecord *ServiceRecord) error { - return this.table.Save(ctx, serviceRecord) -} - -func (this serviceRecordTable) Delete(ctx context.Context, serviceRecord *ServiceRecord) error { - return this.table.Delete(ctx, serviceRecord) -} - -func (this serviceRecordTable) Has(ctx context.Context, id string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, 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 &serviceRecord, nil -} - -func (this serviceRecordTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - origin, - ) -} - -func (this serviceRecordTable) GetByOrigin(ctx context.Context, origin string) (*ServiceRecord, error) { - var serviceRecord ServiceRecord - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &serviceRecord, nil -} - -func (this serviceRecordTable) HasByAuthorityOrigin(ctx context.Context, authority string, origin string) (found bool, err error) { +func (this verificationTable) HasByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (found bool, err error) { return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - authority, - origin, + controller, + did_method, + issuer, ) } -func (this serviceRecordTable) GetByAuthorityOrigin(ctx context.Context, authority string, origin string) (*ServiceRecord, error) { - var serviceRecord ServiceRecord - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, - authority, - origin, +func (this verificationTable) GetByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (*Verification, error) { + var verification Verification + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &verification, + controller, + did_method, + issuer, ) if err != nil { return nil, err @@ -797,246 +667,87 @@ func (this serviceRecordTable) GetByAuthorityOrigin(ctx context.Context, authori if !found { return nil, ormerrors.NotFound } - return &serviceRecord, nil + return &verification, nil } -func (this serviceRecordTable) List(ctx context.Context, prefixKey ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) { +func (this verificationTable) HasByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (found bool, err error) { + return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, + verification_type, + subject, + issuer, + ) +} + +func (this verificationTable) GetByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (*Verification, error) { + var verification Verification + found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &verification, + verification_type, + subject, + issuer, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &verification, nil +} + +func (this verificationTable) List(ctx context.Context, prefixKey VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ServiceRecordIterator{it}, err + return VerificationIterator{it}, err } -func (this serviceRecordTable) ListRange(ctx context.Context, from, to ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) { +func (this verificationTable) ListRange(ctx context.Context, from, to VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ServiceRecordIterator{it}, err + return VerificationIterator{it}, err } -func (this serviceRecordTable) DeleteBy(ctx context.Context, prefixKey ServiceRecordIndexKey) error { +func (this verificationTable) DeleteBy(ctx context.Context, prefixKey VerificationIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this serviceRecordTable) DeleteRange(ctx context.Context, from, to ServiceRecordIndexKey) error { +func (this verificationTable) DeleteRange(ctx context.Context, from, to VerificationIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this serviceRecordTable) doNotImplement() {} +func (this verificationTable) doNotImplement() {} -var _ ServiceRecordTable = serviceRecordTable{} +var _ VerificationTable = verificationTable{} -func NewServiceRecordTable(db ormtable.Schema) (ServiceRecordTable, error) { - table := db.GetTable(&ServiceRecord{}) +func NewVerificationTable(db ormtable.Schema) (VerificationTable, error) { + table := db.GetTable(&Verification{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&ServiceRecord{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Verification{}).ProtoReflect().Descriptor().FullName())) } - return serviceRecordTable{table}, nil -} - -type VerificationMethodTable interface { - Insert(ctx context.Context, verificationMethod *VerificationMethod) error - Update(ctx context.Context, verificationMethod *VerificationMethod) error - Save(ctx context.Context, verificationMethod *VerificationMethod) error - Delete(ctx context.Context, verificationMethod *VerificationMethod) 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) (*VerificationMethod, error) - HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error) - // GetByControllerMethodIssuerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*VerificationMethod, error) - List(ctx context.Context, prefixKey VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) - ListRange(ctx context.Context, from, to VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) - DeleteBy(ctx context.Context, prefixKey VerificationMethodIndexKey) error - DeleteRange(ctx context.Context, from, to VerificationMethodIndexKey) error - - doNotImplement() -} - -type VerificationMethodIterator struct { - ormtable.Iterator -} - -func (i VerificationMethodIterator) Value() (*VerificationMethod, error) { - var verificationMethod VerificationMethod - err := i.UnmarshalMessage(&verificationMethod) - return &verificationMethod, err -} - -type VerificationMethodIndexKey interface { - id() uint32 - values() []interface{} - verificationMethodIndexKey() -} - -// primary key starting index.. -type VerificationMethodPrimaryKey = VerificationMethodIdIndexKey - -type VerificationMethodIdIndexKey struct { - vs []interface{} -} - -func (x VerificationMethodIdIndexKey) id() uint32 { return 0 } -func (x VerificationMethodIdIndexKey) values() []interface{} { return x.vs } -func (x VerificationMethodIdIndexKey) verificationMethodIndexKey() {} - -func (this VerificationMethodIdIndexKey) WithId(id string) VerificationMethodIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type VerificationMethodControllerMethodIssuerSubjectIndexKey struct { - vs []interface{} -} - -func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) id() uint32 { return 1 } -func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) values() []interface{} { return x.vs } -func (x VerificationMethodControllerMethodIssuerSubjectIndexKey) verificationMethodIndexKey() {} - -func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithController(controller string) VerificationMethodControllerMethodIssuerSubjectIndexKey { - this.vs = []interface{}{controller} - return this -} - -func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethod(controller string, method DIDNamespace) VerificationMethodControllerMethodIssuerSubjectIndexKey { - this.vs = []interface{}{controller, method} - return this -} - -func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuer(controller string, method DIDNamespace, issuer string) VerificationMethodControllerMethodIssuerSubjectIndexKey { - this.vs = []interface{}{controller, method, issuer} - return this -} - -func (this VerificationMethodControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuerSubject(controller string, method DIDNamespace, issuer string, subject string) VerificationMethodControllerMethodIssuerSubjectIndexKey { - this.vs = []interface{}{controller, method, issuer, subject} - return this -} - -type verificationMethodTable struct { - table ormtable.Table -} - -func (this verificationMethodTable) Insert(ctx context.Context, verificationMethod *VerificationMethod) error { - return this.table.Insert(ctx, verificationMethod) -} - -func (this verificationMethodTable) Update(ctx context.Context, verificationMethod *VerificationMethod) error { - return this.table.Update(ctx, verificationMethod) -} - -func (this verificationMethodTable) Save(ctx context.Context, verificationMethod *VerificationMethod) error { - return this.table.Save(ctx, verificationMethod) -} - -func (this verificationMethodTable) Delete(ctx context.Context, verificationMethod *VerificationMethod) error { - return this.table.Delete(ctx, verificationMethod) -} - -func (this verificationMethodTable) Has(ctx context.Context, id string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this verificationMethodTable) Get(ctx context.Context, id string) (*VerificationMethod, error) { - var verificationMethod VerificationMethod - found, err := this.table.PrimaryKey().Get(ctx, &verificationMethod, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &verificationMethod, nil -} - -func (this verificationMethodTable) HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - controller, - method, - issuer, - subject, - ) -} - -func (this verificationMethodTable) GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*VerificationMethod, error) { - var verificationMethod VerificationMethod - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &verificationMethod, - controller, - method, - issuer, - subject, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &verificationMethod, nil -} - -func (this verificationMethodTable) List(ctx context.Context, prefixKey VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return VerificationMethodIterator{it}, err -} - -func (this verificationMethodTable) ListRange(ctx context.Context, from, to VerificationMethodIndexKey, opts ...ormlist.Option) (VerificationMethodIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return VerificationMethodIterator{it}, err -} - -func (this verificationMethodTable) DeleteBy(ctx context.Context, prefixKey VerificationMethodIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this verificationMethodTable) DeleteRange(ctx context.Context, from, to VerificationMethodIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this verificationMethodTable) doNotImplement() {} - -var _ VerificationMethodTable = verificationMethodTable{} - -func NewVerificationMethodTable(db ormtable.Schema) (VerificationMethodTable, error) { - table := db.GetTable(&VerificationMethod{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&VerificationMethod{}).ProtoReflect().Descriptor().FullName())) - } - return verificationMethodTable{table}, nil + return verificationTable{table}, nil } type StateStore interface { - AccountTable() AccountTable + AliasTable() AliasTable ControllerTable() ControllerTable - ProofTable() ProofTable - ServiceRecordTable() ServiceRecordTable - VerificationMethodTable() VerificationMethodTable + VerificationTable() VerificationTable doNotImplement() } type stateStore struct { - account AccountTable - controller ControllerTable - proof ProofTable - serviceRecord ServiceRecordTable - verificationMethod VerificationMethodTable + alias AliasTable + controller ControllerTable + verification VerificationTable } -func (x stateStore) AccountTable() AccountTable { - return x.account +func (x stateStore) AliasTable() AliasTable { + return x.alias } func (x stateStore) ControllerTable() ControllerTable { return x.controller } -func (x stateStore) ProofTable() ProofTable { - return x.proof -} - -func (x stateStore) ServiceRecordTable() ServiceRecordTable { - return x.serviceRecord -} - -func (x stateStore) VerificationMethodTable() VerificationMethodTable { - return x.verificationMethod +func (x stateStore) VerificationTable() VerificationTable { + return x.verification } func (stateStore) doNotImplement() {} @@ -1044,7 +755,7 @@ func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { - accountTable, err := NewAccountTable(db) + aliasTable, err := NewAliasTable(db) if err != nil { return nil, err } @@ -1054,26 +765,14 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } - proofTable, err := NewProofTable(db) - if err != nil { - return nil, err - } - - serviceRecordTable, err := NewServiceRecordTable(db) - if err != nil { - return nil, err - } - - verificationMethodTable, err := NewVerificationMethodTable(db) + verificationTable, err := NewVerificationTable(db) if err != nil { return nil, err } return stateStore{ - accountTable, + aliasTable, controllerTable, - proofTable, - serviceRecordTable, - verificationMethodTable, + verificationTable, }, nil } diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index c9f92430a..3d0e07460 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -10,102 +10,33 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" - sort "sort" sync "sync" ) -var _ protoreflect.List = (*_Account_8_list)(nil) - -type _Account_8_list struct { - list *[]string -} - -func (x *_Account_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Account_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Account_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Account_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Account_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Account at list field Chains as it is not of Message kind")) -} - -func (x *_Account_8_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Account_8_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Account_8_list) IsValid() bool { - return x.list != nil -} - var ( - md_Account protoreflect.MessageDescriptor - fd_Account_id protoreflect.FieldDescriptor - fd_Account_controller protoreflect.FieldDescriptor - fd_Account_public_key protoreflect.FieldDescriptor - fd_Account_address protoreflect.FieldDescriptor - fd_Account_label protoreflect.FieldDescriptor - fd_Account_chain_code protoreflect.FieldDescriptor - fd_Account_index protoreflect.FieldDescriptor - fd_Account_chains protoreflect.FieldDescriptor - md_Aliases protoreflect.MessageDescriptor - fd_Aliases_id protoreflect.FieldDescriptor - fd_Aliases_origin protoreflect.FieldDescriptor - fd_Aliases_subject protoreflect.FieldDescriptor - fd_Aliases_controller protoreflect.FieldDescriptor - fd_Aliases_expiration protoreflect.FieldDescriptor + md_Alias protoreflect.MessageDescriptor + fd_Alias_id protoreflect.FieldDescriptor + fd_Alias_subject protoreflect.FieldDescriptor + fd_Alias_origin protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Account = File_did_v1_state_proto.Messages().ByName("Account") - fd_Account_id = md_Account.Fields().ByName("id") - fd_Account_controller = md_Account.Fields().ByName("controller") - fd_Account_public_key = md_Account.Fields().ByName("public_key") - fd_Account_address = md_Account.Fields().ByName("address") - fd_Account_label = md_Account.Fields().ByName("label") - fd_Account_chain_code = md_Account.Fields().ByName("chain_code") - fd_Account_index = md_Account.Fields().ByName("index") - fd_Account_chains = md_Account.Fields().ByName("chains") - md_Aliases = File_did_v1_state_proto.Messages().ByName("Aliases") - fd_Aliases_id = md_Aliases.Fields().ByName("id") - fd_Aliases_origin = md_Aliases.Fields().ByName("origin") - fd_Aliases_subject = md_Aliases.Fields().ByName("subject") - fd_Aliases_controller = md_Aliases.Fields().ByName("controller") - fd_Aliases_expiration = md_Aliases.Fields().ByName("expiration") + md_Alias = File_did_v1_state_proto.Messages().ByName("Alias") + fd_Alias_id = md_Alias.Fields().ByName("id") + fd_Alias_subject = md_Alias.Fields().ByName("subject") + fd_Alias_origin = md_Alias.Fields().ByName("origin") } -var _ protoreflect.Message = (*fastReflection_Account)(nil) +var _ protoreflect.Message = (*fastReflection_Alias)(nil) -type fastReflection_Account Account +type fastReflection_Alias Alias -func (x *Account) ProtoReflect() protoreflect.Message { - return (*fastReflection_Account)(x) +func (x *Alias) ProtoReflect() protoreflect.Message { + return (*fastReflection_Alias)(x) } -func (x *Account) slowProtoReflect() protoreflect.Message { +func (x *Alias) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -117,43 +48,43 @@ func (x *Account) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Account_messageType fastReflection_Account_messageType -var _ protoreflect.MessageType = fastReflection_Account_messageType{} +var _fastReflection_Alias_messageType fastReflection_Alias_messageType +var _ protoreflect.MessageType = fastReflection_Alias_messageType{} -type fastReflection_Account_messageType struct{} +type fastReflection_Alias_messageType struct{} -func (x fastReflection_Account_messageType) Zero() protoreflect.Message { - return (*fastReflection_Account)(nil) +func (x fastReflection_Alias_messageType) Zero() protoreflect.Message { + return (*fastReflection_Alias)(nil) } -func (x fastReflection_Account_messageType) New() protoreflect.Message { - return new(fastReflection_Account) +func (x fastReflection_Alias_messageType) New() protoreflect.Message { + return new(fastReflection_Alias) } -func (x fastReflection_Account_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Account +func (x fastReflection_Alias_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Alias } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Account) Descriptor() protoreflect.MessageDescriptor { - return md_Account +func (x *fastReflection_Alias) Descriptor() protoreflect.MessageDescriptor { + return md_Alias } // 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_Account) Type() protoreflect.MessageType { - return _fastReflection_Account_messageType +func (x *fastReflection_Alias) Type() protoreflect.MessageType { + return _fastReflection_Alias_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Account) New() protoreflect.Message { - return new(fastReflection_Account) +func (x *fastReflection_Alias) New() protoreflect.Message { + return new(fastReflection_Alias) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Account) Interface() protoreflect.ProtoMessage { - return (*Account)(x) +func (x *fastReflection_Alias) Interface() protoreflect.ProtoMessage { + return (*Alias)(x) } // Range iterates over every populated field in an undefined order, @@ -161,65 +92,22 @@ func (x *fastReflection_Account) 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_Account) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Alias) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Account_id, value) { - if !f(fd_Aliases_id, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Aliases_origin, value) { + if !f(fd_Alias_id, value) { return } } if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Aliases_subject, value) { + if !f(fd_Alias_subject, value) { return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Account_controller, value) { - return - } - } - if x.PublicKey != nil { - value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_Account_public_key, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Account_address, value) { - return - } - } - if x.Label != "" { - value := protoreflect.ValueOfString(x.Label) - if !f(fd_Account_label, value) { - return - } - } - if x.ChainCode != uint32(0) { - value := protoreflect.ValueOfUint32(x.ChainCode) - if !f(fd_Account_chain_code, value) { - return - } - } - if x.Index != uint32(0) { - value := protoreflect.ValueOfUint32(x.Index) - if !f(fd_Account_index, value) { - return - } - } - if len(x.Chains) != 0 { - value := protoreflect.ValueOfList(&_Account_8_list{list: &x.Chains}) - if !f(fd_Account_chains, value) { + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Alias_origin, value) { return } } @@ -236,34 +124,19 @@ func (x *fastReflection_Account) 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_Account) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Alias) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Account.id": + case "did.v1.Alias.id": return x.Id != "" - case "did.v1.Account.controller": - case "did.v1.Aliases.origin": - return x.Origin != "" - case "did.v1.Aliases.subject": + case "did.v1.Alias.subject": return x.Subject != "" - case "did.v1.Aliases.controller": - return x.Controller != "" - case "did.v1.Account.public_key": - return x.PublicKey != nil - case "did.v1.Account.address": - return x.Address != "" - case "did.v1.Account.label": - return x.Label != "" - case "did.v1.Account.chain_code": - return x.ChainCode != uint32(0) - case "did.v1.Account.index": - return x.Index != uint32(0) - case "did.v1.Account.chains": - return len(x.Chains) != 0 + case "did.v1.Alias.origin": + return x.Origin != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -273,34 +146,19 @@ func (x *fastReflection_Account) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Account) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Alias) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Account.id": + case "did.v1.Alias.id": x.Id = "" - case "did.v1.Account.controller": - case "did.v1.Aliases.origin": - x.Origin = "" - case "did.v1.Aliases.subject": + case "did.v1.Alias.subject": x.Subject = "" - case "did.v1.Aliases.controller": - x.Controller = "" - case "did.v1.Account.public_key": - x.PublicKey = nil - case "did.v1.Account.address": - x.Address = "" - case "did.v1.Account.label": - x.Label = "" - case "did.v1.Account.chain_code": - x.ChainCode = uint32(0) - case "did.v1.Account.index": - x.Index = uint32(0) - case "did.v1.Account.chains": - x.Chains = nil + case "did.v1.Alias.origin": + x.Origin = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -310,47 +168,22 @@ func (x *fastReflection_Account) 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_Account) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Account.id": + case "did.v1.Alias.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Account.controller": - case "did.v1.Aliases.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Aliases.subject": + case "did.v1.Alias.subject": value := x.Subject return protoreflect.ValueOfString(value) - case "did.v1.Aliases.controller": - value := x.Controller + case "did.v1.Alias.origin": + value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.Account.public_key": - value := x.PublicKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Account.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "did.v1.Account.label": - value := x.Label - return protoreflect.ValueOfString(value) - case "did.v1.Account.chain_code": - value := x.ChainCode - return protoreflect.ValueOfUint32(value) - case "did.v1.Account.index": - value := x.Index - return protoreflect.ValueOfUint32(value) - case "did.v1.Account.chains": - if len(x.Chains) == 0 { - return protoreflect.ValueOfList(&_Account_8_list{}) - } - listValue := &_Account_8_list{list: &x.Chains} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", descriptor.FullName())) } } @@ -364,36 +197,19 @@ func (x *fastReflection_Account) 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_Account) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Alias) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Account.id": + case "did.v1.Alias.id": x.Id = value.Interface().(string) - case "did.v1.Account.controller": - case "did.v1.Aliases.origin": - x.Origin = value.Interface().(string) - case "did.v1.Aliases.subject": + case "did.v1.Alias.subject": x.Subject = value.Interface().(string) - case "did.v1.Aliases.controller": - x.Controller = value.Interface().(string) - case "did.v1.Account.public_key": - x.PublicKey = value.Message().Interface().(*PubKey) - case "did.v1.Account.address": - x.Address = value.Interface().(string) - case "did.v1.Account.label": - x.Label = value.Interface().(string) - case "did.v1.Account.chain_code": - x.ChainCode = uint32(value.Uint()) - case "did.v1.Account.index": - x.Index = uint32(value.Uint()) - case "did.v1.Account.chains": - lv := value.List() - clv := lv.(*_Account_8_list) - x.Chains = *clv.list + case "did.v1.Alias.origin": + x.Origin = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName())) } } @@ -407,88 +223,48 @@ func (x *fastReflection_Account) 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_Account) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Account.public_key": - if x.PublicKey == nil { - x.PublicKey = new(PubKey) - } - return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - case "did.v1.Account.chains": - if x.Chains == nil { - x.Chains = []string{} - } - value := &_Account_8_list{list: &x.Chains} - return protoreflect.ValueOfList(value) - case "did.v1.Account.id": - panic(fmt.Errorf("field id of message did.v1.Account is not mutable")) - case "did.v1.Account.controller": - panic(fmt.Errorf("field controller of message did.v1.Account is not mutable")) - case "did.v1.Account.address": - panic(fmt.Errorf("field address of message did.v1.Account is not mutable")) - case "did.v1.Account.label": - panic(fmt.Errorf("field label of message did.v1.Account is not mutable")) - case "did.v1.Account.chain_code": - panic(fmt.Errorf("field chain_code of message did.v1.Account is not mutable")) - case "did.v1.Account.index": - panic(fmt.Errorf("field index of message did.v1.Account is not mutable")) - case "did.v1.Aliases.id": - panic(fmt.Errorf("field id of message did.v1.Aliases is not mutable")) - case "did.v1.Aliases.origin": - panic(fmt.Errorf("field origin of message did.v1.Aliases is not mutable")) - case "did.v1.Aliases.subject": - panic(fmt.Errorf("field subject of message did.v1.Aliases is not mutable")) - case "did.v1.Aliases.controller": - panic(fmt.Errorf("field controller of message did.v1.Aliases is not mutable")) - case "did.v1.Aliases.expiration": - panic(fmt.Errorf("field expiration of message did.v1.Aliases is not mutable")) + case "did.v1.Alias.id": + panic(fmt.Errorf("field id of message did.v1.Alias is not mutable")) + case "did.v1.Alias.subject": + panic(fmt.Errorf("field subject of message did.v1.Alias is not mutable")) + case "did.v1.Alias.origin": + panic(fmt.Errorf("field origin of message did.v1.Alias is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias 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_Account) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Alias) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Account.id": + case "did.v1.Alias.id": return protoreflect.ValueOfString("") - case "did.v1.Account.controller": + case "did.v1.Alias.subject": return protoreflect.ValueOfString("") - case "did.v1.Account.public_key": - m := new(PubKey) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Account.address": - case "did.v1.Aliases.subject": + case "did.v1.Alias.origin": return protoreflect.ValueOfString("") - case "did.v1.Account.label": - return protoreflect.ValueOfString("") - case "did.v1.Account.chain_code": - return protoreflect.ValueOfUint32(uint32(0)) - case "did.v1.Account.index": - return protoreflect.ValueOfUint32(uint32(0)) - case "did.v1.Account.chains": - list := []string{} - return protoreflect.ValueOfList(&_Account_8_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias")) } - panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Alias 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_Account) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Alias) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Account", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Alias", d.FullName())) } panic("unreachable") } @@ -496,7 +272,7 @@ func (x *fastReflection_Account) 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_Account) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Alias) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -507,7 +283,7 @@ func (x *fastReflection_Account) 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_Account) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Alias) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -519,7 +295,7 @@ func (x *fastReflection_Account) 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_Account) IsValid() bool { +func (x *fastReflection_Alias) IsValid() bool { return x != nil } @@ -529,9 +305,9 @@ func (x *fastReflection_Account) 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_Account) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Alias) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Account) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -547,42 +323,14 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { 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)) } - l = len(x.Controller) + l = len(x.Origin) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.PublicKey != nil { - l = options.Size(x.PublicKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Label) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ChainCode != 0 { - n += 1 + runtime.Sov(uint64(x.ChainCode)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - if len(x.Chains) > 0 { - for _, s := range x.Chains { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -593,7 +341,7 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Account) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -612,72 +360,18 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Chains) > 0 { - for iNdEx := len(x.Chains) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Chains[iNdEx]) - copy(dAtA[i:], x.Chains[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chains[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x38 - } - if x.ChainCode != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ChainCode)) - i-- - dAtA[i] = 0x30 - } - if len(x.Label) > 0 { - i -= len(x.Label) - copy(dAtA[i:], x.Label) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Label))) - i-- - dAtA[i] = 0x2a - } - 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] = 0x22 - } - if x.PublicKey != nil { - encoded, err := options.Marshal(x.PublicKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + 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] = 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.Id) > 0 { @@ -698,7 +392,7 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Account) + x := input.Message.Interface().(*Alias) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -730,10 +424,10 @@ func (x *fastReflection_Account) 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: Account: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -769,38 +463,6 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { 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 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) } @@ -832,77 +494,9 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { } 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 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 PublicKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.PublicKey == nil { - x.PublicKey = &PubKey{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - 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 Origin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -930,109 +524,7 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = 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 Label", 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.Label = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainCode", wireType) - } - x.ChainCode = 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.ChainCode |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 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.Index |= uint32(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 Chains", 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.Chains = append(x.Chains, string(dAtA[iNdEx:postIndex])) + x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1069,127 +561,123 @@ func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_Controller_3_list)(nil) +var _ protoreflect.List = (*_Controller_5_list)(nil) -type _Controller_3_list struct { - list *[]*Alias +type _Controller_5_list struct { + list *[]string } -func (x *_Controller_3_list) Len() int { +func (x *_Controller_5_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.ValueOfMessage((*x.list)[i].ProtoReflect()) +func (x *_Controller_5_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.Message() - concreteValue := valueUnwrapped.Interface().(*Alias) +func (x *_Controller_5_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.Message() - concreteValue := valueUnwrapped.Interface().(*Alias) +func (x *_Controller_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Controller_3_list) AppendMutable() protoreflect.Value { - v := new(Alias) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Controller_5_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) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } +func (x *_Controller_5_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Controller_3_list) NewElement() protoreflect.Value { - v := new(Alias) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Controller_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) } -func (x *_Controller_3_list) IsValid() bool { +func (x *_Controller_5_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Controller_6_list)(nil) +var _ protoreflect.List = (*_Controller_8_list)(nil) -type _Controller_6_list struct { - list *[]*Credential +type _Controller_8_list struct { + list *[]string } -func (x *_Controller_6_list) Len() int { +func (x *_Controller_8_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Controller_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +func (x *_Controller_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_Controller_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) +func (x *_Controller_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_Controller_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) +func (x *_Controller_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Controller_6_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Controller_8_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Controller at list field Authentication as it is not of Message kind")) } -func (x *_Controller_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } +func (x *_Controller_8_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Controller_6_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) +func (x *_Controller_8_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) } -func (x *_Controller_6_list) IsValid() bool { +func (x *_Controller_8_list) IsValid() bool { return x.list != nil } var ( md_Controller protoreflect.MessageDescriptor fd_Controller_id protoreflect.FieldDescriptor - fd_Controller_address protoreflect.FieldDescriptor + fd_Controller_sonr_address protoreflect.FieldDescriptor + fd_Controller_eth_address protoreflect.FieldDescriptor + fd_Controller_btc_address protoreflect.FieldDescriptor fd_Controller_aliases protoreflect.FieldDescriptor fd_Controller_public_key protoreflect.FieldDescriptor fd_Controller_vault_cid protoreflect.FieldDescriptor fd_Controller_authentication protoreflect.FieldDescriptor + fd_Controller_status protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_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_sonr_address = md_Controller.Fields().ByName("sonr_address") + fd_Controller_eth_address = md_Controller.Fields().ByName("eth_address") + fd_Controller_btc_address = md_Controller.Fields().ByName("btc_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") fd_Controller_authentication = md_Controller.Fields().ByName("authentication") + fd_Controller_status = md_Controller.Fields().ByName("status") } var _ protoreflect.Message = (*fastReflection_Controller)(nil) @@ -1263,14 +751,26 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Controller_address, value) { + if x.SonrAddress != "" { + value := protoreflect.ValueOfString(x.SonrAddress) + if !f(fd_Controller_sonr_address, value) { + return + } + } + if x.EthAddress != "" { + value := protoreflect.ValueOfString(x.EthAddress) + if !f(fd_Controller_eth_address, value) { + return + } + } + if x.BtcAddress != "" { + value := protoreflect.ValueOfString(x.BtcAddress) + if !f(fd_Controller_btc_address, value) { return } } if len(x.Aliases) != 0 { - value := protoreflect.ValueOfList(&_Controller_3_list{list: &x.Aliases}) + value := protoreflect.ValueOfList(&_Controller_5_list{list: &x.Aliases}) if !f(fd_Controller_aliases, value) { return } @@ -1288,11 +788,17 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p } } if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_Controller_6_list{list: &x.Authentication}) + value := protoreflect.ValueOfList(&_Controller_8_list{list: &x.Authentication}) if !f(fd_Controller_authentication, value) { return } } + if x.Status != "" { + value := protoreflect.ValueOfString(x.Status) + if !f(fd_Controller_status, value) { + return + } + } } // Has reports whether a field is populated. @@ -1310,8 +816,12 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.Controller.id": return x.Id != "" - case "did.v1.Controller.address": - return x.Address != "" + case "did.v1.Controller.sonr_address": + return x.SonrAddress != "" + case "did.v1.Controller.eth_address": + return x.EthAddress != "" + case "did.v1.Controller.btc_address": + return x.BtcAddress != "" case "did.v1.Controller.aliases": return len(x.Aliases) != 0 case "did.v1.Controller.public_key": @@ -1320,6 +830,8 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { return x.VaultCid != "" case "did.v1.Controller.authentication": return len(x.Authentication) != 0 + case "did.v1.Controller.status": + return x.Status != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1338,8 +850,12 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.Controller.id": x.Id = "" - case "did.v1.Controller.address": - x.Address = "" + case "did.v1.Controller.sonr_address": + x.SonrAddress = "" + case "did.v1.Controller.eth_address": + x.EthAddress = "" + case "did.v1.Controller.btc_address": + x.BtcAddress = "" case "did.v1.Controller.aliases": x.Aliases = nil case "did.v1.Controller.public_key": @@ -1348,6 +864,8 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { x.VaultCid = "" case "did.v1.Controller.authentication": x.Authentication = nil + case "did.v1.Controller.status": + x.Status = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1367,14 +885,20 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Controller.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Controller.address": - value := x.Address + case "did.v1.Controller.sonr_address": + value := x.SonrAddress + return protoreflect.ValueOfString(value) + case "did.v1.Controller.eth_address": + value := x.EthAddress + return protoreflect.ValueOfString(value) + case "did.v1.Controller.btc_address": + value := x.BtcAddress return protoreflect.ValueOfString(value) case "did.v1.Controller.aliases": if len(x.Aliases) == 0 { - return protoreflect.ValueOfList(&_Controller_3_list{}) + return protoreflect.ValueOfList(&_Controller_5_list{}) } - listValue := &_Controller_3_list{list: &x.Aliases} + listValue := &_Controller_5_list{list: &x.Aliases} return protoreflect.ValueOfList(listValue) case "did.v1.Controller.public_key": value := x.PublicKey @@ -1384,10 +908,13 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) return protoreflect.ValueOfString(value) case "did.v1.Controller.authentication": if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_Controller_6_list{}) + return protoreflect.ValueOfList(&_Controller_8_list{}) } - listValue := &_Controller_6_list{list: &x.Authentication} + listValue := &_Controller_8_list{list: &x.Authentication} return protoreflect.ValueOfList(listValue) + case "did.v1.Controller.status": + value := x.Status + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1410,11 +937,15 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p switch fd.FullName() { case "did.v1.Controller.id": x.Id = value.Interface().(string) - case "did.v1.Controller.address": - x.Address = value.Interface().(string) + case "did.v1.Controller.sonr_address": + x.SonrAddress = value.Interface().(string) + case "did.v1.Controller.eth_address": + x.EthAddress = value.Interface().(string) + case "did.v1.Controller.btc_address": + x.BtcAddress = value.Interface().(string) case "did.v1.Controller.aliases": lv := value.List() - clv := lv.(*_Controller_3_list) + clv := lv.(*_Controller_5_list) x.Aliases = *clv.list case "did.v1.Controller.public_key": x.PublicKey = value.Message().Interface().(*PubKey) @@ -1422,8 +953,10 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p x.VaultCid = value.Interface().(string) case "did.v1.Controller.authentication": lv := value.List() - clv := lv.(*_Controller_6_list) + clv := lv.(*_Controller_8_list) x.Authentication = *clv.list + case "did.v1.Controller.status": + x.Status = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1446,9 +979,9 @@ func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) pro switch fd.FullName() { case "did.v1.Controller.aliases": if x.Aliases == nil { - x.Aliases = []*Alias{} + x.Aliases = []string{} } - value := &_Controller_3_list{list: &x.Aliases} + value := &_Controller_5_list{list: &x.Aliases} return protoreflect.ValueOfList(value) case "did.v1.Controller.public_key": if x.PublicKey == nil { @@ -1457,16 +990,22 @@ func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) case "did.v1.Controller.authentication": if x.Authentication == nil { - x.Authentication = []*Credential{} + x.Authentication = []string{} } - value := &_Controller_6_list{list: &x.Authentication} + value := &_Controller_8_list{list: &x.Authentication} return protoreflect.ValueOfList(value) case "did.v1.Controller.id": panic(fmt.Errorf("field id of message did.v1.Controller is not mutable")) - case "did.v1.Controller.address": - panic(fmt.Errorf("field address of message did.v1.Controller is not mutable")) + case "did.v1.Controller.sonr_address": + panic(fmt.Errorf("field sonr_address of message did.v1.Controller is not mutable")) + case "did.v1.Controller.eth_address": + panic(fmt.Errorf("field eth_address of message did.v1.Controller is not mutable")) + case "did.v1.Controller.btc_address": + panic(fmt.Errorf("field btc_address of message did.v1.Controller is not mutable")) case "did.v1.Controller.vault_cid": panic(fmt.Errorf("field vault_cid of message did.v1.Controller is not mutable")) + case "did.v1.Controller.status": + panic(fmt.Errorf("field status of message did.v1.Controller is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1482,19 +1021,25 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr switch fd.FullName() { case "did.v1.Controller.id": return protoreflect.ValueOfString("") - case "did.v1.Controller.address": + case "did.v1.Controller.sonr_address": + return protoreflect.ValueOfString("") + case "did.v1.Controller.eth_address": + return protoreflect.ValueOfString("") + case "did.v1.Controller.btc_address": return protoreflect.ValueOfString("") case "did.v1.Controller.aliases": - list := []*Alias{} - return protoreflect.ValueOfList(&_Controller_3_list{list: &list}) + list := []string{} + return protoreflect.ValueOfList(&_Controller_5_list{list: &list}) case "did.v1.Controller.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Controller.vault_cid": return protoreflect.ValueOfString("") case "did.v1.Controller.authentication": - list := []*Credential{} - return protoreflect.ValueOfList(&_Controller_6_list{list: &list}) + list := []string{} + return protoreflect.ValueOfList(&_Controller_8_list{list: &list}) + case "did.v1.Controller.status": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) @@ -1568,13 +1113,21 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Address) + l = len(x.SonrAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.EthAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BtcAddress) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Aliases) > 0 { - for _, e := range x.Aliases { - l = options.Size(e) + for _, s := range x.Aliases { + l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -1587,11 +1140,15 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Authentication) > 0 { - for _, e := range x.Authentication { - l = options.Size(e) + for _, s := range x.Authentication { + l = len(s) n += 1 + l + runtime.Sov(uint64(l)) } } + l = len(x.Status) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1621,20 +1178,20 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Status) > 0 { + i -= len(x.Status) + copy(dAtA[i:], x.Status) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Status))) + i-- + dAtA[i] = 0x4a + } 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 -= len(x.Authentication[iNdEx]) + copy(dAtA[i:], x.Authentication[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx]))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } } if len(x.VaultCid) > 0 { @@ -1642,7 +1199,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.VaultCid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VaultCid))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } if x.PublicKey != nil { encoded, err := options.Marshal(x.PublicKey) @@ -1656,28 +1213,35 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } if len(x.Aliases) > 0 { for iNdEx := len(x.Aliases) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Aliases[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 -= len(x.Aliases[iNdEx]) + copy(dAtA[i:], x.Aliases[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aliases[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a } } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if len(x.BtcAddress) > 0 { + i -= len(x.BtcAddress) + copy(dAtA[i:], x.BtcAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BtcAddress))) + i-- + dAtA[i] = 0x22 + } + if len(x.EthAddress) > 0 { + i -= len(x.EthAddress) + copy(dAtA[i:], x.EthAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.SonrAddress) > 0 { + i -= len(x.SonrAddress) + copy(dAtA[i:], x.SonrAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SonrAddress))) i-- dAtA[i] = 0x12 } @@ -1771,7 +1335,7 @@ func (x *fastReflection_Controller) 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 Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SonrAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1799,13 +1363,13 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = string(dAtA[iNdEx:postIndex]) + x.SonrAddress = 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1815,27 +1379,89 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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, &Alias{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Aliases[len(x.Aliases)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.EthAddress = 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 BtcAddress", 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.BtcAddress = 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 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 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } @@ -1871,7 +1497,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 5: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VaultCid", wireType) } @@ -1903,11 +1529,11 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } x.VaultCid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1917,25 +1543,55 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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.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 + x.Authentication = append(x.Authentication, 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 Status", 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.Status = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1973,35 +1629,37 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } var ( - md_Proof protoreflect.MessageDescriptor - fd_Proof_id protoreflect.FieldDescriptor - fd_Proof_controller protoreflect.FieldDescriptor - fd_Proof_issuer protoreflect.FieldDescriptor - fd_Proof_property protoreflect.FieldDescriptor - fd_Proof_accumulator protoreflect.FieldDescriptor - fd_Proof_key protoreflect.FieldDescriptor + md_Verification protoreflect.MessageDescriptor + fd_Verification_id protoreflect.FieldDescriptor + fd_Verification_controller protoreflect.FieldDescriptor + fd_Verification_did_method protoreflect.FieldDescriptor + fd_Verification_issuer protoreflect.FieldDescriptor + fd_Verification_subject protoreflect.FieldDescriptor + fd_Verification_public_key protoreflect.FieldDescriptor + fd_Verification_verification_type protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Proof = File_did_v1_state_proto.Messages().ByName("Proof") - fd_Proof_id = md_Proof.Fields().ByName("id") - fd_Proof_controller = md_Proof.Fields().ByName("controller") - fd_Proof_issuer = md_Proof.Fields().ByName("issuer") - fd_Proof_property = md_Proof.Fields().ByName("property") - fd_Proof_accumulator = md_Proof.Fields().ByName("accumulator") - fd_Proof_key = md_Proof.Fields().ByName("key") + md_Verification = File_did_v1_state_proto.Messages().ByName("Verification") + fd_Verification_id = md_Verification.Fields().ByName("id") + fd_Verification_controller = md_Verification.Fields().ByName("controller") + fd_Verification_did_method = md_Verification.Fields().ByName("did_method") + fd_Verification_issuer = md_Verification.Fields().ByName("issuer") + fd_Verification_subject = md_Verification.Fields().ByName("subject") + fd_Verification_public_key = md_Verification.Fields().ByName("public_key") + fd_Verification_verification_type = md_Verification.Fields().ByName("verification_type") } -var _ protoreflect.Message = (*fastReflection_Proof)(nil) +var _ protoreflect.Message = (*fastReflection_Verification)(nil) -type fastReflection_Proof Proof +type fastReflection_Verification Verification -func (x *Proof) ProtoReflect() protoreflect.Message { - return (*fastReflection_Proof)(x) +func (x *Verification) ProtoReflect() protoreflect.Message { + return (*fastReflection_Verification)(x) } -func (x *Proof) slowProtoReflect() protoreflect.Message { +func (x *Verification) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2013,43 +1671,43 @@ func (x *Proof) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Proof_messageType fastReflection_Proof_messageType -var _ protoreflect.MessageType = fastReflection_Proof_messageType{} +var _fastReflection_Verification_messageType fastReflection_Verification_messageType +var _ protoreflect.MessageType = fastReflection_Verification_messageType{} -type fastReflection_Proof_messageType struct{} +type fastReflection_Verification_messageType struct{} -func (x fastReflection_Proof_messageType) Zero() protoreflect.Message { - return (*fastReflection_Proof)(nil) +func (x fastReflection_Verification_messageType) Zero() protoreflect.Message { + return (*fastReflection_Verification)(nil) } -func (x fastReflection_Proof_messageType) New() protoreflect.Message { - return new(fastReflection_Proof) +func (x fastReflection_Verification_messageType) New() protoreflect.Message { + return new(fastReflection_Verification) } -func (x fastReflection_Proof_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Proof +func (x fastReflection_Verification_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Verification } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Proof) Descriptor() protoreflect.MessageDescriptor { - return md_Proof +func (x *fastReflection_Verification) Descriptor() protoreflect.MessageDescriptor { + return md_Verification } // 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_Proof) Type() protoreflect.MessageType { - return _fastReflection_Proof_messageType +func (x *fastReflection_Verification) Type() protoreflect.MessageType { + return _fastReflection_Verification_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Proof) New() protoreflect.Message { - return new(fastReflection_Proof) +func (x *fastReflection_Verification) New() protoreflect.Message { + return new(fastReflection_Verification) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Proof) Interface() protoreflect.ProtoMessage { - return (*Proof)(x) +func (x *fastReflection_Verification) Interface() protoreflect.ProtoMessage { + return (*Verification)(x) } // Range iterates over every populated field in an undefined order, @@ -2057,2006 +1715,46 @@ func (x *fastReflection_Proof) 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_Proof) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Verification) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Proof_id, value) { + if !f(fd_Verification_id, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Proof_controller, value) { + if !f(fd_Verification_controller, value) { + return + } + } + if x.DidMethod != "" { + value := protoreflect.ValueOfString(x.DidMethod) + if !f(fd_Verification_did_method, value) { return } } if x.Issuer != "" { value := protoreflect.ValueOfString(x.Issuer) - if !f(fd_Proof_issuer, value) { - return - } - } - if x.Property != "" { - value := protoreflect.ValueOfString(x.Property) - if !f(fd_Proof_property, value) { - return - } - } - if len(x.Accumulator) != 0 { - value := protoreflect.ValueOfBytes(x.Accumulator) - if !f(fd_Proof_accumulator, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_Proof_key, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Proof) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Proof.id": - return x.Id != "" - case "did.v1.Proof.controller": - return x.Controller != "" - case "did.v1.Proof.issuer": - return x.Issuer != "" - case "did.v1.Proof.property": - return x.Property != "" - case "did.v1.Proof.accumulator": - return len(x.Accumulator) != 0 - case "did.v1.Proof.key": - return len(x.Key) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Proof.id": - x.Id = "" - case "did.v1.Proof.controller": - x.Controller = "" - case "did.v1.Proof.issuer": - x.Issuer = "" - case "did.v1.Proof.property": - x.Property = "" - case "did.v1.Proof.accumulator": - x.Accumulator = nil - case "did.v1.Proof.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Proof.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Proof.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Proof.issuer": - value := x.Issuer - return protoreflect.ValueOfString(value) - case "did.v1.Proof.property": - value := x.Property - return protoreflect.ValueOfString(value) - case "did.v1.Proof.accumulator": - value := x.Accumulator - return protoreflect.ValueOfBytes(value) - case "did.v1.Proof.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Proof.id": - x.Id = value.Interface().(string) - case "did.v1.Proof.controller": - x.Controller = value.Interface().(string) - case "did.v1.Proof.issuer": - x.Issuer = value.Interface().(string) - case "did.v1.Proof.property": - x.Property = value.Interface().(string) - case "did.v1.Proof.accumulator": - x.Accumulator = value.Bytes() - case "did.v1.Proof.key": - x.Key = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Proof.id": - panic(fmt.Errorf("field id of message did.v1.Proof is not mutable")) - case "did.v1.Proof.controller": - panic(fmt.Errorf("field controller of message did.v1.Proof is not mutable")) - case "did.v1.Proof.issuer": - panic(fmt.Errorf("field issuer of message did.v1.Proof is not mutable")) - case "did.v1.Proof.property": - panic(fmt.Errorf("field property of message did.v1.Proof is not mutable")) - case "did.v1.Proof.accumulator": - panic(fmt.Errorf("field accumulator of message did.v1.Proof is not mutable")) - case "did.v1.Proof.key": - panic(fmt.Errorf("field key of message did.v1.Proof is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Proof.id": - return protoreflect.ValueOfString("") - case "did.v1.Proof.controller": - return protoreflect.ValueOfString("") - case "did.v1.Proof.issuer": - return protoreflect.ValueOfString("") - case "did.v1.Proof.property": - return protoreflect.ValueOfString("") - case "did.v1.Proof.accumulator": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Proof.key": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Proof")) - } - panic(fmt.Errorf("message did.v1.Proof 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_Proof) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Proof", 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_Proof) 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_Proof) 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_Proof) 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_Proof) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Proof) - 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.Issuer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Property) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Accumulator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - 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().(*Proof) - 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.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x32 - } - 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] = 0x2a - } - if len(x.Property) > 0 { - i -= len(x.Property) - copy(dAtA[i:], x.Property) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) - i-- - dAtA[i] = 0x22 - } - 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] = 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().(*Proof) - 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: Proof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Proof: 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 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 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulator", 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.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if x.Accumulator == nil { - x.Accumulator = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - 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 = (*_ServiceRecord_6_map)(nil) - -type _ServiceRecord_6_map struct { - m *map[string]string -} - -func (x *_ServiceRecord_6_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_ServiceRecord_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_ServiceRecord_6_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_ServiceRecord_6_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_ServiceRecord_6_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_ServiceRecord_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -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 *_ServiceRecord_6_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ServiceRecord_6_map) IsValid() bool { - return x.m != nil -} - -var ( - md_ServiceRecord protoreflect.MessageDescriptor - fd_ServiceRecord_id protoreflect.FieldDescriptor - fd_ServiceRecord_service_type protoreflect.FieldDescriptor - fd_ServiceRecord_authority protoreflect.FieldDescriptor - fd_ServiceRecord_origin protoreflect.FieldDescriptor - fd_ServiceRecord_description protoreflect.FieldDescriptor - fd_ServiceRecord_service_endpoints protoreflect.FieldDescriptor - fd_ServiceRecord_permissions protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_state_proto_init() - 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_authority = md_ServiceRecord.Fields().ByName("authority") - fd_ServiceRecord_origin = md_ServiceRecord.Fields().ByName("origin") - 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") -} - -var _ protoreflect.Message = (*fastReflection_ServiceRecord)(nil) - -type fastReflection_ServiceRecord ServiceRecord - -func (x *ServiceRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_ServiceRecord)(x) -} - -func (x *ServiceRecord) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ServiceRecord_messageType fastReflection_ServiceRecord_messageType -var _ protoreflect.MessageType = fastReflection_ServiceRecord_messageType{} - -type fastReflection_ServiceRecord_messageType struct{} - -func (x fastReflection_ServiceRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_ServiceRecord)(nil) -} -func (x fastReflection_ServiceRecord_messageType) New() protoreflect.Message { - return new(fastReflection_ServiceRecord) -} -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_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_ServiceRecord) Type() protoreflect.MessageType { - return _fastReflection_ServiceRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -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_ServiceRecord) Interface() protoreflect.ProtoMessage { - return (*ServiceRecord)(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_ServiceRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_ServiceRecord_id, value) { - return - } - } - if x.ServiceType != "" { - value := protoreflect.ValueOfString(x.ServiceType) - if !f(fd_ServiceRecord_service_type, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_ServiceRecord_authority, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_ServiceRecord_origin, 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(&_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_ServiceRecord_permissions, 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_ServiceRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ServiceRecord.id": - return x.Id != "" - case "did.v1.ServiceRecord.service_type": - return x.ServiceType != "" - case "did.v1.ServiceRecord.authority": - return x.Authority != "" - case "did.v1.ServiceRecord.origin": - return x.Origin != "" - case "did.v1.ServiceRecord.description": - return x.Description != "" - case "did.v1.ServiceRecord.service_endpoints": - return len(x.ServiceEndpoints) != 0 - case "did.v1.ServiceRecord.permissions": - return x.Permissions != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) - } - panic(fmt.Errorf("message did.v1.ServiceRecord 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_ServiceRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ServiceRecord.id": - x.Id = "" - case "did.v1.ServiceRecord.service_type": - x.ServiceType = "" - case "did.v1.ServiceRecord.authority": - x.Authority = "" - case "did.v1.ServiceRecord.origin": - x.Origin = "" - case "did.v1.ServiceRecord.description": - x.Description = "" - case "did.v1.ServiceRecord.service_endpoints": - x.ServiceEndpoints = nil - case "did.v1.ServiceRecord.permissions": - x.Permissions = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) - } - panic(fmt.Errorf("message did.v1.ServiceRecord 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_ServiceRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ServiceRecord.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.ServiceRecord.service_type": - value := x.ServiceType - return protoreflect.ValueOfString(value) - case "did.v1.ServiceRecord.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.ServiceRecord.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - 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(&_ServiceRecord_6_map{}) - } - mapValue := &_ServiceRecord_6_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.ServiceRecord.permissions": - value := x.Permissions - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) - } - panic(fmt.Errorf("message did.v1.ServiceRecord 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_ServiceRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ServiceRecord.id": - x.Id = value.Interface().(string) - case "did.v1.ServiceRecord.service_type": - x.ServiceType = value.Interface().(string) - case "did.v1.ServiceRecord.authority": - x.Authority = value.Interface().(string) - case "did.v1.ServiceRecord.origin": - x.Origin = value.Interface().(string) - case "did.v1.ServiceRecord.description": - x.Description = value.Interface().(string) - case "did.v1.ServiceRecord.service_endpoints": - mv := value.Map() - cmv := mv.(*_ServiceRecord_6_map) - x.ServiceEndpoints = *cmv.m - case "did.v1.ServiceRecord.permissions": - x.Permissions = value.Message().Interface().(*Permissions) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) - } - panic(fmt.Errorf("message did.v1.ServiceRecord 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_ServiceRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ServiceRecord.service_endpoints": - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - value := &_ServiceRecord_6_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(value) - case "did.v1.ServiceRecord.permissions": - if x.Permissions == nil { - x.Permissions = new(Permissions) - } - return protoreflect.ValueOfMessage(x.Permissions.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.authority": - panic(fmt.Errorf("field authority of message did.v1.ServiceRecord is not mutable")) - case "did.v1.ServiceRecord.origin": - panic(fmt.Errorf("field origin 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.ServiceRecord")) - } - 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_ServiceRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ServiceRecord.id": - return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.service_type": - return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.authority": - return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.origin": - return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.description": - return protoreflect.ValueOfString("") - case "did.v1.ServiceRecord.service_endpoints": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_ServiceRecord_6_map{m: &m}) - case "did.v1.ServiceRecord.permissions": - m := new(Permissions) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) - } - 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_ServiceRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ServiceRecord", 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_ServiceRecord) 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_ServiceRecord) 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_ServiceRecord) 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_ServiceRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ServiceRecord) - 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.ServiceType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - 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.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)) - } - 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.Permissions != nil { - l = options.Size(x.Permissions) - 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().(*ServiceRecord) - 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.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] = 0x3a - } - 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] = 0x32 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) - } - sort.Slice(keysForServiceEndpoints, func(i, j int) bool { - return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] - }) - for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { - v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] - out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.ServiceEndpoints { - v := x.ServiceEndpoints[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.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.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.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x1a - } - if len(x.ServiceType) > 0 { - i -= len(x.ServiceType) - copy(dAtA[i:], x.ServiceType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceType))) - 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().(*ServiceRecord) - 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: ServiceRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - 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: - 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 ServiceType", 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.ServiceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 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 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 7: - 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 - 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 = (*_Service_5_map)(nil) - -type _Service_5_map struct { - m *map[string]string -} - -func (x *_Service_5_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Service_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Service_5_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Service_5_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Service_5_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_Service_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Service_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_Service_5_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Service_5_map) IsValid() bool { - return x.m != nil -} - -var _ protoreflect.List = (*_Service_6_list)(nil) - -type _Service_6_list struct { - list *[]PermissionScope -} - -func (x *_Service_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Service_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) -} - -func (x *_Service_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_Service_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Service_6_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Service at list field Scopes as it is not of Message kind")) -} - -func (x *_Service_6_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Service_6_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) -} - -func (x *_Service_6_list) IsValid() bool { - return x.list != nil -} - -var ( - md_VerificationMethod protoreflect.MessageDescriptor - fd_VerificationMethod_id protoreflect.FieldDescriptor - fd_VerificationMethod_controller protoreflect.FieldDescriptor - fd_VerificationMethod_method protoreflect.FieldDescriptor - fd_VerificationMethod_issuer protoreflect.FieldDescriptor - fd_VerificationMethod_subject protoreflect.FieldDescriptor - fd_VerificationMethod_public_key protoreflect.FieldDescriptor - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_service_type protoreflect.FieldDescriptor - fd_Service_controller_did protoreflect.FieldDescriptor - fd_Service_origin_uri protoreflect.FieldDescriptor - fd_Service_service_endpoints protoreflect.FieldDescriptor - fd_Service_scopes protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_state_proto_init() - md_VerificationMethod = File_did_v1_state_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_issuer = md_VerificationMethod.Fields().ByName("issuer") - fd_VerificationMethod_subject = md_VerificationMethod.Fields().ByName("subject") - fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key") - 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_scopes = md_Service.Fields().ByName("scopes") -} - -var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) - -type fastReflection_VerificationMethod VerificationMethod - -func (x *VerificationMethod) ProtoReflect() protoreflect.Message { - return (*fastReflection_VerificationMethod)(x) -} - -func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_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_VerificationMethod_messageType fastReflection_VerificationMethod_messageType -var _ protoreflect.MessageType = fastReflection_VerificationMethod_messageType{} - -type fastReflection_VerificationMethod_messageType struct{} - -func (x fastReflection_VerificationMethod_messageType) Zero() protoreflect.Message { - return (*fastReflection_VerificationMethod)(nil) -} -func (x fastReflection_VerificationMethod_messageType) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} -func (x fastReflection_VerificationMethod_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VerificationMethod) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// 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_VerificationMethod) Type() protoreflect.MessageType { - return _fastReflection_VerificationMethod_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VerificationMethod) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VerificationMethod) Interface() protoreflect.ProtoMessage { - return (*VerificationMethod)(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_VerificationMethod) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_VerificationMethod_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_VerificationMethod_controller, value) { - return - } - } - if x.Method != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) - if !f(fd_VerificationMethod_method, value) { - return - } - } - if x.Issuer != "" { - value := protoreflect.ValueOfString(x.Issuer) - if !f(fd_VerificationMethod_issuer, value) { + if !f(fd_Verification_issuer, value) { return } } if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) - if !f(fd_VerificationMethod_subject, value) { + if !f(fd_Verification_subject, value) { return } } if x.PublicKey != nil { value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) - if !f(fd_VerificationMethod_public_key, value) { - if x.ControllerDid != "" { - value := protoreflect.ValueOfString(x.ControllerDid) - if !f(fd_Service_controller_did, value) { + if !f(fd_Verification_public_key, value) { return } } - if x.OriginUri != "" { - value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_Service_origin_uri, value) { - return - } - } - if len(x.ServiceEndpoints) != 0 { - value := protoreflect.ValueOfMap(&_Service_5_map{m: &x.ServiceEndpoints}) - if !f(fd_Service_service_endpoints, value) { - return - } - } - if len(x.Scopes) != 0 { - value := protoreflect.ValueOfList(&_Service_6_list{list: &x.Scopes}) - if !f(fd_Service_scopes, value) { + if x.VerificationType != "" { + value := protoreflect.ValueOfString(x.VerificationType) + if !f(fd_Verification_verification_type, value) { return } } @@ -4073,35 +1771,27 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Verification) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.VerificationMethod.id": + case "did.v1.Verification.id": return x.Id != "" - case "did.v1.VerificationMethod.controller": + case "did.v1.Verification.controller": return x.Controller != "" - case "did.v1.VerificationMethod.method": - return x.Method != 0 - case "did.v1.VerificationMethod.issuer": + case "did.v1.Verification.did_method": + return x.DidMethod != "" + case "did.v1.Verification.issuer": return x.Issuer != "" - case "did.v1.VerificationMethod.subject": + case "did.v1.Verification.subject": return x.Subject != "" - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.public_key": return x.PublicKey != nil - case "did.v1.Service.service_type": - return x.ServiceType != "" - case "did.v1.Service.controller_did": - return x.ControllerDid != "" - case "did.v1.Service.origin_uri": - return x.OriginUri != "" - case "did.v1.Service.service_endpoints": - return len(x.ServiceEndpoints) != 0 - case "did.v1.Service.scopes": - return len(x.Scopes) != 0 + case "did.v1.Verification.verification_type": + return x.VerificationType != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Verification does not contain field %s", fd.FullName())) } } @@ -4111,35 +1801,27 @@ func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VerificationMethod) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Verification) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.VerificationMethod.id": + case "did.v1.Verification.id": x.Id = "" - case "did.v1.VerificationMethod.controller": + case "did.v1.Verification.controller": x.Controller = "" - case "did.v1.VerificationMethod.method": - x.Method = 0 - case "did.v1.VerificationMethod.issuer": + case "did.v1.Verification.did_method": + x.DidMethod = "" + case "did.v1.Verification.issuer": x.Issuer = "" - case "did.v1.VerificationMethod.subject": + case "did.v1.Verification.subject": x.Subject = "" - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.public_key": x.PublicKey = nil - case "did.v1.Service.service_type": - x.ServiceType = "" - case "did.v1.Service.controller_did": - x.ControllerDid = "" - case "did.v1.Service.origin_uri": - x.OriginUri = "" - case "did.v1.Service.service_endpoints": - x.ServiceEndpoints = nil - case "did.v1.Service.scopes": - x.Scopes = nil + case "did.v1.Verification.verification_type": + x.VerificationType = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Verification does not contain field %s", fd.FullName())) } } @@ -4149,49 +1831,34 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Verification) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.VerificationMethod.id": + case "did.v1.Verification.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.controller": + case "did.v1.Verification.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.issuer": + case "did.v1.Verification.did_method": + value := x.DidMethod + return protoreflect.ValueOfString(value) + case "did.v1.Verification.issuer": value := x.Issuer return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.subject": + case "did.v1.Verification.subject": value := x.Subject return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.Service.controller_did": - value := x.ControllerDid + case "did.v1.Verification.verification_type": + value := x.VerificationType return protoreflect.ValueOfString(value) - case "did.v1.Service.origin_uri": - value := x.OriginUri - return protoreflect.ValueOfString(value) - case "did.v1.Service.service_endpoints": - if len(x.ServiceEndpoints) == 0 { - return protoreflect.ValueOfMap(&_Service_5_map{}) - } - mapValue := &_Service_5_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Service.scopes": - if len(x.Scopes) == 0 { - return protoreflect.ValueOfList(&_Service_6_list{}) - } - listValue := &_Service_6_list{list: &x.Scopes} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Verification does not contain field %s", descriptor.FullName())) } } @@ -4205,39 +1872,27 @@ func (x *fastReflection_VerificationMethod) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VerificationMethod) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Verification) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.VerificationMethod.id": + case "did.v1.Verification.id": x.Id = value.Interface().(string) - case "did.v1.VerificationMethod.controller": + case "did.v1.Verification.controller": x.Controller = value.Interface().(string) - case "did.v1.VerificationMethod.method": - x.Method = (DIDNamespace)(value.Enum()) - case "did.v1.VerificationMethod.issuer": + case "did.v1.Verification.did_method": + x.DidMethod = value.Interface().(string) + case "did.v1.Verification.issuer": x.Issuer = value.Interface().(string) - case "did.v1.VerificationMethod.subject": + case "did.v1.Verification.subject": x.Subject = value.Interface().(string) - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.public_key": x.PublicKey = value.Message().Interface().(*PubKey) - case "did.v1.Service.service_type": - x.ServiceType = value.Interface().(string) - case "did.v1.Service.controller_did": - x.ControllerDid = value.Interface().(string) - case "did.v1.Service.origin_uri": - x.OriginUri = value.Interface().(string) - case "did.v1.Service.service_endpoints": - mv := value.Map() - cmv := mv.(*_Service_5_map) - x.ServiceEndpoints = *cmv.m - case "did.v1.Service.scopes": - lv := value.List() - clv := lv.(*_Service_6_list) - x.Scopes = *clv.list + case "did.v1.Verification.verification_type": + x.VerificationType = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Verification does not contain field %s", fd.FullName())) } } @@ -4251,94 +1906,68 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Verification) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.public_key": if x.PublicKey == nil { x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.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")) - case "did.v1.VerificationMethod.issuer": - panic(fmt.Errorf("field issuer of message did.v1.VerificationMethod is not mutable")) - case "did.v1.VerificationMethod.subject": - panic(fmt.Errorf("field subject of message did.v1.VerificationMethod is not mutable")) - case "did.v1.Service.service_endpoints": - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - value := &_Service_5_map{m: &x.ServiceEndpoints} - return protoreflect.ValueOfMap(value) - case "did.v1.Service.scopes": - if x.Scopes == nil { - x.Scopes = []PermissionScope{} - } - value := &_Service_6_list{list: &x.Scopes} - return protoreflect.ValueOfList(value) - case "did.v1.Service.id": - panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) - case "did.v1.Service.service_type": - panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) - case "did.v1.Service.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.Verification.id": + panic(fmt.Errorf("field id of message did.v1.Verification is not mutable")) + case "did.v1.Verification.controller": + panic(fmt.Errorf("field controller of message did.v1.Verification is not mutable")) + case "did.v1.Verification.did_method": + panic(fmt.Errorf("field did_method of message did.v1.Verification is not mutable")) + case "did.v1.Verification.issuer": + panic(fmt.Errorf("field issuer of message did.v1.Verification is not mutable")) + case "did.v1.Verification.subject": + panic(fmt.Errorf("field subject of message did.v1.Verification is not mutable")) + case "did.v1.Verification.verification_type": + panic(fmt.Errorf("field verification_type of message did.v1.Verification is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Verification 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_VerificationMethod) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Verification) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.VerificationMethod.id": + case "did.v1.Verification.id": return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.controller": + case "did.v1.Verification.controller": return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.method": - return protoreflect.ValueOfEnum(0) - case "did.v1.VerificationMethod.issuer": + case "did.v1.Verification.did_method": return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.subject": + case "did.v1.Verification.issuer": return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key": + case "did.v1.Verification.subject": + return protoreflect.ValueOfString("") + case "did.v1.Verification.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.Service.controller_did": + case "did.v1.Verification.verification_type": return protoreflect.ValueOfString("") - case "did.v1.Service.origin_uri": - return protoreflect.ValueOfString("") - case "did.v1.Service.service_endpoints": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Service_5_map{m: &m}) - case "did.v1.Service.scopes": - list := []PermissionScope{} - return protoreflect.ValueOfList(&_Service_6_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Verification")) } - panic(fmt.Errorf("message did.v1.VerificationMethod does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Verification 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_VerificationMethod) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Verification) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.VerificationMethod", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Verification", d.FullName())) } panic("unreachable") } @@ -4346,7 +1975,7 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Verification) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4357,7 +1986,7 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Verification) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4369,7 +1998,7 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) IsValid() bool { +func (x *fastReflection_Verification) IsValid() bool { return x != nil } @@ -4379,9 +2008,9 @@ func (x *fastReflection_VerificationMethod) 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_VerificationMethod) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Verification) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VerificationMethod) + x := input.Message.Interface().(*Verification) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4401,8 +2030,9 @@ 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)) + l = len(x.DidMethod) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Issuer) if l > 0 { @@ -4416,42 +2046,10 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ControllerDid) + l = len(x.VerificationType) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OriginUri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ServiceEndpoints) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.ServiceEndpoints[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.ServiceEndpoints { - SiZeMaP(k, v) - } - } - } - if len(x.Scopes) > 0 { - l = 0 - for _, e := range x.Scopes { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4462,7 +2060,7 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*VerificationMethod) + x := input.Message.Interface().(*Verification) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4481,6 +2079,13 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.VerificationType) > 0 { + i -= len(x.VerificationType) + copy(dAtA[i:], x.VerificationType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VerificationType))) + i-- + dAtA[i] = 0x3a + } if x.PublicKey != nil { encoded, err := options.Marshal(x.PublicKey) if err != nil { @@ -4509,85 +2114,10 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if x.Method != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) - i-- - dAtA[i] = 0x18 - if len(x.Scopes) > 0 { - var pksize2 int - for _, num := range x.Scopes { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num1 := range x.Scopes { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x32 - } - if len(x.ServiceEndpoints) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) - for k := range x.ServiceEndpoints { - keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) - } - sort.Slice(keysForServiceEndpoints, func(i, j int) bool { - return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] - }) - for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { - v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] - out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.ServiceEndpoints { - v := x.ServiceEndpoints[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.OriginUri) > 0 { - i -= len(x.OriginUri) - copy(dAtA[i:], x.OriginUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) - i-- - dAtA[i] = 0x22 - } - if len(x.ControllerDid) > 0 { - i -= len(x.ControllerDid) - copy(dAtA[i:], x.ControllerDid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerDid))) + if len(x.DidMethod) > 0 { + i -= len(x.DidMethod) + copy(dAtA[i:], x.DidMethod) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DidMethod))) i-- dAtA[i] = 0x1a } @@ -4616,7 +2146,7 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*VerificationMethod) + x := input.Message.Interface().(*Verification) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4648,10 +2178,10 @@ func (x *fastReflection_VerificationMethod) 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: VerificationMethod: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Verification: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Verification: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4719,10 +2249,10 @@ 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) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DidMethod", wireType) } - x.Method = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4732,16 +2262,27 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Method |= DIDNamespace(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.DidMethod = 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 Issuer", wireType) - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4839,9 +2380,9 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 4: + case 7: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4869,204 +2410,8 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginUri = string(dAtA[iNdEx:postIndex]) + x.VerificationType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ServiceEndpoints == nil { - x.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Scopes = append(x.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(x.Scopes) == 0 { - x.Scopes = make([]PermissionScope, 0, elementCount) - } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Scopes = append(x.Scopes, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5115,40 +2460,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Account represents a wallet account associated with a DID Controller -type Account struct { +// Alias represents a DID alias +type Alias struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique identifier of the account + // The unique identifier of the alias Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the account - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The address of the account - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - // The label of the account - Label string `protobuf:"bytes,5,opt,name=label,proto3" json:"label,omitempty"` - // The bip32 chain code - ChainCode uint32 `protobuf:"varint,6,opt,name=chain_code,json=chainCode,proto3" json:"chain_code,omitempty"` - // The index of the account - Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` - // The supported chains of the account - Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"` - // Origin is the Alias provider - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Subject is the user defined alias - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - // Controller of the alias - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` - // Expiration of the alias - Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + // The alias of the DID + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // Origin of the alias + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` } -func (x *Account) Reset() { - *x = Account{} +func (x *Alias) Reset() { + *x = Alias{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_state_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5156,88 +2483,38 @@ func (x *Account) Reset() { } } -func (x *Account) String() string { +func (x *Alias) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Account) ProtoMessage() {} +func (*Alias) ProtoMessage() {} -// Deprecated: Use Account.ProtoReflect.Descriptor instead. -func (*Account) Descriptor() ([]byte, []int) { +// Deprecated: Use Alias.ProtoReflect.Descriptor instead. +func (*Alias) Descriptor() ([]byte, []int) { return file_did_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *Account) GetId() string { +func (x *Alias) GetId() string { if x != nil { return x.Id } return "" } -func (x *Account) GetController() string { -func (x *Aliases) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Aliases) GetSubject() string { +func (x *Alias) GetSubject() string { if x != nil { return x.Subject } return "" } -func (x *Aliases) GetController() string { +func (x *Alias) GetOrigin() string { if x != nil { - return x.Controller + return x.Origin } return "" } -func (x *Account) GetPublicKey() *PubKey { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *Account) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Account) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *Account) GetChainCode() uint32 { - if x != nil { - return x.ChainCode - } - return 0 -} - -func (x *Account) GetIndex() uint32 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *Account) GetChains() []string { - if x != nil { - return x.Chains - } - return nil -} - // Controller represents a Sonr DWN Vault type Controller struct { state protoimpl.MessageState @@ -5247,15 +2524,21 @@ type Controller struct { // The unique identifier of the controller 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"` + SonrAddress string `protobuf:"bytes,2,opt,name=sonr_address,json=sonrAddress,proto3" json:"sonr_address,omitempty"` + // The DID of the controller + EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` + // The DID of the controller + BtcAddress string `protobuf:"bytes,4,opt,name=btc_address,json=btcAddress,proto3" json:"btc_address,omitempty"` // Aliases of the controller - Aliases []*Alias `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` + Aliases []string `protobuf:"bytes,5,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"` + PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier - VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` + VaultCid string `protobuf:"bytes,7,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` // The Authentications of the controller - Authentication []*Credential `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"` + Authentication []string `protobuf:"bytes,8,rep,name=authentication,proto3" json:"authentication,omitempty"` + // The Status of the claims for the controller + Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` } func (x *Controller) Reset() { @@ -5285,14 +2568,28 @@ func (x *Controller) GetId() string { return "" } -func (x *Controller) GetAddress() string { +func (x *Controller) GetSonrAddress() string { if x != nil { - return x.Address + return x.SonrAddress } return "" } -func (x *Controller) GetAliases() []*Alias { +func (x *Controller) GetEthAddress() string { + if x != nil { + return x.EthAddress + } + return "" +} + +func (x *Controller) GetBtcAddress() string { + if x != nil { + return x.BtcAddress + } + return "" +} + +func (x *Controller) GetAliases() []string { if x != nil { return x.Aliases } @@ -5313,201 +2610,22 @@ func (x *Controller) GetVaultCid() string { return "" } -func (x *Controller) GetAuthentication() []*Credential { +func (x *Controller) GetAuthentication() []string { if x != nil { return x.Authentication } return nil } -// Proof represents a verifiable credential -type Proof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the proof - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the proof - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` - // The property of the proof - Property string `protobuf:"bytes,4,opt,name=property,proto3" json:"property,omitempty"` - // The accumulator of the proof - Accumulator []byte `protobuf:"bytes,5,opt,name=accumulator,proto3" json:"accumulator,omitempty"` - // The secret key of the proof - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *Proof) Reset() { - *x = Proof{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proof) ProtoMessage() {} - -// Deprecated: Use Proof.ProtoReflect.Descriptor instead. -func (*Proof) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{2} -} - -func (x *Proof) GetId() string { +func (x *Controller) GetStatus() string { if x != nil { - return x.Id + return x.Status } return "" } -func (x *Proof) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Proof) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *Proof) GetProperty() string { - if x != nil { - return x.Property - } - return "" -} - -func (x *Proof) GetAccumulator() []byte { - if x != nil { - return x.Accumulator - } - return nil -} - -func (x *Proof) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -// ServiceRecord represents a decentralized service in a DID Document -type ServiceRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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 authority DID of the service - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - // The domain name of the service - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,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,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,7,opt,name=permissions,proto3" json:"permissions,omitempty"` - // The controller DID of the service - ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` - // The domain name of the service - OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // The service endpoint - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Scopes is the Authorization Grants of the service - Scopes []PermissionScope `protobuf:"varint,6,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` -} - -func (x *ServiceRecord) Reset() { - *x = ServiceRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceRecord) ProtoMessage() {} - -// Deprecated: Use ServiceRecord.ProtoReflect.Descriptor instead. -func (*ServiceRecord) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{3} -} - -func (x *ServiceRecord) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ServiceRecord) GetServiceType() string { - if x != nil { - return x.ServiceType - } - return "" -} - -func (x *ServiceRecord) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *ServiceRecord) GetOrigin() string { -func (x *Service) GetControllerDid() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *ServiceRecord) GetDescription() string { - if x != nil { - return x.Description -func (x *Service) GetOriginUri() string { - if x != nil { - return x.OriginUri - } - return "" -} - -func (x *ServiceRecord) GetServiceEndpoints() map[string]string { -func (x *Service) GetServiceEndpoints() map[string]string { - if x != nil { - return x.ServiceEndpoints - } - return nil -} - -func (x *ServiceRecord) GetPermissions() *Permissions { - if x != nil { - return x.Permissions - } - return nil -} - // Verification reprsents a method of verifying membership in a DID -type VerificationMethod struct { +type Verification struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -5517,80 +2635,86 @@ type VerificationMethod struct { // The controller of the verification Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The DIDNamespace of the verification - Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + DidMethod string `protobuf:"bytes,3,opt,name=did_method,json=didMethod,proto3" json:"did_method,omitempty"` // The value of the linked identifier Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` // The subject of the verification Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // The public key of the verification PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The Verification Type (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation) + VerificationType string `protobuf:"bytes,7,opt,name=verification_type,json=verificationType,proto3" json:"verification_type,omitempty"` } -func (x *VerificationMethod) Reset() { - *x = VerificationMethod{} +func (x *Verification) Reset() { + *x = Verification{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VerificationMethod) String() string { +func (x *Verification) String() string { return protoimpl.X.MessageStringOf(x) } -func (*VerificationMethod) ProtoMessage() {} +func (*Verification) ProtoMessage() {} -// Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{4} +// Deprecated: Use Verification.ProtoReflect.Descriptor instead. +func (*Verification) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{2} } -func (x *VerificationMethod) GetId() string { +func (x *Verification) GetId() string { if x != nil { return x.Id } return "" } -func (x *VerificationMethod) GetController() string { +func (x *Verification) GetController() string { if x != nil { return x.Controller } return "" } -func (x *VerificationMethod) GetMethod() DIDNamespace { +func (x *Verification) GetDidMethod() string { if x != nil { - return x.Method + return x.DidMethod } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return "" } -func (x *VerificationMethod) GetIssuer() string { +func (x *Verification) GetIssuer() string { if x != nil { return x.Issuer } return "" } -func (x *VerificationMethod) GetSubject() string { +func (x *Verification) GetSubject() string { if x != nil { return x.Subject } return "" } -func (x *VerificationMethod) GetPublicKey() *PubKey { +func (x *Verification) GetPublicKey() *PubKey { if x != nil { return x.PublicKey -func (x *Service) GetScopes() []PermissionScope { - if x != nil { - return x.Scopes } return nil } +func (x *Verification) GetVerificationType() string { + if x != nil { + return x.VerificationType + } + return "" +} + var File_did_v1_state_proto protoreflect.FileDescriptor var file_did_v1_state_proto_rawDesc = []byte{ @@ -5598,217 +2722,70 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xca, 0x02, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x63, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x5d, - 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x01, 0x18, 0x01, 0x12, 0x18, - 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x2c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x03, 0x18, 0x01, 0x18, 0x01, 0x22, 0x97, 0x02, - 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, 0x27, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 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, 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, 0x12, 0x3a, 0x0a, 0x0e, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 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, 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, 0x02, 0x22, 0xd1, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 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, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 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, 0x06, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x30, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, - 0x2a, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x10, 0x01, 0x18, 0x01, 0x18, 0x04, 0x22, 0xa6, 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, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 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, 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, 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, 0x34, - 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x2e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, - 0x18, 0x01, 0x18, 0x03, 0x22, 0x8b, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 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, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x05, 0x41, + 0x6c, 0x69, 0x61, 0x73, 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, 0x16, + 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 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, 0x01, 0x22, 0x9a, 0x03, 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, 0x21, 0x0a, 0x0c, 0x73, + 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x6e, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x74, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 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, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, 0x0a, 0x04, + 0x0a, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, + 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x0f, + 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x10, 0x04, 0x18, 0x01, 0x12, + 0x16, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x63, 0x69, 0x64, 0x10, 0x05, 0x18, 0x01, 0x18, 0x02, 0x22, 0xdd, 0x02, 0x0a, 0x0c, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 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, 0x1d, 0x0a, 0x0a, 0x64, 0x69, + 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x3a, 0x36, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x30, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 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, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, - 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xaa, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1d, 0xf2, - 0x9e, 0xd3, 0x8e, 0x03, 0x17, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, - 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, - 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, - 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, - 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, 0xdc, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x52, 0x0a, 0x11, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, - 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x70, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6a, 0x0a, + 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x1c, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, 0x12, + 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x04, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, + 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, + 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5823,57 +2800,21 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { return file_did_v1_state_proto_rawDescData } -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Account)(nil), // 0: did.v1.Account - (*Controller)(nil), // 1: did.v1.Controller - (*Proof)(nil), // 2: did.v1.Proof - (*ServiceRecord)(nil), // 3: did.v1.ServiceRecord - (*VerificationMethod)(nil), // 4: did.v1.VerificationMethod - nil, // 5: did.v1.ServiceRecord.ServiceEndpointsEntry - (*PubKey)(nil), // 6: did.v1.PubKey - (*Alias)(nil), // 7: did.v1.Alias - (*Credential)(nil), // 8: did.v1.Credential - (*Permissions)(nil), // 9: did.v1.Permissions - (DIDNamespace)(0), // 10: did.v1.DIDNamespace + (*Alias)(nil), // 0: did.v1.Alias + (*Controller)(nil), // 1: did.v1.Controller + (*Verification)(nil), // 2: did.v1.Verification + (*PubKey)(nil), // 3: did.v1.PubKey } var file_did_v1_state_proto_depIdxs = []int32{ - 6, // 0: did.v1.Account.public_key:type_name -> did.v1.PubKey - 7, // 1: did.v1.Controller.aliases:type_name -> did.v1.Alias - 6, // 2: did.v1.Controller.public_key:type_name -> did.v1.PubKey - 8, // 3: did.v1.Controller.authentication:type_name -> did.v1.Credential - 5, // 4: did.v1.ServiceRecord.service_endpoints:type_name -> did.v1.ServiceRecord.ServiceEndpointsEntry - 9, // 5: did.v1.ServiceRecord.permissions:type_name -> did.v1.Permissions - 10, // 6: did.v1.VerificationMethod.method:type_name -> did.v1.DIDNamespace - 6, // 7: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey - 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 -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_did_v1_state_proto_goTypes = []interface{}{ - (*Aliases)(nil), // 0: did.v1.Aliases - (*Assertion)(nil), // 1: did.v1.Assertion - (*Attestation)(nil), // 2: did.v1.Attestation - (*Controller)(nil), // 3: did.v1.Controller - (*Delegation)(nil), // 4: did.v1.Delegation - (*Service)(nil), // 5: did.v1.Service - nil, // 6: did.v1.Assertion.MetadataEntry - nil, // 7: did.v1.Delegation.PublicKeyJwksEntry - nil, // 8: did.v1.Service.ServiceEndpointsEntry - (PermissionScope)(0), // 9: did.v1.PermissionScope -} -var file_did_v1_state_proto_depIdxs = []int32{ - 6, // 0: did.v1.Assertion.metadata:type_name -> did.v1.Assertion.MetadataEntry - 7, // 1: did.v1.Delegation.public_key_jwks:type_name -> did.v1.Delegation.PublicKeyJwksEntry - 8, // 2: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry - 9, // 3: did.v1.Service.scopes:type_name -> did.v1.PermissionScope - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 0: did.v1.Controller.public_key:type_name -> did.v1.PubKey + 3, // 1: did.v1.Verification.public_key:type_name -> did.v1.PubKey + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5882,11 +2823,9 @@ func file_did_v1_state_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_models_proto_init() - file_did_v1_enums_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { + switch v := v.(*Alias); i { case 0: return &v.state case 1: @@ -5910,31 +2849,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerificationMethod); i { + switch v := v.(*Verification); i { case 0: return &v.state case 1: @@ -5952,8 +2867,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 6, - NumMessages: 9, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index acc75d754..5e3ac0b2f 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -16,935 +16,11 @@ import ( sync "sync" ) -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor - fd_MsgUpdateParams_token protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_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) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgUpdateParams_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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgUpdateParams.authority": - return x.Authority != "" - case "did.v1.MsgUpdateParams.params": - return x.Params != nil - case "did.v1.MsgUpdateParams.token": - return x.Token != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgUpdateParams.authority": - x.Authority = "" - case "did.v1.MsgUpdateParams.params": - x.Params = nil - case "did.v1.MsgUpdateParams.token": - x.Token = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.MsgUpdateParams.token": - value := x.Token - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - case "did.v1.MsgUpdateParams.token": - x.Token = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "did.v1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgUpdateParams is not mutable")) - case "did.v1.MsgUpdateParams.token": - panic(fmt.Errorf("field token of message did.v1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.MsgUpdateParams.token": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Token) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x1a - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_did_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_MsgAllocateVault protoreflect.MessageDescriptor fd_MsgAllocateVault_authority protoreflect.FieldDescriptor fd_MsgAllocateVault_subject protoreflect.FieldDescriptor fd_MsgAllocateVault_origin protoreflect.FieldDescriptor - md_MsgAuthenticate protoreflect.MessageDescriptor - fd_MsgAuthenticate_authority protoreflect.FieldDescriptor - fd_MsgAuthenticate_controller protoreflect.FieldDescriptor - fd_MsgAuthenticate_address protoreflect.FieldDescriptor - fd_MsgAuthenticate_origin protoreflect.FieldDescriptor ) func init() { @@ -964,23 +40,7 @@ func (x *MsgAllocateVault) ProtoReflect() protoreflect.Message { } func (x *MsgAllocateVault) slowProtoReflect() protoreflect.Message { - md_MsgAuthenticate = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticate") - fd_MsgAuthenticate_authority = md_MsgAuthenticate.Fields().ByName("authority") - fd_MsgAuthenticate_controller = md_MsgAuthenticate.Fields().ByName("controller") - fd_MsgAuthenticate_address = md_MsgAuthenticate.Fields().ByName("address") - fd_MsgAuthenticate_origin = md_MsgAuthenticate.Fields().ByName("origin") -} - -var _ protoreflect.Message = (*fastReflection_MsgAuthenticate)(nil) - -type fastReflection_MsgAuthenticate MsgAuthenticate - -func (x *MsgAuthenticate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticate)(x) -} - -func (x *MsgAuthenticate) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[2] + mi := &file_did_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1004,27 +64,12 @@ func (x fastReflection_MsgAllocateVault_messageType) New() protoreflect.Message } func (x fastReflection_MsgAllocateVault_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAllocateVault -var _fastReflection_MsgAuthenticate_messageType fastReflection_MsgAuthenticate_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticate_messageType{} - -type fastReflection_MsgAuthenticate_messageType struct{} - -func (x fastReflection_MsgAuthenticate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticate)(nil) -} -func (x fastReflection_MsgAuthenticate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticate) -} -func (x fastReflection_MsgAuthenticate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAllocateVault) Descriptor() protoreflect.MessageDescriptor { return md_MsgAllocateVault -func (x *fastReflection_MsgAuthenticate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticate } // Type returns the message type, which encapsulates both Go and protobuf @@ -1037,21 +82,12 @@ func (x *fastReflection_MsgAllocateVault) Type() protoreflect.MessageType { // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAllocateVault) New() protoreflect.Message { return new(fastReflection_MsgAllocateVault) -func (x *fastReflection_MsgAuthenticate) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticate) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAllocateVault) Interface() protoreflect.ProtoMessage { return (*MsgAllocateVault)(x) -func (x *fastReflection_MsgAuthenticate) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticate)(x) } // Range iterates over every populated field in an undefined order, @@ -1069,29 +105,12 @@ func (x *fastReflection_MsgAllocateVault) Range(f func(protoreflect.FieldDescrip if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) if !f(fd_MsgAllocateVault_subject, value) { -func (x *fastReflection_MsgAuthenticate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAuthenticate_authority, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgAuthenticate_controller, 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_MsgAllocateVault_origin, value) { - if !f(fd_MsgAuthenticate_origin, value) { return } } @@ -1121,21 +140,6 @@ func (x *fastReflection_MsgAllocateVault) Has(fd protoreflect.FieldDescriptor) b panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) -func (x *fastReflection_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgAuthenticate.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 != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -1158,21 +162,6 @@ func (x *fastReflection_MsgAllocateVault) Clear(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) -func (x *fastReflection_MsgAuthenticate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": - x.Authority = "" - case "did.v1.MsgAuthenticate.controller": - x.Controller = "" - case "did.v1.MsgAuthenticate.address": - x.Address = "" - case "did.v1.MsgAuthenticate.origin": - x.Origin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -1191,18 +180,6 @@ func (x *fastReflection_MsgAllocateVault) Get(descriptor protoreflect.FieldDescr value := x.Subject return protoreflect.ValueOfString(value) case "did.v1.MsgAllocateVault.origin": -func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgAuthenticate.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 return protoreflect.ValueOfString(value) default: @@ -1210,9 +187,6 @@ func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescri panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", descriptor.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", descriptor.FullName())) } } @@ -1239,21 +213,6 @@ func (x *fastReflection_MsgAllocateVault) Set(fd protoreflect.FieldDescriptor, v panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) -func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgAuthenticate.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) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -1280,21 +239,6 @@ func (x *fastReflection_MsgAllocateVault) Mutable(fd protoreflect.FieldDescripto panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) -func (x *fastReflection_MsgAuthenticate) 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")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -1314,21 +258,6 @@ func (x *fastReflection_MsgAllocateVault) NewField(fd protoreflect.FieldDescript panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) -func (x *fastReflection_MsgAuthenticate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgAuthenticate.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": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -1339,10 +268,6 @@ func (x *fastReflection_MsgAllocateVault) WhichOneof(d protoreflect.OneofDescrip switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAllocateVault", d.FullName())) -func (x *fastReflection_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticate", d.FullName())) } panic("unreachable") } @@ -1351,7 +276,6 @@ func (x *fastReflection_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescript // 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_MsgAllocateVault) GetUnknown() protoreflect.RawFields { -func (x *fastReflection_MsgAuthenticate) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1363,7 +287,6 @@ func (x *fastReflection_MsgAuthenticate) GetUnknown() protoreflect.RawFields { // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAllocateVault) SetUnknown(fields protoreflect.RawFields) { -func (x *fastReflection_MsgAuthenticate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1376,7 +299,6 @@ func (x *fastReflection_MsgAuthenticate) SetUnknown(fields protoreflect.RawField // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAllocateVault) IsValid() bool { -func (x *fastReflection_MsgAuthenticate) IsValid() bool { return x != nil } @@ -1389,9 +311,6 @@ func (x *fastReflection_MsgAuthenticate) IsValid() bool { func (x *fastReflection_MsgAllocateVault) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAllocateVault) -func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1426,7 +345,6 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAllocateVault) - x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1478,7 +396,6 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAllocateVault) - x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1514,10 +431,6 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1652,12 +565,11 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { } var ( - md_MsgAllocateVaultResponse protoreflect.MessageDescriptor - fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_registration_options protoreflect.FieldDescriptor - fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor - md_MsgAuthenticateResponse protoreflect.MessageDescriptor + md_MsgAllocateVaultResponse protoreflect.MessageDescriptor + fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor + fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor + fd_MsgAllocateVaultResponse_token protoreflect.FieldDescriptor + fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor ) func init() { @@ -1665,7 +577,7 @@ func init() { 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") - fd_MsgAllocateVaultResponse_registration_options = md_MsgAllocateVaultResponse.Fields().ByName("registration_options") + fd_MsgAllocateVaultResponse_token = md_MsgAllocateVaultResponse.Fields().ByName("token") fd_MsgAllocateVaultResponse_localhost = md_MsgAllocateVaultResponse.Fields().ByName("localhost") } @@ -1678,19 +590,7 @@ func (x *MsgAllocateVaultResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAllocateVaultResponse) slowProtoReflect() protoreflect.Message { - md_MsgAuthenticateResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateResponse)(nil) - -type fastReflection_MsgAuthenticateResponse MsgAuthenticateResponse - -func (x *MsgAuthenticateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateResponse)(x) -} - -func (x *MsgAuthenticateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[3] + mi := &file_did_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1714,27 +614,12 @@ func (x fastReflection_MsgAllocateVaultResponse_messageType) New() protoreflect. } func (x fastReflection_MsgAllocateVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_MsgAllocateVaultResponse -var _fastReflection_MsgAuthenticateResponse_messageType fastReflection_MsgAuthenticateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateResponse_messageType{} - -type fastReflection_MsgAuthenticateResponse_messageType struct{} - -func (x fastReflection_MsgAuthenticateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateResponse)(nil) -} -func (x fastReflection_MsgAuthenticateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateResponse) -} -func (x fastReflection_MsgAuthenticateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_MsgAllocateVaultResponse) Descriptor() protoreflect.MessageDescriptor { return md_MsgAllocateVaultResponse -func (x *fastReflection_MsgAuthenticateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateResponse } // Type returns the message type, which encapsulates both Go and protobuf @@ -1747,21 +632,12 @@ func (x *fastReflection_MsgAllocateVaultResponse) Type() protoreflect.MessageTyp // New returns a newly allocated and mutable empty message. func (x *fastReflection_MsgAllocateVaultResponse) New() protoreflect.Message { return new(fastReflection_MsgAllocateVaultResponse) -func (x *fastReflection_MsgAuthenticateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateResponse) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_MsgAllocateVaultResponse) Interface() protoreflect.ProtoMessage { return (*MsgAllocateVaultResponse)(x) -func (x *fastReflection_MsgAuthenticateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1782,9 +658,9 @@ func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.Fiel return } } - if x.RegistrationOptions != "" { - value := protoreflect.ValueOfString(x.RegistrationOptions) - if !f(fd_MsgAllocateVaultResponse_registration_options, value) { + if x.Token != "" { + value := protoreflect.ValueOfString(x.Token) + if !f(fd_MsgAllocateVaultResponse_token, value) { return } } @@ -1794,7 +670,6 @@ func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.Fiel return } } -func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1809,14 +684,13 @@ func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.Field // 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_MsgAllocateVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { -func (x *fastReflection_MsgAuthenticateResponse) 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) - case "did.v1.MsgAllocateVaultResponse.registration_options": - return x.RegistrationOptions != "" + case "did.v1.MsgAllocateVaultResponse.token": + return x.Token != "" case "did.v1.MsgAllocateVaultResponse.localhost": return x.Localhost != false default: @@ -1824,9 +698,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescri panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -1837,14 +708,13 @@ func (x *fastReflection_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescri // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAllocateVaultResponse) Clear(fd protoreflect.FieldDescriptor) { -func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.MsgAllocateVaultResponse.cid": x.Cid = "" case "did.v1.MsgAllocateVaultResponse.expiry_block": x.ExpiryBlock = int64(0) - case "did.v1.MsgAllocateVaultResponse.registration_options": - x.RegistrationOptions = "" + case "did.v1.MsgAllocateVaultResponse.token": + x.Token = "" case "did.v1.MsgAllocateVaultResponse.localhost": x.Localhost = false default: @@ -1852,9 +722,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDesc panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -1865,7 +732,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDesc // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAllocateVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { -func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "did.v1.MsgAllocateVaultResponse.cid": value := x.Cid @@ -1873,8 +739,8 @@ func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.Fie case "did.v1.MsgAllocateVaultResponse.expiry_block": value := x.ExpiryBlock return protoreflect.ValueOfInt64(value) - case "did.v1.MsgAllocateVaultResponse.registration_options": - value := x.RegistrationOptions + case "did.v1.MsgAllocateVaultResponse.token": + value := x.Token return protoreflect.ValueOfString(value) case "did.v1.MsgAllocateVaultResponse.localhost": value := x.Localhost @@ -1884,9 +750,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.Fie panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", descriptor.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", descriptor.FullName())) } } @@ -1901,14 +764,13 @@ func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.Fie // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAllocateVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { -func (x *fastReflection_MsgAuthenticateResponse) 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() - case "did.v1.MsgAllocateVaultResponse.registration_options": - x.RegistrationOptions = value.Interface().(string) + case "did.v1.MsgAllocateVaultResponse.token": + x.Token = value.Interface().(string) case "did.v1.MsgAllocateVaultResponse.localhost": x.Localhost = value.Bool() default: @@ -1916,9 +778,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescri panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -1933,14 +792,13 @@ func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescri // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAllocateVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { -func (x *fastReflection_MsgAuthenticateResponse) 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")) - case "did.v1.MsgAllocateVaultResponse.registration_options": - panic(fmt.Errorf("field registration_options of message did.v1.MsgAllocateVaultResponse is not mutable")) + case "did.v1.MsgAllocateVaultResponse.token": + panic(fmt.Errorf("field token of message did.v1.MsgAllocateVaultResponse is not mutable")) case "did.v1.MsgAllocateVaultResponse.localhost": panic(fmt.Errorf("field localhost of message did.v1.MsgAllocateVaultResponse is not mutable")) default: @@ -1948,9 +806,6 @@ func (x *fastReflection_MsgAuthenticateResponse) Mutable(fd protoreflect.FieldDe panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -1958,13 +813,12 @@ func (x *fastReflection_MsgAuthenticateResponse) Mutable(fd protoreflect.FieldDe // 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_MsgAllocateVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { -func (x *fastReflection_MsgAuthenticateResponse) 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)) - case "did.v1.MsgAllocateVaultResponse.registration_options": + case "did.v1.MsgAllocateVaultResponse.token": return protoreflect.ValueOfString("") case "did.v1.MsgAllocateVaultResponse.localhost": return protoreflect.ValueOfBool(false) @@ -1973,9 +827,6 @@ func (x *fastReflection_MsgAuthenticateResponse) NewField(fd protoreflect.FieldD panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) - } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -1986,10 +837,6 @@ func (x *fastReflection_MsgAllocateVaultResponse) WhichOneof(d protoreflect.Oneo switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAllocateVaultResponse", d.FullName())) -func (x *fastReflection_MsgAuthenticateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateResponse", d.FullName())) } panic("unreachable") } @@ -1998,7 +845,6 @@ func (x *fastReflection_MsgAuthenticateResponse) WhichOneof(d protoreflect.Oneof // 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_MsgAllocateVaultResponse) GetUnknown() protoreflect.RawFields { -func (x *fastReflection_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2010,7 +856,6 @@ func (x *fastReflection_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFi // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAllocateVaultResponse) SetUnknown(fields protoreflect.RawFields) { -func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2023,7 +868,6 @@ func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_MsgAllocateVaultResponse) IsValid() bool { -func (x *fastReflection_MsgAuthenticateResponse) IsValid() bool { return x != nil } @@ -2036,9 +880,6 @@ func (x *fastReflection_MsgAuthenticateResponse) IsValid() bool { func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*MsgAllocateVaultResponse) -func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2057,7 +898,7 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth if x.ExpiryBlock != 0 { n += 1 + runtime.Sov(uint64(x.ExpiryBlock)) } - l = len(x.RegistrationOptions) + l = len(x.Token) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2075,7 +916,6 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*MsgAllocateVaultResponse) - x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2104,10 +944,10 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth i-- dAtA[i] = 0x20 } - if len(x.RegistrationOptions) > 0 { - i -= len(x.RegistrationOptions) - copy(dAtA[i:], x.RegistrationOptions) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RegistrationOptions))) + if len(x.Token) > 0 { + i -= len(x.Token) + copy(dAtA[i:], x.Token) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) i-- dAtA[i] = 0x1a } @@ -2135,7 +975,6 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*MsgAllocateVaultResponse) - x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2171,10 +1010,6 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2230,7 +1065,7 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationOptions", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2258,7 +1093,7 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.RegistrationOptions = string(dAtA[iNdEx:postIndex]) + x.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { @@ -2315,2003 +1150,159 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } } -var ( - md_MsgProveWitness protoreflect.MessageDescriptor - fd_MsgProveWitness_authority protoreflect.FieldDescriptor - fd_MsgProveWitness_property protoreflect.FieldDescriptor - fd_MsgProveWitness_witness protoreflect.FieldDescriptor - fd_MsgProveWitness_token protoreflect.FieldDescriptor -) +var _ protoreflect.List = (*_MsgRegisterController_2_list)(nil) -func init() { - file_did_v1_tx_proto_init() - md_MsgProveWitness = File_did_v1_tx_proto.Messages().ByName("MsgProveWitness") - fd_MsgProveWitness_authority = md_MsgProveWitness.Fields().ByName("authority") - fd_MsgProveWitness_property = md_MsgProveWitness.Fields().ByName("property") - fd_MsgProveWitness_witness = md_MsgProveWitness.Fields().ByName("witness") - fd_MsgProveWitness_token = md_MsgProveWitness.Fields().ByName("token") +type _MsgRegisterController_2_list struct { + list *[][]byte } -var _ protoreflect.Message = (*fastReflection_MsgProveWitness)(nil) - -type fastReflection_MsgProveWitness MsgProveWitness - -func (x *MsgProveWitness) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgProveWitness)(x) -} - -func (x *MsgProveWitness) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *_MsgRegisterController_2_list) Len() int { + if x.list == nil { + return 0 } - return mi.MessageOf(x) + return len(*x.list) } -var _fastReflection_MsgProveWitness_messageType fastReflection_MsgProveWitness_messageType -var _ protoreflect.MessageType = fastReflection_MsgProveWitness_messageType{} - -type fastReflection_MsgProveWitness_messageType struct{} - -func (x fastReflection_MsgProveWitness_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgProveWitness)(nil) -} -func (x fastReflection_MsgProveWitness_messageType) New() protoreflect.Message { - return new(fastReflection_MsgProveWitness) -} -func (x fastReflection_MsgProveWitness_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitness +func (x *_MsgRegisterController_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) } -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgProveWitness) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitness +func (x *_MsgRegisterController_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = 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_MsgProveWitness) Type() protoreflect.MessageType { - return _fastReflection_MsgProveWitness_messageType +func (x *_MsgRegisterController_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) } -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgProveWitness) New() protoreflect.Message { - return new(fastReflection_MsgProveWitness) +func (x *_MsgRegisterController_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Assertions as it is not of Message kind")) } -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgProveWitness) Interface() protoreflect.ProtoMessage { - return (*MsgProveWitness)(x) +func (x *_MsgRegisterController_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] } -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgProveWitness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgProveWitness_authority, value) { - return - } - } - if x.Property != "" { - value := protoreflect.ValueOfString(x.Property) - if !f(fd_MsgProveWitness_property, value) { - return - } - } - if len(x.Witness) != 0 { - value := protoreflect.ValueOfBytes(x.Witness) - if !f(fd_MsgProveWitness_witness, value) { - return - } - } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgProveWitness_token, value) { - return - } +func (x *_MsgRegisterController_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgRegisterController_3_list)(nil) + +type _MsgRegisterController_3_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_3_list) Len() int { + if x.list == nil { + return 0 } + return len(*x.list) } -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgProveWitness) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - return x.Authority != "" - case "did.v1.MsgProveWitness.property": - return x.Property != "" - case "did.v1.MsgProveWitness.witness": - return len(x.Witness) != 0 - case "did.v1.MsgProveWitness.token": - return x.Token != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } +func (x *_MsgRegisterController_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) } -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - x.Authority = "" - case "did.v1.MsgProveWitness.property": - x.Property = "" - case "did.v1.MsgProveWitness.witness": - x.Witness = nil - case "did.v1.MsgProveWitness.token": - x.Token = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } +func (x *_MsgRegisterController_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue } -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgProveWitness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgProveWitness.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgProveWitness.property": - value := x.Property - return protoreflect.ValueOfString(value) - case "did.v1.MsgProveWitness.witness": - value := x.Witness - return protoreflect.ValueOfBytes(value) - case "did.v1.MsgProveWitness.token": - value := x.Token - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", descriptor.FullName())) - } +func (x *_MsgRegisterController_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) } -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgProveWitness.property": - x.Property = value.Interface().(string) - case "did.v1.MsgProveWitness.witness": - x.Witness = value.Bytes() - case "did.v1.MsgProveWitness.token": - x.Token = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } +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")) } -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgProveWitness is not mutable")) - case "did.v1.MsgProveWitness.property": - panic(fmt.Errorf("field property of message did.v1.MsgProveWitness is not mutable")) - case "did.v1.MsgProveWitness.witness": - panic(fmt.Errorf("field witness of message did.v1.MsgProveWitness is not mutable")) - case "did.v1.MsgProveWitness.token": - panic(fmt.Errorf("field token of message did.v1.MsgProveWitness is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } +func (x *_MsgRegisterController_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] } -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgProveWitness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgProveWitness.property": - return protoreflect.ValueOfString("") - case "did.v1.MsgProveWitness.witness": - return protoreflect.ValueOfBytes(nil) - case "did.v1.MsgProveWitness.token": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } +func (x *_MsgRegisterController_3_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) } -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgProveWitness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitness", d.FullName())) - } - panic("unreachable") +func (x *_MsgRegisterController_3_list) IsValid() bool { + return x.list != nil } -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgProveWitness) GetUnknown() protoreflect.RawFields { - return x.unknownFields +var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) + +type _MsgRegisterController_4_list struct { + list *[][]byte } -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields +func (x *_MsgRegisterController_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) } -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgProveWitness) IsValid() bool { - return x != nil +func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) } -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Property) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Witness) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Token) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } +func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x22 - } - if len(x.Witness) > 0 { - i -= len(x.Witness) - copy(dAtA[i:], x.Witness) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness))) - i-- - dAtA[i] = 0x1a - } - if len(x.Property) > 0 { - i -= len(x.Property) - copy(dAtA[i:], x.Property) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...) - if x.Witness == nil { - x.Witness = []byte{} - } - iNdEx = postIndex - 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 stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } +func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} - 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, - } +func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Verifications as it is not of Message kind")) +} + +func (x *_MsgRegisterController_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_4_list) IsValid() bool { + return x.list != nil } var ( - md_MsgProveWitnessResponse protoreflect.MessageDescriptor - fd_MsgProveWitnessResponse_success protoreflect.FieldDescriptor - fd_MsgProveWitnessResponse_property protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgProveWitnessResponse = File_did_v1_tx_proto.Messages().ByName("MsgProveWitnessResponse") - fd_MsgProveWitnessResponse_success = md_MsgProveWitnessResponse.Fields().ByName("success") - fd_MsgProveWitnessResponse_property = md_MsgProveWitnessResponse.Fields().ByName("property") -} - -var _ protoreflect.Message = (*fastReflection_MsgProveWitnessResponse)(nil) - -type fastReflection_MsgProveWitnessResponse MsgProveWitnessResponse - -func (x *MsgProveWitnessResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgProveWitnessResponse)(x) -} - -func (x *MsgProveWitnessResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgProveWitnessResponse_messageType fastReflection_MsgProveWitnessResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgProveWitnessResponse_messageType{} - -type fastReflection_MsgProveWitnessResponse_messageType struct{} - -func (x fastReflection_MsgProveWitnessResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgProveWitnessResponse)(nil) -} -func (x fastReflection_MsgProveWitnessResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgProveWitnessResponse) -} -func (x fastReflection_MsgProveWitnessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitnessResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgProveWitnessResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitnessResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgProveWitnessResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgProveWitnessResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgProveWitnessResponse) New() protoreflect.Message { - return new(fastReflection_MsgProveWitnessResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgProveWitnessResponse) Interface() protoreflect.ProtoMessage { - return (*MsgProveWitnessResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgProveWitnessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgProveWitnessResponse_success, value) { - return - } - } - if x.Property != "" { - value := protoreflect.ValueOfString(x.Property) - if !f(fd_MsgProveWitnessResponse_property, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgProveWitnessResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - return x.Success != false - case "did.v1.MsgProveWitnessResponse.property": - return x.Property != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - x.Success = false - case "did.v1.MsgProveWitnessResponse.property": - x.Property = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgProveWitnessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "did.v1.MsgProveWitnessResponse.property": - value := x.Property - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - x.Success = value.Bool() - case "did.v1.MsgProveWitnessResponse.property": - x.Property = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgProveWitnessResponse is not mutable")) - case "did.v1.MsgProveWitnessResponse.property": - panic(fmt.Errorf("field property of message did.v1.MsgProveWitnessResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgProveWitnessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - return protoreflect.ValueOfBool(false) - case "did.v1.MsgProveWitnessResponse.property": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgProveWitnessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitnessResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgProveWitnessResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgProveWitnessResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgProveWitnessResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - l = len(x.Property) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Property) > 0 { - i -= len(x.Property) - copy(dAtA[i:], x.Property) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSyncController protoreflect.MessageDescriptor - fd_MsgSyncController_controller protoreflect.FieldDescriptor - fd_MsgSyncController_token protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncController = File_did_v1_tx_proto.Messages().ByName("MsgSyncController") - fd_MsgSyncController_controller = md_MsgSyncController.Fields().ByName("controller") - fd_MsgSyncController_token = md_MsgSyncController.Fields().ByName("token") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncController)(nil) - -type fastReflection_MsgSyncController MsgSyncController - -func (x *MsgSyncController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncController)(x) -} - -func (x *MsgSyncController) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[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_MsgSyncController_messageType fastReflection_MsgSyncController_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncController_messageType{} - -type fastReflection_MsgSyncController_messageType struct{} - -func (x fastReflection_MsgSyncController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncController)(nil) -} -func (x fastReflection_MsgSyncController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncController) -} -func (x fastReflection_MsgSyncController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncController -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncController -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSyncController) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncController_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncController) New() protoreflect.Message { - return new(fastReflection_MsgSyncController) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncController) Interface() protoreflect.ProtoMessage { - return (*MsgSyncController)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSyncController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgSyncController_controller, value) { - return - } - } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgSyncController_token, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSyncController) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - return x.Controller != "" - case "did.v1.MsgSyncController.token": - return x.Token != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncController) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - x.Controller = "" - case "did.v1.MsgSyncController.token": - x.Token = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSyncController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncController.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncController.token": - value := x.Token - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - x.Controller = value.Interface().(string) - case "did.v1.MsgSyncController.token": - x.Token = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgSyncController is not mutable")) - case "did.v1.MsgSyncController.token": - panic(fmt.Errorf("field token of message did.v1.MsgSyncController is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSyncController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - return protoreflect.ValueOfString("") - case "did.v1.MsgSyncController.token": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSyncController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncController", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSyncController) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncController) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSyncController) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSyncController) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncController) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Token) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncController) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x1a - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncController) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSyncControllerResponse protoreflect.MessageDescriptor - fd_MsgSyncControllerResponse_success protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncControllerResponse") - fd_MsgSyncControllerResponse_success = md_MsgSyncControllerResponse.Fields().ByName("success") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncControllerResponse)(nil) - -type fastReflection_MsgSyncControllerResponse MsgSyncControllerResponse - -func (x *MsgSyncControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncControllerResponse)(x) -} - -func (x *MsgSyncControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[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_MsgSyncControllerResponse_messageType fastReflection_MsgSyncControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncControllerResponse_messageType{} - -type fastReflection_MsgSyncControllerResponse_messageType struct{} - -func (x fastReflection_MsgSyncControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncControllerResponse)(nil) -} -func (x fastReflection_MsgSyncControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncControllerResponse) -} -func (x fastReflection_MsgSyncControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncControllerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSyncControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgSyncControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSyncControllerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSyncControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgSyncControllerResponse_success, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSyncControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - return x.Success != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - x.Success = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSyncControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - x.Success = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgSyncControllerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSyncControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSyncControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncControllerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSyncControllerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncControllerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSyncControllerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSyncControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncControllerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncControllerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncControllerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterController protoreflect.MessageDescriptor - fd_MsgRegisterController_authority protoreflect.FieldDescriptor - fd_MsgRegisterController_cid protoreflect.FieldDescriptor - fd_MsgRegisterController_origin protoreflect.FieldDescriptor - fd_MsgRegisterController_credential_creation_response protoreflect.FieldDescriptor + md_MsgRegisterController protoreflect.MessageDescriptor + fd_MsgRegisterController_authority protoreflect.FieldDescriptor + fd_MsgRegisterController_assertions protoreflect.FieldDescriptor + fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor + fd_MsgRegisterController_verifications protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") - fd_MsgRegisterController_cid = md_MsgRegisterController.Fields().ByName("cid") - fd_MsgRegisterController_origin = md_MsgRegisterController.Fields().ByName("origin") - fd_MsgRegisterController_credential_creation_response = md_MsgRegisterController.Fields().ByName("credential_creation_response") + fd_MsgRegisterController_assertions = md_MsgRegisterController.Fields().ByName("assertions") + fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") + fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") } var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) @@ -4323,7 +1314,7 @@ func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[8] + mi := &file_did_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4385,21 +1376,21 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe return } } - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_MsgRegisterController_cid, value) { + if len(x.Assertions) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &x.Assertions}) + if !f(fd_MsgRegisterController_assertions, value) { return } } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgRegisterController_origin, value) { + if len(x.Keyshares) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &x.Keyshares}) + if !f(fd_MsgRegisterController_keyshares, value) { return } } - if x.CredentialCreationResponse != "" { - value := protoreflect.ValueOfString(x.CredentialCreationResponse) - if !f(fd_MsgRegisterController_credential_creation_response, value) { + if len(x.Verifications) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Verifications}) + if !f(fd_MsgRegisterController_verifications, value) { return } } @@ -4420,12 +1411,12 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript switch fd.FullName() { case "did.v1.MsgRegisterController.authority": return x.Authority != "" - case "did.v1.MsgRegisterController.cid": - return x.Cid != "" - case "did.v1.MsgRegisterController.origin": - return x.Origin != "" - case "did.v1.MsgRegisterController.credential_creation_response": - return x.CredentialCreationResponse != "" + case "did.v1.MsgRegisterController.assertions": + return len(x.Assertions) != 0 + case "did.v1.MsgRegisterController.keyshares": + return len(x.Keyshares) != 0 + case "did.v1.MsgRegisterController.verifications": + return len(x.Verifications) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4444,12 +1435,12 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri switch fd.FullName() { case "did.v1.MsgRegisterController.authority": x.Authority = "" - case "did.v1.MsgRegisterController.cid": - x.Cid = "" - case "did.v1.MsgRegisterController.origin": - x.Origin = "" - case "did.v1.MsgRegisterController.credential_creation_response": - x.CredentialCreationResponse = "" + case "did.v1.MsgRegisterController.assertions": + x.Assertions = nil + case "did.v1.MsgRegisterController.keyshares": + x.Keyshares = nil + case "did.v1.MsgRegisterController.verifications": + x.Verifications = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4469,15 +1460,24 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field case "did.v1.MsgRegisterController.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.credential_creation_response": - value := x.CredentialCreationResponse - return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterController.assertions": + if len(x.Assertions) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{}) + } + listValue := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.keyshares": + if len(x.Keyshares) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) + } + listValue := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.verifications": + if len(x.Verifications) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) + } + listValue := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4500,12 +1500,18 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript switch fd.FullName() { case "did.v1.MsgRegisterController.authority": x.Authority = value.Interface().(string) - case "did.v1.MsgRegisterController.cid": - x.Cid = value.Interface().(string) - case "did.v1.MsgRegisterController.origin": - x.Origin = value.Interface().(string) - case "did.v1.MsgRegisterController.credential_creation_response": - x.CredentialCreationResponse = value.Interface().(string) + case "did.v1.MsgRegisterController.assertions": + lv := value.List() + clv := lv.(*_MsgRegisterController_2_list) + x.Assertions = *clv.list + case "did.v1.MsgRegisterController.keyshares": + lv := value.List() + clv := lv.(*_MsgRegisterController_3_list) + x.Keyshares = *clv.list + case "did.v1.MsgRegisterController.verifications": + lv := value.List() + clv := lv.(*_MsgRegisterController_4_list) + x.Verifications = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4526,14 +1532,26 @@ 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.assertions": + if x.Assertions == nil { + x.Assertions = [][]byte{} + } + value := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.keyshares": + if x.Keyshares == nil { + x.Keyshares = [][]byte{} + } + value := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.verifications": + if x.Verifications == nil { + x.Verifications = [][]byte{} + } + value := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(value) case "did.v1.MsgRegisterController.authority": panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) - 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")) - case "did.v1.MsgRegisterController.credential_creation_response": - panic(fmt.Errorf("field credential_creation_response 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")) @@ -4549,12 +1567,15 @@ func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDes switch fd.FullName() { case "did.v1.MsgRegisterController.authority": return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.cid": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.origin": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.credential_creation_response": - return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterController.assertions": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &list}) + case "did.v1.MsgRegisterController.keyshares": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) + case "did.v1.MsgRegisterController.verifications": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4628,17 +1649,23 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Assertions) > 0 { + for _, b := range x.Assertions { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Keyshares) > 0 { + for _, b := range x.Keyshares { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } } - l = len(x.CredentialCreationResponse) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Verifications) > 0 { + for _, b := range x.Verifications { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -4669,26 +1696,32 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.CredentialCreationResponse) > 0 { - i -= len(x.CredentialCreationResponse) - copy(dAtA[i:], x.CredentialCreationResponse) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialCreationResponse))) - i-- - dAtA[i] = 0x22 + if len(x.Verifications) > 0 { + for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Verifications[iNdEx]) + copy(dAtA[i:], x.Verifications[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if len(x.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.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.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.Assertions) > 0 { + for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Assertions[iNdEx]) + copy(dAtA[i:], x.Assertions[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } if len(x.Authority) > 0 { i -= len(x.Authority) @@ -4780,9 +1813,9 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertions", 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 @@ -4792,29 +1825,29 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } 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.Cid = string(dAtA[iNdEx:postIndex]) + x.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) + copy(x.Assertions[len(x.Assertions)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshares", 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 @@ -4824,29 +1857,29 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } 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.Origin = string(dAtA[iNdEx:postIndex]) + x.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) + copy(x.Keyshares[len(x.Keyshares)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialCreationResponse", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Verifications", 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 @@ -4856,23 +1889,23 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } 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.CredentialCreationResponse = string(dAtA[iNdEx:postIndex]) + x.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) + copy(x.Verifications[len(x.Verifications)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5015,7 +2048,7 @@ func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[9] + mi := &file_did_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5687,12 +2720,94 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } } +var _ protoreflect.Map = (*_MsgAuthorizeService_3_map)(nil) + +type _MsgAuthorizeService_3_map struct { + m *map[string]string +} + +func (x *_MsgAuthorizeService_3_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MsgAuthorizeService_3_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 *_MsgAuthorizeService_3_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 *_MsgAuthorizeService_3_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MsgAuthorizeService_3_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 *_MsgAuthorizeService_3_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 *_MsgAuthorizeService_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 *_MsgAuthorizeService_3_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgAuthorizeService_3_map) IsValid() bool { + return x.m != nil +} + var ( - md_MsgAuthorizeService protoreflect.MessageDescriptor - fd_MsgAuthorizeService_controller protoreflect.FieldDescriptor - fd_MsgAuthorizeService_origin protoreflect.FieldDescriptor - fd_MsgAuthorizeService_scopes protoreflect.FieldDescriptor - fd_MsgAuthorizeService_token protoreflect.FieldDescriptor + md_MsgAuthorizeService protoreflect.MessageDescriptor + fd_MsgAuthorizeService_controller protoreflect.FieldDescriptor + fd_MsgAuthorizeService_origin protoreflect.FieldDescriptor + fd_MsgAuthorizeService_permissions protoreflect.FieldDescriptor + fd_MsgAuthorizeService_token protoreflect.FieldDescriptor ) func init() { @@ -5700,7 +2815,7 @@ func init() { md_MsgAuthorizeService = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeService") fd_MsgAuthorizeService_controller = md_MsgAuthorizeService.Fields().ByName("controller") fd_MsgAuthorizeService_origin = md_MsgAuthorizeService.Fields().ByName("origin") - fd_MsgAuthorizeService_scopes = md_MsgAuthorizeService.Fields().ByName("scopes") + fd_MsgAuthorizeService_permissions = md_MsgAuthorizeService.Fields().ByName("permissions") fd_MsgAuthorizeService_token = md_MsgAuthorizeService.Fields().ByName("token") } @@ -5713,7 +2828,7 @@ func (x *MsgAuthorizeService) ProtoReflect() protoreflect.Message { } func (x *MsgAuthorizeService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[10] + mi := &file_did_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5781,9 +2896,9 @@ func (x *fastReflection_MsgAuthorizeService) Range(f func(protoreflect.FieldDesc return } } - if x.Scopes != nil { - value := protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) - if !f(fd_MsgAuthorizeService_scopes, value) { + if len(x.Permissions) != 0 { + value := protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{m: &x.Permissions}) + if !f(fd_MsgAuthorizeService_permissions, value) { return } } @@ -5812,8 +2927,8 @@ func (x *fastReflection_MsgAuthorizeService) Has(fd protoreflect.FieldDescriptor return x.Controller != "" case "did.v1.MsgAuthorizeService.origin": return x.Origin != "" - case "did.v1.MsgAuthorizeService.scopes": - return x.Scopes != nil + case "did.v1.MsgAuthorizeService.permissions": + return len(x.Permissions) != 0 case "did.v1.MsgAuthorizeService.token": return x.Token != "" default: @@ -5836,8 +2951,8 @@ func (x *fastReflection_MsgAuthorizeService) Clear(fd protoreflect.FieldDescript x.Controller = "" case "did.v1.MsgAuthorizeService.origin": x.Origin = "" - case "did.v1.MsgAuthorizeService.scopes": - x.Scopes = nil + case "did.v1.MsgAuthorizeService.permissions": + x.Permissions = nil case "did.v1.MsgAuthorizeService.token": x.Token = "" default: @@ -5862,9 +2977,12 @@ func (x *fastReflection_MsgAuthorizeService) Get(descriptor protoreflect.FieldDe case "did.v1.MsgAuthorizeService.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthorizeService.scopes": - value := x.Scopes - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgAuthorizeService.permissions": + if len(x.Permissions) == 0 { + return protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{}) + } + mapValue := &_MsgAuthorizeService_3_map{m: &x.Permissions} + return protoreflect.ValueOfMap(mapValue) case "did.v1.MsgAuthorizeService.token": value := x.Token return protoreflect.ValueOfString(value) @@ -5892,8 +3010,10 @@ func (x *fastReflection_MsgAuthorizeService) Set(fd protoreflect.FieldDescriptor x.Controller = value.Interface().(string) case "did.v1.MsgAuthorizeService.origin": x.Origin = value.Interface().(string) - case "did.v1.MsgAuthorizeService.scopes": - x.Scopes = value.Message().Interface().(*Permissions) + case "did.v1.MsgAuthorizeService.permissions": + mv := value.Map() + cmv := mv.(*_MsgAuthorizeService_3_map) + x.Permissions = *cmv.m case "did.v1.MsgAuthorizeService.token": x.Token = value.Interface().(string) default: @@ -5916,11 +3036,12 @@ func (x *fastReflection_MsgAuthorizeService) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAuthorizeService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthorizeService.scopes": - if x.Scopes == nil { - x.Scopes = new(Permissions) + case "did.v1.MsgAuthorizeService.permissions": + if x.Permissions == nil { + x.Permissions = make(map[string]string) } - return protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) + value := &_MsgAuthorizeService_3_map{m: &x.Permissions} + return protoreflect.ValueOfMap(value) case "did.v1.MsgAuthorizeService.controller": panic(fmt.Errorf("field controller of message did.v1.MsgAuthorizeService is not mutable")) case "did.v1.MsgAuthorizeService.origin": @@ -5944,9 +3065,9 @@ func (x *fastReflection_MsgAuthorizeService) NewField(fd protoreflect.FieldDescr return protoreflect.ValueOfString("") case "did.v1.MsgAuthorizeService.origin": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthorizeService.scopes": - m := new(Permissions) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgAuthorizeService.permissions": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{m: &m}) case "did.v1.MsgAuthorizeService.token": return protoreflect.ValueOfString("") default: @@ -6026,9 +3147,26 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Scopes != nil { - l = options.Size(x.Scopes) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Permissions) > 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.Permissions)) + for k := range x.Permissions { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Permissions[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Permissions { + SiZeMaP(k, v) + } + } } l = len(x.Token) if l > 0 { @@ -6070,19 +3208,48 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods 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 + if len(x.Permissions) > 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] = 0x1a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForPermissions := make([]string, 0, len(x.Permissions)) + for k := range x.Permissions { + keysForPermissions = append(keysForPermissions, string(k)) + } + sort.Slice(keysForPermissions, func(i, j int) bool { + return keysForPermissions[i] < keysForPermissions[j] + }) + for iNdEx := len(keysForPermissions) - 1; iNdEx >= 0; iNdEx-- { + v := x.Permissions[string(keysForPermissions[iNdEx])] + out, err := MaRsHaLmAp(keysForPermissions[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Permissions { + v := x.Permissions[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a } if len(x.Origin) > 0 { i -= len(x.Origin) @@ -6213,7 +3380,7 @@ func (x *fastReflection_MsgAuthorizeService) 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 Scopes", wireType) + 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 { @@ -6240,12 +3407,103 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Scopes == nil { - x.Scopes = &Permissions{} + if x.Permissions == nil { + x.Permissions = make(map[string]string) } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scopes); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + x.Permissions[mapkey] = mapvalue iNdEx = postIndex case 4: if wireType != 2 { @@ -6336,7 +3594,7 @@ func (x *MsgAuthorizeServiceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAuthorizeServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[11] + mi := &file_did_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6792,7 +4050,6 @@ var ( md_MsgRegisterService protoreflect.MessageDescriptor fd_MsgRegisterService_controller protoreflect.FieldDescriptor fd_MsgRegisterService_service protoreflect.FieldDescriptor - fd_MsgRegisterService_token protoreflect.FieldDescriptor ) func init() { @@ -6800,7 +4057,6 @@ func init() { md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller") fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service") - fd_MsgRegisterService_token = md_MsgRegisterService.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) @@ -6812,7 +4068,7 @@ func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[12] + mi := &file_did_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6880,12 +4136,6 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr return } } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgRegisterService_token, value) { - return - } - } } // Has reports whether a field is populated. @@ -6905,8 +4155,6 @@ func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) return x.Controller != "" case "did.v1.MsgRegisterService.service": return x.Service != nil - case "did.v1.MsgRegisterService.token": - return x.Token != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -6927,8 +4175,6 @@ func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescripto x.Controller = "" case "did.v1.MsgRegisterService.service": x.Service = nil - case "did.v1.MsgRegisterService.token": - x.Token = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -6951,9 +4197,6 @@ func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDes case "did.v1.MsgRegisterService.service": value := x.Service return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.MsgRegisterService.token": - value := x.Token - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -6978,8 +4221,6 @@ func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, x.Controller = value.Interface().(string) case "did.v1.MsgRegisterService.service": x.Service = value.Message().Interface().(*Service) - case "did.v1.MsgRegisterService.token": - x.Token = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -7007,8 +4248,6 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) case "did.v1.MsgRegisterService.controller": panic(fmt.Errorf("field controller of message did.v1.MsgRegisterService is not mutable")) - case "did.v1.MsgRegisterService.token": - panic(fmt.Errorf("field token 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")) @@ -7027,8 +4266,6 @@ func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescri case "did.v1.MsgRegisterService.service": m := new(Service) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.MsgRegisterService.token": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -7106,10 +4343,6 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { l = options.Size(x.Service) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Token) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7139,13 +4372,6 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x1a - } if x.Service != nil { encoded, err := options.Marshal(x.Service) if err != nil { @@ -7284,38 +4510,6 @@ func (x *fastReflection_MsgRegisterService) 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 stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7373,7 +4567,7 @@ func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[13] + mi := &file_did_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7826,2153 +5020,29 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M } var ( - md_MsgProveWitness protoreflect.MessageDescriptor - fd_MsgProveWitness_authority protoreflect.FieldDescriptor - fd_MsgProveWitness_property protoreflect.FieldDescriptor - fd_MsgProveWitness_witness protoreflect.FieldDescriptor + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor + fd_MsgUpdateParams_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgProveWitness = File_did_v1_tx_proto.Messages().ByName("MsgProveWitness") - fd_MsgProveWitness_authority = md_MsgProveWitness.Fields().ByName("authority") - fd_MsgProveWitness_property = md_MsgProveWitness.Fields().ByName("property") - fd_MsgProveWitness_witness = md_MsgProveWitness.Fields().ByName("witness") + 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_MsgProveWitness)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) -type fastReflection_MsgProveWitness MsgProveWitness +type fastReflection_MsgUpdateParams MsgUpdateParams -func (x *MsgProveWitness) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgProveWitness)(x) +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) } -func (x *MsgProveWitness) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgProveWitness_messageType fastReflection_MsgProveWitness_messageType -var _ protoreflect.MessageType = fastReflection_MsgProveWitness_messageType{} - -type fastReflection_MsgProveWitness_messageType struct{} - -func (x fastReflection_MsgProveWitness_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgProveWitness)(nil) -} -func (x fastReflection_MsgProveWitness_messageType) New() protoreflect.Message { - return new(fastReflection_MsgProveWitness) -} -func (x fastReflection_MsgProveWitness_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitness -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgProveWitness) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitness -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgProveWitness) Type() protoreflect.MessageType { - return _fastReflection_MsgProveWitness_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgProveWitness) New() protoreflect.Message { - return new(fastReflection_MsgProveWitness) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgProveWitness) Interface() protoreflect.ProtoMessage { - return (*MsgProveWitness)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgProveWitness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgProveWitness_authority, value) { - return - } - } - if x.Property != "" { - value := protoreflect.ValueOfString(x.Property) - if !f(fd_MsgProveWitness_property, value) { - return - } - } - if len(x.Witness) != 0 { - value := protoreflect.ValueOfBytes(x.Witness) - if !f(fd_MsgProveWitness_witness, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgProveWitness) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - return x.Authority != "" - case "did.v1.MsgProveWitness.property": - return x.Property != "" - case "did.v1.MsgProveWitness.witness": - return len(x.Witness) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - x.Authority = "" - case "did.v1.MsgProveWitness.property": - x.Property = "" - case "did.v1.MsgProveWitness.witness": - x.Witness = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgProveWitness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgProveWitness.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgProveWitness.property": - value := x.Property - return protoreflect.ValueOfString(value) - case "did.v1.MsgProveWitness.witness": - value := x.Witness - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgProveWitness.property": - x.Property = value.Interface().(string) - case "did.v1.MsgProveWitness.witness": - x.Witness = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgProveWitness is not mutable")) - case "did.v1.MsgProveWitness.property": - panic(fmt.Errorf("field property of message did.v1.MsgProveWitness is not mutable")) - case "did.v1.MsgProveWitness.witness": - panic(fmt.Errorf("field witness of message did.v1.MsgProveWitness is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgProveWitness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitness.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgProveWitness.property": - return protoreflect.ValueOfString("") - case "did.v1.MsgProveWitness.witness": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgProveWitness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitness", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgProveWitness) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitness) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgProveWitness) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Property) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Witness) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Witness) > 0 { - i -= len(x.Witness) - copy(dAtA[i:], x.Witness) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness))) - i-- - dAtA[i] = 0x1a - } - if len(x.Property) > 0 { - i -= len(x.Property) - copy(dAtA[i:], x.Property) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitness) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...) - if x.Witness == nil { - x.Witness = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgProveWitnessResponse protoreflect.MessageDescriptor - fd_MsgProveWitnessResponse_success protoreflect.FieldDescriptor - fd_MsgProveWitnessResponse_property protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgProveWitnessResponse = File_did_v1_tx_proto.Messages().ByName("MsgProveWitnessResponse") - fd_MsgProveWitnessResponse_success = md_MsgProveWitnessResponse.Fields().ByName("success") - fd_MsgProveWitnessResponse_property = md_MsgProveWitnessResponse.Fields().ByName("property") -} - -var _ protoreflect.Message = (*fastReflection_MsgProveWitnessResponse)(nil) - -type fastReflection_MsgProveWitnessResponse MsgProveWitnessResponse - -func (x *MsgProveWitnessResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgProveWitnessResponse)(x) -} - -func (x *MsgProveWitnessResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgProveWitnessResponse_messageType fastReflection_MsgProveWitnessResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgProveWitnessResponse_messageType{} - -type fastReflection_MsgProveWitnessResponse_messageType struct{} - -func (x fastReflection_MsgProveWitnessResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgProveWitnessResponse)(nil) -} -func (x fastReflection_MsgProveWitnessResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgProveWitnessResponse) -} -func (x fastReflection_MsgProveWitnessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitnessResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgProveWitnessResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgProveWitnessResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgProveWitnessResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgProveWitnessResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgProveWitnessResponse) New() protoreflect.Message { - return new(fastReflection_MsgProveWitnessResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgProveWitnessResponse) Interface() protoreflect.ProtoMessage { - return (*MsgProveWitnessResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgProveWitnessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgProveWitnessResponse_success, value) { - return - } - } - if x.Property != "" { - value := protoreflect.ValueOfString(x.Property) - if !f(fd_MsgProveWitnessResponse_property, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgProveWitnessResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - return x.Success != false - case "did.v1.MsgProveWitnessResponse.property": - return x.Property != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - x.Success = false - case "did.v1.MsgProveWitnessResponse.property": - x.Property = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgProveWitnessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "did.v1.MsgProveWitnessResponse.property": - value := x.Property - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - x.Success = value.Bool() - case "did.v1.MsgProveWitnessResponse.property": - x.Property = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgProveWitnessResponse is not mutable")) - case "did.v1.MsgProveWitnessResponse.property": - panic(fmt.Errorf("field property of message did.v1.MsgProveWitnessResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgProveWitnessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgProveWitnessResponse.success": - return protoreflect.ValueOfBool(false) - case "did.v1.MsgProveWitnessResponse.property": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) - } - panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgProveWitnessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitnessResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgProveWitnessResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgProveWitnessResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgProveWitnessResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgProveWitnessResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - l = len(x.Property) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Property) > 0 { - i -= len(x.Property) - copy(dAtA[i:], x.Property) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgProveWitnessResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSyncVault protoreflect.MessageDescriptor - fd_MsgSyncVault_controller protoreflect.FieldDescriptor - fd_MsgSyncVault_cid protoreflect.FieldDescriptor - fd_MsgSyncVault_macron protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncVault = File_did_v1_tx_proto.Messages().ByName("MsgSyncVault") - fd_MsgSyncVault_controller = md_MsgSyncVault.Fields().ByName("controller") - fd_MsgSyncVault_cid = md_MsgSyncVault.Fields().ByName("cid") - fd_MsgSyncVault_macron = md_MsgSyncVault.Fields().ByName("macron") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncVault)(nil) - -type fastReflection_MsgSyncVault MsgSyncVault - -func (x *MsgSyncVault) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncVault)(x) -} - -func (x *MsgSyncVault) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSyncVault_messageType fastReflection_MsgSyncVault_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncVault_messageType{} - -type fastReflection_MsgSyncVault_messageType struct{} - -func (x fastReflection_MsgSyncVault_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncVault)(nil) -} -func (x fastReflection_MsgSyncVault_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncVault) -} -func (x fastReflection_MsgSyncVault_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVault -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncVault) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVault -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSyncVault) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncVault_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncVault) New() protoreflect.Message { - return new(fastReflection_MsgSyncVault) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncVault) Interface() protoreflect.ProtoMessage { - return (*MsgSyncVault)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSyncVault) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgSyncVault_controller, value) { - return - } - } - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_MsgSyncVault_cid, value) { - return - } - } - if len(x.Macron) != 0 { - value := protoreflect.ValueOfBytes(x.Macron) - if !f(fd_MsgSyncVault_macron, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSyncVault) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": - return x.Controller != "" - case "did.v1.MsgSyncVault.cid": - return x.Cid != "" - case "did.v1.MsgSyncVault.macron": - return len(x.Macron) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": - x.Controller = "" - case "did.v1.MsgSyncVault.cid": - x.Cid = "" - case "did.v1.MsgSyncVault.macron": - x.Macron = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSyncVault) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncVault.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncVault.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncVault.macron": - value := x.Macron - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": - x.Controller = value.Interface().(string) - case "did.v1.MsgSyncVault.cid": - x.Cid = value.Interface().(string) - case "did.v1.MsgSyncVault.macron": - x.Macron = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgSyncVault is not mutable")) - case "did.v1.MsgSyncVault.cid": - panic(fmt.Errorf("field cid of message did.v1.MsgSyncVault is not mutable")) - case "did.v1.MsgSyncVault.macron": - panic(fmt.Errorf("field macron of message did.v1.MsgSyncVault is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSyncVault) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncVault.controller": - return protoreflect.ValueOfString("") - case "did.v1.MsgSyncVault.cid": - return protoreflect.ValueOfString("") - case "did.v1.MsgSyncVault.macron": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSyncVault) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVault", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSyncVault) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVault) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSyncVault) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncVault) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Macron) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVault) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Macron) > 0 { - i -= len(x.Macron) - copy(dAtA[i:], x.Macron) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macron))) - i-- - dAtA[i] = 0x1a - } - if len(x.Cid) > 0 { - i -= len(x.Cid) - copy(dAtA[i:], x.Cid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) - i-- - dAtA[i] = 0x12 - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVault) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Macron = append(x.Macron[:0], dAtA[iNdEx:postIndex]...) - if x.Macron == nil { - x.Macron = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSyncVaultResponse protoreflect.MessageDescriptor - fd_MsgSyncVaultResponse_success protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncVaultResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncVaultResponse") - fd_MsgSyncVaultResponse_success = md_MsgSyncVaultResponse.Fields().ByName("success") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncVaultResponse)(nil) - -type fastReflection_MsgSyncVaultResponse MsgSyncVaultResponse - -func (x *MsgSyncVaultResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncVaultResponse)(x) -} - -func (x *MsgSyncVaultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSyncVaultResponse_messageType fastReflection_MsgSyncVaultResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncVaultResponse_messageType{} - -type fastReflection_MsgSyncVaultResponse_messageType struct{} - -func (x fastReflection_MsgSyncVaultResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncVaultResponse)(nil) -} -func (x fastReflection_MsgSyncVaultResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncVaultResponse) -} -func (x fastReflection_MsgSyncVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVaultResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncVaultResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncVaultResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSyncVaultResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncVaultResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncVaultResponse) New() protoreflect.Message { - return new(fastReflection_MsgSyncVaultResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncVaultResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSyncVaultResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSyncVaultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgSyncVaultResponse_success, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSyncVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - return x.Success != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - x.Success = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSyncVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - x.Success = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgSyncVaultResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSyncVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncVaultResponse.success": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSyncVaultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVaultResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSyncVaultResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSyncVaultResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSyncVaultResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncVaultResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVaultResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSyncVaultResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVaultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgRegisterController_2_list)(nil) - -type _MsgRegisterController_2_list struct { - list *[][]byte -} - -func (x *_MsgRegisterController_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterController_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgRegisterController_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterController_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterController_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Assertions as it is not of Message kind")) -} - -func (x *_MsgRegisterController_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterController_2_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgRegisterController_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgRegisterController_3_list)(nil) - -type _MsgRegisterController_3_list struct { - list *[][]byte -} - -func (x *_MsgRegisterController_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterController_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgRegisterController_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterController_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterController_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Keyshares as it is not of Message kind")) -} - -func (x *_MsgRegisterController_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterController_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgRegisterController_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) - -type _MsgRegisterController_4_list struct { - list *[][]byte -} - -func (x *_MsgRegisterController_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Verifications as it is not of Message kind")) -} - -func (x *_MsgRegisterController_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgRegisterController_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgRegisterController protoreflect.MessageDescriptor - fd_MsgRegisterController_authority protoreflect.FieldDescriptor - fd_MsgRegisterController_assertions protoreflect.FieldDescriptor - fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor - fd_MsgRegisterController_verifications protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") - fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") - fd_MsgRegisterController_assertions = md_MsgRegisterController.Fields().ByName("assertions") - fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") - fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) - -type fastReflection_MsgRegisterController MsgRegisterController - -func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterController)(x) -} - -func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9984,43 +5054,43 @@ func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgRegisterController_messageType fastReflection_MsgRegisterController_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterController_messageType{} +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} -type fastReflection_MsgRegisterController_messageType struct{} +type fastReflection_MsgUpdateParams_messageType struct{} -func (x fastReflection_MsgRegisterController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterController)(nil) +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) } -func (x fastReflection_MsgRegisterController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterController) +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) } -func (x fastReflection_MsgRegisterController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterController +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRegisterController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterController +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterController) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterController_messageType +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterController) New() protoreflect.Message { - return new(fastReflection_MsgRegisterController) +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterController)(x) +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, @@ -10028,28 +5098,22 @@ func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgRegisterController_authority, value) { + if !f(fd_MsgUpdateParams_authority, value) { return } } - if len(x.Assertions) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &x.Assertions}) - if !f(fd_MsgRegisterController_assertions, value) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { return } } - if len(x.Keyshares) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &x.Keyshares}) - if !f(fd_MsgRegisterController_keyshares, value) { - return - } - } - if len(x.Verifications) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Verifications}) - if !f(fd_MsgRegisterController_verifications, value) { + if x.Token != "" { + value := protoreflect.ValueOfString(x.Token) + if !f(fd_MsgUpdateParams_token, value) { return } } @@ -10066,21 +5130,19 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgUpdateParams.authority": return x.Authority != "" - case "did.v1.MsgRegisterController.assertions": - return len(x.Assertions) != 0 - case "did.v1.MsgRegisterController.keyshares": - return len(x.Keyshares) != 0 - case "did.v1.MsgRegisterController.verifications": - return len(x.Verifications) != 0 + case "did.v1.MsgUpdateParams.params": + return x.Params != nil + case "did.v1.MsgUpdateParams.token": + return x.Token != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -10090,21 +5152,19 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgUpdateParams.authority": x.Authority = "" - case "did.v1.MsgRegisterController.assertions": - x.Assertions = nil - case "did.v1.MsgRegisterController.keyshares": - x.Keyshares = nil - case "did.v1.MsgRegisterController.verifications": - x.Verifications = nil + case "did.v1.MsgUpdateParams.params": + x.Params = nil + case "did.v1.MsgUpdateParams.token": + x.Token = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -10114,34 +5174,22 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.assertions": - if len(x.Assertions) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterController_2_list{}) - } - listValue := &_MsgRegisterController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgRegisterController.keyshares": - if len(x.Keyshares) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) - } - listValue := &_MsgRegisterController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgRegisterController.verifications": - if len(x.Verifications) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) - } - listValue := &_MsgRegisterController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(listValue) + case "did.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgUpdateParams.token": + value := x.Token + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } @@ -10155,27 +5203,19 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgUpdateParams.authority": x.Authority = value.Interface().(string) - case "did.v1.MsgRegisterController.assertions": - lv := value.List() - clv := lv.(*_MsgRegisterController_2_list) - x.Assertions = *clv.list - case "did.v1.MsgRegisterController.keyshares": - lv := value.List() - clv := lv.(*_MsgRegisterController_3_list) - x.Keyshares = *clv.list - case "did.v1.MsgRegisterController.verifications": - lv := value.List() - clv := lv.(*_MsgRegisterController_4_list) - x.Verifications = *clv.list + case "did.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + case "did.v1.MsgUpdateParams.token": + x.Token = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -10189,67 +5229,52 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.assertions": - if x.Assertions == nil { - x.Assertions = [][]byte{} + case "did.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) } - value := &_MsgRegisterController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterController.keyshares": - if x.Keyshares == nil { - x.Keyshares = [][]byte{} - } - value := &_MsgRegisterController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterController.verifications": - if x.Verifications == nil { - x.Verifications = [][]byte{} - } - value := &_MsgRegisterController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "did.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgUpdateParams is not mutable")) + case "did.v1.MsgUpdateParams.token": + panic(fmt.Errorf("field token of message did.v1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgUpdateParams.token": return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.assertions": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &list}) - case "did.v1.MsgRegisterController.keyshares": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) - case "did.v1.MsgRegisterController.verifications": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParams does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterController", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUpdateParams", d.FullName())) } panic("unreachable") } @@ -10257,7 +5282,7 @@ func (x *fastReflection_MsgRegisterController) WhichOneof(d protoreflect.OneofDe // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterController) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -10268,7 +5293,7 @@ func (x *fastReflection_MsgRegisterController) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -10280,7 +5305,7 @@ func (x *fastReflection_MsgRegisterController) SetUnknown(fields protoreflect.Ra // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterController) IsValid() bool { +func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } @@ -10290,9 +5315,9 @@ func (x *fastReflection_MsgRegisterController) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -10308,23 +5333,13 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Assertions) > 0 { - for _, b := range x.Assertions { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Keyshares) > 0 { - for _, b := range x.Keyshares { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Verifications) > 0 { - for _, b := range x.Verifications { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } + l = len(x.Token) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -10336,7 +5351,7 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -10355,32 +5370,26 @@ 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]))) - i-- - dAtA[i] = 0x22 - } + if len(x.Token) > 0 { + i -= len(x.Token) + copy(dAtA[i:], x.Token) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) + i-- + dAtA[i] = 0x1a } - if len(x.Keyshares) > 0 { - for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keyshares[iNdEx]) - copy(dAtA[i:], x.Keyshares[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Assertions) > 0 { - for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Assertions[iNdEx]) - copy(dAtA[i:], x.Assertions[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) - i-- - dAtA[i] = 0x12 + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 } if len(x.Authority) > 0 { i -= len(x.Authority) @@ -10400,7 +5409,7 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -10432,10 +5441,10 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10472,700 +5481,7 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) - copy(x.Assertions[len(x.Assertions)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) - copy(x.Keyshares[len(x.Keyshares)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) - copy(x.Verifications[len(x.Verifications)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.Map = (*_MsgRegisterControllerResponse_2_map)(nil) - -type _MsgRegisterControllerResponse_2_map struct { - m *map[string]string -} - -func (x *_MsgRegisterControllerResponse_2_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_MsgRegisterControllerResponse_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_MsgRegisterControllerResponse_2_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_MsgRegisterControllerResponse_2_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_MsgRegisterControllerResponse_2_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_MsgRegisterControllerResponse_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_MsgRegisterControllerResponse_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_MsgRegisterControllerResponse_2_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgRegisterControllerResponse_2_map) IsValid() bool { - return x.m != nil -} - -var ( - md_MsgRegisterControllerResponse protoreflect.MessageDescriptor - fd_MsgRegisterControllerResponse_controller protoreflect.FieldDescriptor - fd_MsgRegisterControllerResponse_accounts protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgRegisterControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterControllerResponse") - fd_MsgRegisterControllerResponse_controller = md_MsgRegisterControllerResponse.Fields().ByName("controller") - fd_MsgRegisterControllerResponse_accounts = md_MsgRegisterControllerResponse.Fields().ByName("accounts") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterControllerResponse)(nil) - -type fastReflection_MsgRegisterControllerResponse MsgRegisterControllerResponse - -func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterControllerResponse)(x) -} - -func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterControllerResponse_messageType fastReflection_MsgRegisterControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterControllerResponse_messageType{} - -type fastReflection_MsgRegisterControllerResponse_messageType struct{} - -func (x fastReflection_MsgRegisterControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterControllerResponse)(nil) -} -func (x fastReflection_MsgRegisterControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterControllerResponse) -} -func (x fastReflection_MsgRegisterControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterControllerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterControllerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgRegisterControllerResponse_controller, value) { - return - } - } - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &x.Accounts}) - if !f(fd_MsgRegisterControllerResponse_accounts, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.controller": - return x.Controller != "" - case "did.v1.MsgRegisterControllerResponse.accounts": - return len(x.Accounts) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.controller": - x.Controller = "" - case "did.v1.MsgRegisterControllerResponse.accounts": - x.Accounts = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgRegisterControllerResponse.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterControllerResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{}) - } - mapValue := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.controller": - x.Controller = value.Interface().(string) - case "did.v1.MsgRegisterControllerResponse.accounts": - mv := value.Map() - cmv := mv.(*_MsgRegisterControllerResponse_2_map) - x.Accounts = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.accounts": - if x.Accounts == nil { - x.Accounts = make(map[string]string) - } - value := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} - return protoreflect.ValueOfMap(value) - case "did.v1.MsgRegisterControllerResponse.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgRegisterControllerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.controller": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterControllerResponse.accounts": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterControllerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterControllerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterControllerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterControllerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Accounts) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Accounts)) - for k := range x.Accounts { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Accounts[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Accounts { - SiZeMaP(k, v) - } - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterControllerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Accounts) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForAccounts := make([]string, 0, len(x.Accounts)) - for k := range x.Accounts { - keysForAccounts = append(keysForAccounts, string(k)) - } - sort.Slice(keysForAccounts, func(i, j int) bool { - return keysForAccounts[i] < keysForAccounts[j] - }) - for iNdEx := len(keysForAccounts) - 1; iNdEx >= 0; iNdEx-- { - v := x.Accounts[string(keysForAccounts[iNdEx])] - out, err := MaRsHaLmAp(keysForAccounts[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Accounts { - v := x.Accounts[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterControllerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11192,762 +5508,45 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Accounts == nil { - x.Accounts = make(map[string]string) + if x.Params == nil { + x.Params = &Params{} } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Accounts[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgRegisterService_3_list)(nil) - -type _MsgRegisterService_3_list struct { - list *[]PermissionScope -} - -func (x *_MsgRegisterService_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterService_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) -} - -func (x *_MsgRegisterService_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterService_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterService_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterService at list field Scopes as it is not of Message kind")) -} - -func (x *_MsgRegisterService_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterService_3_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) -} - -func (x *_MsgRegisterService_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgRegisterService protoreflect.MessageDescriptor - fd_MsgRegisterService_authority protoreflect.FieldDescriptor - fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor - fd_MsgRegisterService_scopes protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") - fd_MsgRegisterService_authority = md_MsgRegisterService.Fields().ByName("authority") - fd_MsgRegisterService_origin_uri = md_MsgRegisterService.Fields().ByName("origin_uri") - fd_MsgRegisterService_scopes = md_MsgRegisterService.Fields().ByName("scopes") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) - -type fastReflection_MsgRegisterService MsgRegisterService - -func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterService)(x) -} - -func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterService_messageType fastReflection_MsgRegisterService_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterService_messageType{} - -type fastReflection_MsgRegisterService_messageType struct{} - -func (x fastReflection_MsgRegisterService_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterService)(nil) -} -func (x fastReflection_MsgRegisterService_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterService) -} -func (x fastReflection_MsgRegisterService_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterService -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterService) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterService -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterService) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterService_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterService) New() protoreflect.Message { - return new(fastReflection_MsgRegisterService) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterService) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterService)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgRegisterService_authority, value) { - return - } - } - if x.OriginUri != "" { - value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_MsgRegisterService_origin_uri, value) { - return - } - } - if len(x.Scopes) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &x.Scopes}) - if !f(fd_MsgRegisterService_scopes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - return x.Authority != "" - case "did.v1.MsgRegisterService.origin_uri": - return x.OriginUri != "" - case "did.v1.MsgRegisterService.scopes": - return len(x.Scopes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - x.Authority = "" - case "did.v1.MsgRegisterService.origin_uri": - x.OriginUri = "" - case "did.v1.MsgRegisterService.scopes": - x.Scopes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgRegisterService.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterService.origin_uri": - value := x.OriginUri - return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterService.scopes": - if len(x.Scopes) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterService_3_list{}) - } - listValue := &_MsgRegisterService_3_list{list: &x.Scopes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgRegisterService.origin_uri": - x.OriginUri = value.Interface().(string) - case "did.v1.MsgRegisterService.scopes": - lv := value.List() - clv := lv.(*_MsgRegisterService_3_list) - x.Scopes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgRegisterService.scopes": - if x.Scopes == nil { - x.Scopes = []PermissionScope{} - } - value := &_MsgRegisterService_3_list{list: &x.Scopes} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterService.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgRegisterService is not mutable")) - case "did.v1.MsgRegisterService.origin_uri": - panic(fmt.Errorf("field origin_uri of message did.v1.MsgRegisterService is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterService.origin_uri": - return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterService.scopes": - list := []PermissionScope{} - return protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterService", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterService) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterService) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginUri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Scopes) > 0 { - l = 0 - for _, e := range x.Scopes { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Scopes) > 0 { - var pksize2 int - for _, num := range x.Scopes { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num1 := range x.Scopes { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x1a - } - if len(x.OriginUri) > 0 { - i -= len(x.OriginUri) - copy(dAtA[i:], x.OriginUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - 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++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Scopes = append(x.Scopes, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -11984,26 +5583,24 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { } var ( - md_MsgRegisterServiceResponse protoreflect.MessageDescriptor - fd_MsgRegisterServiceResponse_success protoreflect.FieldDescriptor + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) 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") + md_MsgUpdateParamsResponse = File_did_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } -var _ protoreflect.Message = (*fastReflection_MsgRegisterServiceResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) -type fastReflection_MsgRegisterServiceResponse MsgRegisterServiceResponse +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse -func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterServiceResponse)(x) +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) } -func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[11] +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12014,43 +5611,43 @@ func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgRegisterServiceResponse_messageType fastReflection_MsgRegisterServiceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterServiceResponse_messageType{} +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} -type fastReflection_MsgRegisterServiceResponse_messageType struct{} +type fastReflection_MsgUpdateParamsResponse_messageType struct{} -func (x fastReflection_MsgRegisterServiceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterServiceResponse)(nil) +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) } -func (x fastReflection_MsgRegisterServiceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterServiceResponse) +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) } -func (x fastReflection_MsgRegisterServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterServiceResponse +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRegisterServiceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterServiceResponse +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterServiceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterServiceResponse_messageType +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterServiceResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterServiceResponse) +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterServiceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterServiceResponse)(x) +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -12058,13 +5655,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgRegisterServiceResponse_success, value) { - return - } - } +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -12078,15 +5669,13 @@ func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.Fi // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - return x.Success != false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -12096,15 +5685,13 @@ func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - x.Success = false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -12114,16 +5701,13 @@ func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldD // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -12137,15 +5721,13 @@ func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - x.Success = value.Bool() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -12159,40 +5741,36 @@ func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgRegisterServiceResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterServiceResponse.success": - return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterServiceResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } @@ -12200,7 +5778,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.On // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterServiceResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -12211,7 +5789,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -12223,7 +5801,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) SetUnknown(fields protorefle // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterServiceResponse) IsValid() bool { +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } @@ -12233,9 +5811,9 @@ func (x *fastReflection_MsgRegisterServiceResponse) 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_MsgRegisterServiceResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterServiceResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -12247,9 +5825,6 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M var n int var l int _ = l - if x.Success { - n += 2 - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -12260,7 +5835,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterServiceResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -12279,16 +5854,6 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -12300,7 +5865,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterServiceResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -12332,32 +5897,12 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -12406,6 +5951,442 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// 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 service account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,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"` + // origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` +} + +func (x *MsgAllocateVault) Reset() { + *x = MsgAllocateVault{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAllocateVault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAllocateVault) ProtoMessage() {} + +// Deprecated: Use MsgAllocateVault.ProtoReflect.Descriptor instead. +func (*MsgAllocateVault) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgAllocateVault) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgAllocateVault) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *MsgAllocateVault) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +// 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"` + // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + // IsLocalhost is a flag to indicate if the vault is localhost + Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` +} + +func (x *MsgAllocateVaultResponse) Reset() { + *x = MsgAllocateVaultResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAllocateVaultResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAllocateVaultResponse) ProtoMessage() {} + +// Deprecated: Use MsgAllocateVaultResponse.ProtoReflect.Descriptor instead. +func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{1} +} + +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 +} + +func (x *MsgAllocateVaultResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *MsgAllocateVaultResponse) GetLocalhost() bool { + if x != nil { + return x.Localhost + } + return false +} + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (x *MsgRegisterController) Reset() { + *x = MsgRegisterController{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterController) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterController) ProtoMessage() {} + +// Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. +func (*MsgRegisterController) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgRegisterController) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRegisterController) GetAssertions() [][]byte { + if x != nil { + return x.Assertions + } + return nil +} + +func (x *MsgRegisterController) GetKeyshares() [][]byte { + if x != nil { + return x.Keyshares + } + return nil +} + +func (x *MsgRegisterController) GetVerifications() [][]byte { + if x != nil { + return x.Verifications + } + return nil +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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,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,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() { + *x = MsgRegisterControllerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterControllerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterControllerResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgRegisterControllerResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgRegisterControllerResponse) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if x != nil { + return x.Accounts + } + return nil +} + +// MsgAuthorizeService is the message type for the AuthorizeService RPC. +type MsgAuthorizeService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Permissions is the scope of the service. + Permissions map[string]string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // token is the macron token to authenticate the operation. + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *MsgAuthorizeService) Reset() { + *x = MsgAuthorizeService{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthorizeService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthorizeService) ProtoMessage() {} + +// Deprecated: Use MsgAuthorizeService.ProtoReflect.Descriptor instead. +func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgAuthorizeService) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgAuthorizeService) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *MsgAuthorizeService) GetPermissions() map[string]string { + if x != nil { + return x.Permissions + } + return nil +} + +func (x *MsgAuthorizeService) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. +type MsgAuthorizeServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *MsgAuthorizeServiceResponse) Reset() { + *x = MsgAuthorizeServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthorizeServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthorizeServiceResponse) ProtoMessage() {} + +// Deprecated: Use MsgAuthorizeServiceResponse.ProtoReflect.Descriptor instead. +func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgAuthorizeServiceResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgAuthorizeServiceResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. + Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` +} + +func (x *MsgRegisterService) Reset() { + *x = MsgRegisterService{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterService) ProtoMessage() {} + +// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. +func (*MsgRegisterService) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRegisterService) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgRegisterService) GetService() *Service { + if x != nil { + return x.Service + } + 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"` + 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[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterServiceResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgRegisterServiceResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgRegisterServiceResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 @@ -12425,7 +6406,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[0] + mi := &file_did_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12439,7 +6420,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{0} + return file_did_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgUpdateParams) GetAuthority() string { @@ -12476,7 +6457,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[1] + mi := &file_did_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12490,836 +6471,9 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{1} -} - -// 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 service account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,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"` - // origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (x *MsgAllocateVault) Reset() { - *x = MsgAllocateVault{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAllocateVault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAllocateVault) ProtoMessage() {} - -// Deprecated: Use MsgAllocateVault.ProtoReflect.Descriptor instead. -func (*MsgAllocateVault) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgAllocateVault) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgAllocateVault) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *MsgAllocateVault) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -// 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"` - // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn - RegistrationOptions string `protobuf:"bytes,3,opt,name=registration_options,json=registrationOptions,proto3" json:"registration_options,omitempty"` - // IsLocalhost is a flag to indicate if the vault is localhost - Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` -} - -func (x *MsgAllocateVaultResponse) Reset() { - *x = MsgAllocateVaultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAllocateVaultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAllocateVaultResponse) ProtoMessage() {} - -// 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 -} - -func (x *MsgAllocateVaultResponse) GetRegistrationOptions() string { - if x != nil { - return x.RegistrationOptions - } - return "" -} - -func (x *MsgAllocateVaultResponse) GetLocalhost() bool { - if x != nil { - return x.Localhost - } - return false -} - -// MsgProveWitness is the message type for the ProveWitness RPC. -type MsgProveWitness struct { -// MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // property is key to prove. - Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` - // Witness Value is the bytes of the witness. - Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MsgAuthenticate) Reset() { - *x = MsgAuthenticate{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAuthenticate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAuthenticate) ProtoMessage() {} - -// Deprecated: Use MsgAuthenticate.ProtoReflect.Descriptor instead. -func (*MsgAuthenticate) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgAuthenticate) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgAuthenticate) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgAuthenticate) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *MsgAuthenticate) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -type MsgAuthenticateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgAuthenticateResponse) Reset() { - *x = MsgAuthenticateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAuthenticateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAuthenticateResponse) ProtoMessage() {} - -// Deprecated: Use MsgAuthenticateResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgProveWitness is the message type for the ProveWitness RPC. -type MsgProveWitness struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // property is key to prove. - Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` - // Witness Value is the bytes of the witness. - Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` -} - -func (x *MsgProveWitness) Reset() { - *x = MsgProveWitness{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgProveWitness) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgProveWitness) ProtoMessage() {} - -// Deprecated: Use MsgProveWitness.ProtoReflect.Descriptor instead. -func (*MsgProveWitness) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgProveWitness) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgProveWitness) GetProperty() string { - if x != nil { - return x.Property - } - return "" -} - -func (x *MsgProveWitness) GetWitness() []byte { - if x != nil { - return x.Witness - } - return nil -} - -func (x *MsgProveWitness) GetToken() string { - if x != nil { - return x.Token - } - return nil -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -type MsgProveWitnessResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` -} - -func (x *MsgProveWitnessResponse) Reset() { - *x = MsgProveWitnessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgProveWitnessResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgProveWitnessResponse) ProtoMessage() {} - -// Deprecated: Use MsgProveWitnessResponse.ProtoReflect.Descriptor instead. -func (*MsgProveWitnessResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgProveWitnessResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *MsgProveWitnessResponse) GetProperty() string { - if x != nil { - return x.Property - } - return "" -} - -// MsgSyncController is the message type for the SyncController RPC. -type MsgSyncController struct { -// MsgSyncVault is the message type for the SyncVault RPC. -type MsgSyncVault struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // controller is the address of the controller to sync. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Token is the public token to authenticate the operation. - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MsgSyncController) Reset() { - *x = MsgSyncController{} - // cid is the IPFS content identifier. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Macroon is the public token to authenticate the operation. - Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` -} - -func (x *MsgSyncVault) Reset() { - *x = MsgSyncVault{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSyncController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncController) ProtoMessage() {} - -// Deprecated: Use MsgSyncController.ProtoReflect.Descriptor instead. -func (*MsgSyncController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgSyncController) GetController() string { -func (x *MsgSyncVault) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncVault) ProtoMessage() {} - -// Deprecated: Use MsgSyncVault.ProtoReflect.Descriptor instead. -func (*MsgSyncVault) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgSyncVault) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgSyncController) GetToken() string { - if x != nil { - return x.Token -func (x *MsgSyncVault) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -// MsgSyncControllerResponse is the response type for the SyncController RPC. -type MsgSyncControllerResponse struct { -func (x *MsgSyncVault) GetMacron() []byte { - if x != nil { - return x.Macron - } - return nil -} - -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -type MsgSyncVaultResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *MsgSyncControllerResponse) Reset() { - *x = MsgSyncControllerResponse{} -func (x *MsgSyncVaultResponse) Reset() { - *x = MsgSyncVaultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSyncControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgSyncControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgSyncControllerResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{7} -} - -func (x *MsgSyncControllerResponse) GetSuccess() bool { -func (x *MsgSyncVaultResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncVaultResponse) ProtoMessage() {} - -// Deprecated: Use MsgSyncVaultResponse.ProtoReflect.Descriptor instead. -func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{7} -} - -func (x *MsgSyncVaultResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -// MsgRegisterController is the message type for the InitializeController RPC. -type MsgRegisterController struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,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. - CredentialCreationResponse string `protobuf:"bytes,4,opt,name=credential_creation_response,json=credentialCreationResponse,proto3" json:"credential_creation_response,omitempty"` - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (x *MsgRegisterController) Reset() { - *x = MsgRegisterController{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterController) ProtoMessage() {} - -// Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. -func (*MsgRegisterController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgRegisterController) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgRegisterController) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -func (x *MsgRegisterController) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *MsgRegisterController) GetCredentialCreationResponse() string { - if x != nil { - return x.CredentialCreationResponse - } - return "" -func (x *MsgRegisterController) GetAssertions() [][]byte { - if x != nil { - return x.Assertions - } - return nil -} - -func (x *MsgRegisterController) GetKeyshares() [][]byte { - if x != nil { - return x.Keyshares - } - return nil -} - -func (x *MsgRegisterController) GetVerifications() [][]byte { - if x != nil { - return x.Verifications - } - return nil -} - -// MsgRegisterControllerResponse is the response type for the InitializeController RPC. -type MsgRegisterControllerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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,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,3,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Accounts are a Address Map and Supported coin Denoms for the controller - Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *MsgRegisterControllerResponse) Reset() { - *x = MsgRegisterControllerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{9} } -func (x *MsgRegisterControllerResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *MsgRegisterControllerResponse) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { - if x != nil { - return x.Accounts - } - return nil -} - -// MsgAuthorizeService is the message type for the AuthorizeService RPC. -type MsgAuthorizeService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Controller is the address of the controller to authenticate. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Permissions is the scope of the service. - Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MsgAuthorizeService) Reset() { - *x = MsgAuthorizeService{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAuthorizeService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAuthorizeService) ProtoMessage() {} - -// Deprecated: Use MsgAuthorizeService.ProtoReflect.Descriptor instead. -func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgAuthorizeService) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgAuthorizeService) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *MsgAuthorizeService) GetScopes() *Permissions { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *MsgAuthorizeService) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. -type MsgAuthorizeServiceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MsgAuthorizeServiceResponse) Reset() { - *x = MsgAuthorizeServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAuthorizeServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAuthorizeServiceResponse) ProtoMessage() {} - -// Deprecated: Use MsgAuthorizeServiceResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{11} -} - -func (x *MsgAuthorizeServiceResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *MsgAuthorizeServiceResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -// MsgRegisterService is the message type for the RegisterService RPC. -type MsgRegisterService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. - Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // origin is the origin of the request in wildcard form. - OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // PermissionScope is the scope of the service. - Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` -} - -func (x *MsgRegisterService) Reset() { - *x = MsgRegisterService{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[12] - mi := &file_did_v1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterService) ProtoMessage() {} - -// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. -func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{12} -} - -func (x *MsgRegisterService) GetController() string { - if x != nil { - return x.Controller - return file_did_v1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgRegisterService) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgRegisterService) GetService() *Service { - if x != nil { - return x.Service -func (x *MsgRegisterService) GetOriginUri() string { - if x != nil { - return x.OriginUri - } - return "" -} - -func (x *MsgRegisterService) GetScopes() []PermissionScope { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *MsgRegisterService) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -// 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"` - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *MsgRegisterServiceResponse) Reset() { - *x = MsgRegisterServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[13] - mi := &file_did_v1_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterServiceResponse) ProtoMessage() {} - -// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{13} - return file_did_v1_tx_proto_rawDescGZIP(), []int{11} -} - -func (x *MsgRegisterServiceResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - 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{ @@ -13329,21 +6483,8 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 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, 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, 0x9d, - 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, - 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73, + 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, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, @@ -13352,281 +6493,127 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xa5, 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, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 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, 0x74, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x19, 0x4d, 0x73, - 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x22, 0xcb, 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, 0x40, 0x0a, - 0x1c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, - 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x22, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xc3, + 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xf8, 0x03, - 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x54, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, + 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x02, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, - 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, - 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, - 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, - 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 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, 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, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x12, 0x4e, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, + 0x9d, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, - 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, - 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, - 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, - 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x15, 0x4d, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, + 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, + 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa8, 0x03, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x10, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x22, 0xe7, 0x01, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, + 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, 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, 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, + 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 ( @@ -13641,88 +6628,43 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte { return file_did_v1_tx_proto_rawDescData } -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_did_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse - (*MsgAllocateVault)(nil), // 2: did.v1.MsgAllocateVault - (*MsgAllocateVaultResponse)(nil), // 3: did.v1.MsgAllocateVaultResponse - (*MsgProveWitness)(nil), // 4: did.v1.MsgProveWitness - (*MsgProveWitnessResponse)(nil), // 5: did.v1.MsgProveWitnessResponse - (*MsgSyncController)(nil), // 6: did.v1.MsgSyncController - (*MsgSyncControllerResponse)(nil), // 7: did.v1.MsgSyncControllerResponse - (*MsgRegisterController)(nil), // 8: did.v1.MsgRegisterController - (*MsgRegisterControllerResponse)(nil), // 9: did.v1.MsgRegisterControllerResponse - (*MsgAuthorizeService)(nil), // 10: did.v1.MsgAuthorizeService - (*MsgAuthorizeServiceResponse)(nil), // 11: did.v1.MsgAuthorizeServiceResponse - (*MsgRegisterService)(nil), // 12: did.v1.MsgRegisterService - (*MsgRegisterServiceResponse)(nil), // 13: did.v1.MsgRegisterServiceResponse - nil, // 14: did.v1.MsgRegisterControllerResponse.AccountsEntry - (*Params)(nil), // 15: did.v1.Params - (*Permissions)(nil), // 16: did.v1.Permissions - (*Service)(nil), // 17: did.v1.Service + (*MsgAllocateVault)(nil), // 0: did.v1.MsgAllocateVault + (*MsgAllocateVaultResponse)(nil), // 1: did.v1.MsgAllocateVaultResponse + (*MsgRegisterController)(nil), // 2: did.v1.MsgRegisterController + (*MsgRegisterControllerResponse)(nil), // 3: did.v1.MsgRegisterControllerResponse + (*MsgAuthorizeService)(nil), // 4: did.v1.MsgAuthorizeService + (*MsgAuthorizeServiceResponse)(nil), // 5: did.v1.MsgAuthorizeServiceResponse + (*MsgRegisterService)(nil), // 6: did.v1.MsgRegisterService + (*MsgRegisterServiceResponse)(nil), // 7: did.v1.MsgRegisterServiceResponse + (*MsgUpdateParams)(nil), // 8: did.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 9: did.v1.MsgUpdateParamsResponse + nil, // 10: did.v1.MsgRegisterControllerResponse.AccountsEntry + nil, // 11: did.v1.MsgAuthorizeService.PermissionsEntry + (*Service)(nil), // 12: did.v1.Service + (*Params)(nil), // 13: did.v1.Params } var file_did_v1_tx_proto_depIdxs = []int32{ - 15, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 14, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry - 16, // 2: did.v1.MsgAuthorizeService.scopes:type_name -> did.v1.Permissions - 17, // 3: did.v1.MsgRegisterService.service:type_name -> did.v1.Service - 0, // 4: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 10, // 5: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService - 2, // 6: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault - 6, // 7: did.v1.Msg.SyncController:input_type -> did.v1.MsgSyncController - 8, // 8: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 12, // 9: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService - 1, // 10: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 11, // 11: did.v1.Msg.AuthorizeService:output_type -> did.v1.MsgAuthorizeServiceResponse - 3, // 12: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse - 7, // 13: did.v1.Msg.SyncController:output_type -> did.v1.MsgSyncControllerResponse - 9, // 14: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 13, // 15: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse - 10, // [10:16] is the sub-list for method output_type - 4, // [4:10] is the sub-list for method input_type + 10, // 0: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 11, // 1: did.v1.MsgAuthorizeService.permissions:type_name -> did.v1.MsgAuthorizeService.PermissionsEntry + 12, // 2: did.v1.MsgRegisterService.service:type_name -> did.v1.Service + 13, // 3: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 8, // 4: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 4, // 5: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService + 0, // 6: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault + 2, // 7: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 6, // 8: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 9, // 9: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 5, // 10: did.v1.Msg.AuthorizeService:output_type -> did.v1.MsgAuthorizeServiceResponse + 1, // 11: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse + 3, // 12: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 7, // 13: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_did_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse - (*MsgAuthenticate)(nil), // 2: did.v1.MsgAuthenticate - (*MsgAuthenticateResponse)(nil), // 3: did.v1.MsgAuthenticateResponse - (*MsgProveWitness)(nil), // 4: did.v1.MsgProveWitness - (*MsgProveWitnessResponse)(nil), // 5: did.v1.MsgProveWitnessResponse - (*MsgSyncVault)(nil), // 6: did.v1.MsgSyncVault - (*MsgSyncVaultResponse)(nil), // 7: did.v1.MsgSyncVaultResponse - (*MsgRegisterController)(nil), // 8: did.v1.MsgRegisterController - (*MsgRegisterControllerResponse)(nil), // 9: did.v1.MsgRegisterControllerResponse - (*MsgRegisterService)(nil), // 10: did.v1.MsgRegisterService - (*MsgRegisterServiceResponse)(nil), // 11: did.v1.MsgRegisterServiceResponse - nil, // 12: did.v1.MsgRegisterControllerResponse.AccountsEntry - (*Params)(nil), // 13: did.v1.Params - (PermissionScope)(0), // 14: did.v1.PermissionScope -} -var file_did_v1_tx_proto_depIdxs = []int32{ - 13, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 12, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry - 14, // 2: did.v1.MsgRegisterService.scopes:type_name -> did.v1.PermissionScope - 0, // 3: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 2, // 4: did.v1.Msg.Authenticate:input_type -> did.v1.MsgAuthenticate - 4, // 5: did.v1.Msg.ProveWitness:input_type -> did.v1.MsgProveWitness - 6, // 6: did.v1.Msg.SyncVault:input_type -> did.v1.MsgSyncVault - 8, // 7: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 10, // 8: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService - 1, // 9: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 3, // 10: did.v1.Msg.Authenticate:output_type -> did.v1.MsgAuthenticateResponse - 5, // 11: did.v1.Msg.ProveWitness:output_type -> did.v1.MsgProveWitnessResponse - 7, // 12: did.v1.Msg.SyncVault:output_type -> did.v1.MsgSyncVaultResponse - 9, // 13: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 11, // 14: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse - 9, // [9:15] is the sub-list for method output_type - 3, // [3:9] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -13730,12 +6672,10 @@ func file_did_v1_tx_proto_init() { if File_did_v1_tx_proto != nil { return } - file_did_v1_enums_proto_init() file_did_v1_genesis_proto_init() - 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 { + switch v := v.(*MsgAllocateVault); i { case 0: return &v.state case 1: @@ -13747,7 +6687,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { + switch v := v.(*MsgAllocateVaultResponse); i { case 0: return &v.state case 1: @@ -13759,82 +6699,6 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAllocateVault); i { - switch v := v.(*MsgAuthenticate); 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[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAllocateVaultResponse); i { - switch v := v.(*MsgAuthenticateResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgProveWitness); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgProveWitnessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncController); i { - switch v := v.(*MsgSyncVault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncControllerResponse); i { - switch v := v.(*MsgSyncVaultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterController); i { case 0: return &v.state @@ -13846,7 +6710,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterControllerResponse); i { case 0: return &v.state @@ -13858,7 +6722,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAuthorizeService); i { case 0: return &v.state @@ -13870,7 +6734,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAuthorizeServiceResponse); i { case 0: return &v.state @@ -13882,7 +6746,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterService); i { case 0: return &v.state @@ -13894,8 +6758,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterServiceResponse); i { case 0: return &v.state @@ -13907,6 +6770,30 @@ func file_did_v1_tx_proto_init() { return nil } } + file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -13914,8 +6801,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 15, - NumMessages: 13, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index bde78d883..8ce8e0729 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -22,10 +22,6 @@ const ( Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService" Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault" - Msg_SyncController_FullMethodName = "/did.v1.Msg/SyncController" - Msg_Authenticate_FullMethodName = "/did.v1.Msg/Authenticate" - Msg_ProveWitness_FullMethodName = "/did.v1.Msg/ProveWitness" - Msg_SyncVault_FullMethodName = "/did.v1.Msg/SyncVault" Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" ) @@ -43,14 +39,6 @@ type MsgClient interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -77,9 +65,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) { out := new(MsgAuthorizeServiceResponse) err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...) -func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { - out := new(MsgAuthenticateResponse) - err := c.cc.Invoke(ctx, Msg_Authenticate_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -89,21 +74,6 @@ func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, 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...) -func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { - out := new(MsgProveWitnessResponse) - err := c.cc.Invoke(ctx, Msg_ProveWitness_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) { - out := new(MsgSyncControllerResponse) - err := c.cc.Invoke(ctx, Msg_SyncController_FullMethodName, in, out, opts...) -func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { - out := new(MsgSyncVaultResponse) - err := c.cc.Invoke(ctx, Msg_SyncVault_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -141,14 +111,6 @@ type MsgServer interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -169,17 +131,6 @@ func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgAuthorizeSer func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } -func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented") -func (UnimplementedMsgServer) Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") -} -func (UnimplementedMsgServer) ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") -} -func (UnimplementedMsgServer) SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") -} func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } @@ -219,8 +170,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAuthorizeService) -func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticate) if err := dec(in); err != nil { return nil, err } @@ -233,22 +182,12 @@ func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(in } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService)) - return srv.(MsgServer).Authenticate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_Authenticate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) } return interceptor(ctx, in, info, handler) } func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAllocateVault) -func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgProveWitness) if err := dec(in); err != nil { return nil, err } @@ -261,42 +200,6 @@ func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(in } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) - return srv.(MsgServer).ProveWitness(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ProveWitness_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncController) -func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncVault) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SyncController(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SyncController_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController)) - return srv.(MsgServer).SyncVault(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SyncVault_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault)) } return interceptor(ctx, in, info, handler) } @@ -356,20 +259,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AllocateVault", Handler: _Msg_AllocateVault_Handler, }, - { - MethodName: "SyncController", - Handler: _Msg_SyncController_Handler, - MethodName: "Authenticate", - Handler: _Msg_Authenticate_Handler, - }, - { - MethodName: "ProveWitness", - Handler: _Msg_ProveWitness_Handler, - }, - { - MethodName: "SyncVault", - Handler: _Msg_SyncVault_Handler, - }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, diff --git a/api/did/v1/types.pulsar.go b/api/did/v1/types.pulsar.go deleted file mode 100644 index ba114c7ab..000000000 --- a/api/did/v1/types.pulsar.go +++ /dev/null @@ -1,9390 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - _ "cosmossdk.io/api/cosmos/msg/v1" - binary "encoding/binary" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "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" - io "io" - math "math" - reflect "reflect" - sort "sort" - sync "sync" -) - -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 -) - -func init() { - file_did_v1_types_proto_init() - md_AssetInfo = File_did_v1_types_proto.Messages().ByName("AssetInfo") - fd_AssetInfo_id = md_AssetInfo.Fields().ByName("id") - fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") - fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") - fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") - fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") - fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") - fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") - fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") - fd_AssetInfo_image_url = md_AssetInfo.Fields().ByName("image_url") - fd_AssetInfo_coingecko_id = md_AssetInfo.Fields().ByName("coingecko_id") - fd_AssetInfo_is_enabled = md_AssetInfo.Fields().ByName("is_enabled") - fd_AssetInfo_ibc_path = md_AssetInfo.Fields().ByName("ibc_path") - fd_AssetInfo_ibc_channel = md_AssetInfo.Fields().ByName("ibc_channel") - fd_AssetInfo_ibc_port = md_AssetInfo.Fields().ByName("ibc_port") -} - -var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) - -type fastReflection_AssetInfo AssetInfo - -func (x *AssetInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AssetInfo)(x) -} - -func (x *AssetInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AssetInfo_messageType fastReflection_AssetInfo_messageType -var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} - -type fastReflection_AssetInfo_messageType struct{} - -func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AssetInfo)(nil) -} -func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AssetInfo) -} -func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_AssetInfo) Type() protoreflect.MessageType { - return _fastReflection_AssetInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AssetInfo) New() protoreflect.Message { - return new(fastReflection_AssetInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { - return (*AssetInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_AssetInfo_id, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_AssetInfo_denom, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_AssetInfo_symbol, value) { - return - } - } - if x.AssetType != "" { - value := protoreflect.ValueOfString(x.AssetType) - if !f(fd_AssetInfo_asset_type, value) { - return - } - } - if x.OriginChain != "" { - value := protoreflect.ValueOfString(x.OriginChain) - if !f(fd_AssetInfo_origin_chain, value) { - return - } - } - if x.OriginDenom != "" { - value := protoreflect.ValueOfString(x.OriginDenom) - if !f(fd_AssetInfo_origin_denom, value) { - return - } - } - if x.Decimals != int32(0) { - value := protoreflect.ValueOfInt32(x.Decimals) - if !f(fd_AssetInfo_decimals, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_AssetInfo_description, value) { - return - } - } - if x.ImageUrl != "" { - value := protoreflect.ValueOfString(x.ImageUrl) - if !f(fd_AssetInfo_image_url, value) { - return - } - } - if x.CoingeckoId != "" { - value := protoreflect.ValueOfString(x.CoingeckoId) - if !f(fd_AssetInfo_coingecko_id, value) { - return - } - } - if x.IsEnabled != false { - value := protoreflect.ValueOfBool(x.IsEnabled) - if !f(fd_AssetInfo_is_enabled, value) { - return - } - } - if x.IbcPath != "" { - value := protoreflect.ValueOfString(x.IbcPath) - if !f(fd_AssetInfo_ibc_path, value) { - return - } - } - if x.IbcChannel != "" { - value := protoreflect.ValueOfString(x.IbcChannel) - if !f(fd_AssetInfo_ibc_channel, value) { - return - } - } - if x.IbcPort != "" { - value := protoreflect.ValueOfString(x.IbcPort) - if !f(fd_AssetInfo_ibc_port, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.AssetInfo.id": - return x.Id != "" - case "did.v1.AssetInfo.denom": - return x.Denom != "" - case "did.v1.AssetInfo.symbol": - return x.Symbol != "" - case "did.v1.AssetInfo.asset_type": - return x.AssetType != "" - case "did.v1.AssetInfo.origin_chain": - return x.OriginChain != "" - case "did.v1.AssetInfo.origin_denom": - return x.OriginDenom != "" - case "did.v1.AssetInfo.decimals": - return x.Decimals != int32(0) - case "did.v1.AssetInfo.description": - return x.Description != "" - case "did.v1.AssetInfo.image_url": - return x.ImageUrl != "" - case "did.v1.AssetInfo.coingecko_id": - return x.CoingeckoId != "" - case "did.v1.AssetInfo.is_enabled": - return x.IsEnabled != false - case "did.v1.AssetInfo.ibc_path": - return x.IbcPath != "" - case "did.v1.AssetInfo.ibc_channel": - return x.IbcChannel != "" - case "did.v1.AssetInfo.ibc_port": - return x.IbcPort != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.AssetInfo.id": - x.Id = "" - case "did.v1.AssetInfo.denom": - x.Denom = "" - case "did.v1.AssetInfo.symbol": - x.Symbol = "" - case "did.v1.AssetInfo.asset_type": - x.AssetType = "" - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = "" - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = "" - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(0) - case "did.v1.AssetInfo.description": - x.Description = "" - case "did.v1.AssetInfo.image_url": - x.ImageUrl = "" - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = "" - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = false - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = "" - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = "" - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.AssetInfo.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.asset_type": - value := x.AssetType - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_chain": - value := x.OriginChain - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_denom": - value := x.OriginDenom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.decimals": - value := x.Decimals - return protoreflect.ValueOfInt32(value) - case "did.v1.AssetInfo.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.image_url": - value := x.ImageUrl - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.coingecko_id": - value := x.CoingeckoId - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.is_enabled": - value := x.IsEnabled - return protoreflect.ValueOfBool(value) - case "did.v1.AssetInfo.ibc_path": - value := x.IbcPath - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_channel": - value := x.IbcChannel - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_port": - value := x.IbcPort - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.AssetInfo.id": - x.Id = value.Interface().(string) - case "did.v1.AssetInfo.denom": - x.Denom = value.Interface().(string) - case "did.v1.AssetInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.AssetInfo.asset_type": - x.AssetType = value.Interface().(string) - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = value.Interface().(string) - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = value.Interface().(string) - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(value.Int()) - case "did.v1.AssetInfo.description": - x.Description = value.Interface().(string) - case "did.v1.AssetInfo.image_url": - x.ImageUrl = value.Interface().(string) - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = value.Interface().(string) - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = value.Bool() - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = value.Interface().(string) - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = value.Interface().(string) - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.AssetInfo.id": - panic(fmt.Errorf("field id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.denom": - panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.asset_type": - panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_chain": - panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_denom": - panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.decimals": - panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.description": - panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.image_url": - panic(fmt.Errorf("field image_url of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.coingecko_id": - panic(fmt.Errorf("field coingecko_id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.is_enabled": - panic(fmt.Errorf("field is_enabled of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_path": - panic(fmt.Errorf("field ibc_path of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_channel": - panic(fmt.Errorf("field ibc_channel of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_port": - panic(fmt.Errorf("field ibc_port of message did.v1.AssetInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.AssetInfo.id": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.asset_type": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_chain": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.decimals": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.AssetInfo.description": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.image_url": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.coingecko_id": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.is_enabled": - return protoreflect.ValueOfBool(false) - case "did.v1.AssetInfo.ibc_path": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_channel": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_port": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_AssetInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_AssetInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AssetType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginChain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Decimals != 0 { - n += 1 + runtime.Sov(uint64(x.Decimals)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ImageUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CoingeckoId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsEnabled { - n += 2 - } - l = len(x.IbcPath) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcChannel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcPort) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.IbcPort) > 0 { - i -= len(x.IbcPort) - copy(dAtA[i:], x.IbcPort) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPort))) - i-- - dAtA[i] = 0x72 - } - if len(x.IbcChannel) > 0 { - i -= len(x.IbcChannel) - copy(dAtA[i:], x.IbcChannel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(x.IbcPath) > 0 { - i -= len(x.IbcPath) - copy(dAtA[i:], x.IbcPath) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if x.IsEnabled { - i-- - if x.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(x.CoingeckoId) > 0 { - i -= len(x.CoingeckoId) - copy(dAtA[i:], x.CoingeckoId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(x.ImageUrl) > 0 { - i -= len(x.ImageUrl) - copy(dAtA[i:], x.ImageUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x42 - } - if x.Decimals != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(x.OriginDenom) > 0 { - i -= len(x.OriginDenom) - copy(dAtA[i:], x.OriginDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) - i-- - dAtA[i] = 0x32 - } - if len(x.OriginChain) > 0 { - i -= len(x.OriginChain) - copy(dAtA[i:], x.OriginChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) - i-- - dAtA[i] = 0x2a - } - if len(x.AssetType) > 0 { - i -= len(x.AssetType) - copy(dAtA[i:], x.AssetType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) - i-- - dAtA[i] = 0x22 - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - x.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcPort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ChainInfo_7_list)(nil) - -type _ChainInfo_7_list struct { - list *[]*Endpoint -} - -func (x *_ChainInfo_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { - v := new(Endpoint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { - v := new(Endpoint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_8_list)(nil) - -type _ChainInfo_8_list struct { - list *[]*Endpoint -} - -func (x *_ChainInfo_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Endpoint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { - v := new(Endpoint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { - v := new(Endpoint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ChainInfo protoreflect.MessageDescriptor - fd_ChainInfo_id protoreflect.FieldDescriptor - fd_ChainInfo_chain_id protoreflect.FieldDescriptor - fd_ChainInfo_name protoreflect.FieldDescriptor - fd_ChainInfo_symbol protoreflect.FieldDescriptor - fd_ChainInfo_bech32_prefix protoreflect.FieldDescriptor - fd_ChainInfo_genesis_time protoreflect.FieldDescriptor - fd_ChainInfo_grpc_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_rest_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_explorer protoreflect.FieldDescriptor - fd_ChainInfo_fee_info protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_ChainInfo = File_did_v1_types_proto.Messages().ByName("ChainInfo") - fd_ChainInfo_id = md_ChainInfo.Fields().ByName("id") - fd_ChainInfo_chain_id = md_ChainInfo.Fields().ByName("chain_id") - fd_ChainInfo_name = md_ChainInfo.Fields().ByName("name") - fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") - fd_ChainInfo_bech32_prefix = md_ChainInfo.Fields().ByName("bech32_prefix") - fd_ChainInfo_genesis_time = md_ChainInfo.Fields().ByName("genesis_time") - fd_ChainInfo_grpc_endpoints = md_ChainInfo.Fields().ByName("grpc_endpoints") - fd_ChainInfo_rest_endpoints = md_ChainInfo.Fields().ByName("rest_endpoints") - fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") - fd_ChainInfo_fee_info = md_ChainInfo.Fields().ByName("fee_info") -} - -var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) - -type fastReflection_ChainInfo ChainInfo - -func (x *ChainInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo)(x) -} - -func (x *ChainInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ChainInfo_messageType fastReflection_ChainInfo_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} - -type fastReflection_ChainInfo_messageType struct{} - -func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo)(nil) -} -func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} -func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ChainInfo) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { - return (*ChainInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_ChainInfo_id, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_ChainInfo_chain_id, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ChainInfo_name, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_ChainInfo_symbol, value) { - return - } - } - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_ChainInfo_bech32_prefix, value) { - return - } - } - if x.GenesisTime != "" { - value := protoreflect.ValueOfString(x.GenesisTime) - if !f(fd_ChainInfo_genesis_time, value) { - return - } - } - if len(x.GrpcEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.GrpcEndpoints}) - if !f(fd_ChainInfo_grpc_endpoints, value) { - return - } - } - if len(x.RestEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.RestEndpoints}) - if !f(fd_ChainInfo_rest_endpoints, value) { - return - } - } - if x.Explorer != nil { - value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - if !f(fd_ChainInfo_explorer, value) { - return - } - } - if x.FeeInfo != nil { - value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - if !f(fd_ChainInfo_fee_info, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - return x.Id != "" - case "did.v1.ChainInfo.chain_id": - return x.ChainId != "" - case "did.v1.ChainInfo.name": - return x.Name != "" - case "did.v1.ChainInfo.symbol": - return x.Symbol != "" - case "did.v1.ChainInfo.bech32_prefix": - return x.Bech32Prefix != "" - case "did.v1.ChainInfo.genesis_time": - return x.GenesisTime != "" - case "did.v1.ChainInfo.grpc_endpoints": - return len(x.GrpcEndpoints) != 0 - case "did.v1.ChainInfo.rest_endpoints": - return len(x.RestEndpoints) != 0 - case "did.v1.ChainInfo.explorer": - return x.Explorer != nil - case "did.v1.ChainInfo.fee_info": - return x.FeeInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - x.Id = "" - case "did.v1.ChainInfo.chain_id": - x.ChainId = "" - case "did.v1.ChainInfo.name": - x.Name = "" - case "did.v1.ChainInfo.symbol": - x.Symbol = "" - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = "" - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = "" - case "did.v1.ChainInfo.grpc_endpoints": - x.GrpcEndpoints = nil - case "did.v1.ChainInfo.rest_endpoints": - x.RestEndpoints = nil - case "did.v1.ChainInfo.explorer": - x.Explorer = nil - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ChainInfo.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.bech32_prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.genesis_time": - value := x.GenesisTime - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.grpc_endpoints": - if len(x.GrpcEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_7_list{}) - } - listValue := &_ChainInfo_7_list{list: &x.GrpcEndpoints} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.rest_endpoints": - if len(x.RestEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_8_list{}) - } - listValue := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.explorer": - value := x.Explorer - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - value := x.FeeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - x.Id = value.Interface().(string) - case "did.v1.ChainInfo.chain_id": - x.ChainId = value.Interface().(string) - case "did.v1.ChainInfo.name": - x.Name = value.Interface().(string) - case "did.v1.ChainInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = value.Interface().(string) - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = value.Interface().(string) - case "did.v1.ChainInfo.grpc_endpoints": - lv := value.List() - clv := lv.(*_ChainInfo_7_list) - x.GrpcEndpoints = *clv.list - case "did.v1.ChainInfo.rest_endpoints": - lv := value.List() - clv := lv.(*_ChainInfo_8_list) - x.RestEndpoints = *clv.list - case "did.v1.ChainInfo.explorer": - x.Explorer = value.Message().Interface().(*ExplorerInfo) - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = value.Message().Interface().(*FeeInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.grpc_endpoints": - if x.GrpcEndpoints == nil { - x.GrpcEndpoints = []*Endpoint{} - } - value := &_ChainInfo_7_list{list: &x.GrpcEndpoints} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.rest_endpoints": - if x.RestEndpoints == nil { - x.RestEndpoints = []*Endpoint{} - } - value := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.explorer": - if x.Explorer == nil { - x.Explorer = new(ExplorerInfo) - } - return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - if x.FeeInfo == nil { - x.FeeInfo = new(FeeInfo) - } - return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - case "did.v1.ChainInfo.id": - panic(fmt.Errorf("field id of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.chain_id": - panic(fmt.Errorf("field chain_id of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.name": - panic(fmt.Errorf("field name of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.bech32_prefix": - panic(fmt.Errorf("field bech32_prefix of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.genesis_time": - panic(fmt.Errorf("field genesis_time of message did.v1.ChainInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.id": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.chain_id": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.name": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.bech32_prefix": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.genesis_time": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.grpc_endpoints": - list := []*Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) - case "did.v1.ChainInfo.rest_endpoints": - list := []*Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) - case "did.v1.ChainInfo.explorer": - m := new(ExplorerInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - m := new(FeeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ChainInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ChainInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Bech32Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GenesisTime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.GrpcEndpoints) > 0 { - for _, e := range x.GrpcEndpoints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.RestEndpoints) > 0 { - for _, e := range x.RestEndpoints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Explorer != nil { - l = options.Size(x.Explorer) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.FeeInfo != nil { - l = options.Size(x.FeeInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.FeeInfo != nil { - encoded, err := options.Marshal(x.FeeInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - if x.Explorer != nil { - encoded, err := options.Marshal(x.Explorer) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if len(x.RestEndpoints) > 0 { - for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.GrpcEndpoints) > 0 { - for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.GenesisTime) > 0 { - i -= len(x.GenesisTime) - copy(dAtA[i:], x.GenesisTime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GrpcEndpoints = append(x.GrpcEndpoints, &Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RestEndpoints = append(x.RestEndpoints, &Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Explorer == nil { - x.Explorer = &ExplorerInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.FeeInfo == nil { - x.FeeInfo = &FeeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Credential_4_list)(nil) - -type _Credential_4_list struct { - list *[]string -} - -func (x *_Credential_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Credential_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Credential_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Credential_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Credential_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind")) -} - -func (x *_Credential_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Credential_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Credential_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Credential protoreflect.MessageDescriptor - fd_Credential_id protoreflect.FieldDescriptor - fd_Credential_credential_type protoreflect.FieldDescriptor - fd_Credential_credential_id protoreflect.FieldDescriptor - fd_Credential_transport protoreflect.FieldDescriptor - fd_Credential_attestation_type protoreflect.FieldDescriptor - fd_Credential_display_name protoreflect.FieldDescriptor - fd_Credential_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_Credential = File_did_v1_types_proto.Messages().ByName("Credential") - fd_Credential_id = md_Credential.Fields().ByName("id") - fd_Credential_credential_type = md_Credential.Fields().ByName("credential_type") - fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") - fd_Credential_transport = md_Credential.Fields().ByName("transport") - fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type") - fd_Credential_display_name = md_Credential.Fields().ByName("display_name") - fd_Credential_controller = md_Credential.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_Credential)(nil) - -type fastReflection_Credential Credential - -func (x *Credential) ProtoReflect() protoreflect.Message { - return (*fastReflection_Credential)(x) -} - -func (x *Credential) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Credential_messageType fastReflection_Credential_messageType -var _ protoreflect.MessageType = fastReflection_Credential_messageType{} - -type fastReflection_Credential_messageType struct{} - -func (x fastReflection_Credential_messageType) Zero() protoreflect.Message { - return (*fastReflection_Credential)(nil) -} -func (x fastReflection_Credential_messageType) New() protoreflect.Message { - return new(fastReflection_Credential) -} -func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Credential -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor { - return md_Credential -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Credential) Type() protoreflect.MessageType { - return _fastReflection_Credential_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Credential) New() protoreflect.Message { - return new(fastReflection_Credential) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage { - return (*Credential)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Credential_id, value) { - return - } - } - if x.CredentialType != "" { - value := protoreflect.ValueOfString(x.CredentialType) - if !f(fd_Credential_credential_type, value) { - return - } - } - if len(x.CredentialId) != 0 { - value := protoreflect.ValueOfBytes(x.CredentialId) - if !f(fd_Credential_credential_id, value) { - return - } - } - if len(x.Transport) != 0 { - value := protoreflect.ValueOfList(&_Credential_4_list{list: &x.Transport}) - if !f(fd_Credential_transport, value) { - return - } - } - if x.AttestationType != "" { - value := protoreflect.ValueOfString(x.AttestationType) - if !f(fd_Credential_attestation_type, value) { - return - } - } - if x.DisplayName != "" { - value := protoreflect.ValueOfString(x.DisplayName) - if !f(fd_Credential_display_name, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Credential_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Credential.id": - return x.Id != "" - case "did.v1.Credential.credential_type": - return x.CredentialType != "" - case "did.v1.Credential.credential_id": - return len(x.CredentialId) != 0 - case "did.v1.Credential.transport": - return len(x.Transport) != 0 - case "did.v1.Credential.attestation_type": - return x.AttestationType != "" - case "did.v1.Credential.display_name": - return x.DisplayName != "" - case "did.v1.Credential.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Credential.id": - x.Id = "" - case "did.v1.Credential.credential_type": - x.CredentialType = "" - case "did.v1.Credential.credential_id": - x.CredentialId = nil - case "did.v1.Credential.transport": - x.Transport = nil - case "did.v1.Credential.attestation_type": - x.AttestationType = "" - case "did.v1.Credential.display_name": - x.DisplayName = "" - case "did.v1.Credential.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Credential.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Credential.credential_type": - value := x.CredentialType - return protoreflect.ValueOfString(value) - case "did.v1.Credential.credential_id": - value := x.CredentialId - return protoreflect.ValueOfBytes(value) - case "did.v1.Credential.transport": - if len(x.Transport) == 0 { - return protoreflect.ValueOfList(&_Credential_4_list{}) - } - listValue := &_Credential_4_list{list: &x.Transport} - return protoreflect.ValueOfList(listValue) - case "did.v1.Credential.attestation_type": - value := x.AttestationType - return protoreflect.ValueOfString(value) - case "did.v1.Credential.display_name": - value := x.DisplayName - return protoreflect.ValueOfString(value) - case "did.v1.Credential.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Credential.id": - x.Id = value.Interface().(string) - case "did.v1.Credential.credential_type": - x.CredentialType = value.Interface().(string) - case "did.v1.Credential.credential_id": - x.CredentialId = value.Bytes() - case "did.v1.Credential.transport": - lv := value.List() - clv := lv.(*_Credential_4_list) - x.Transport = *clv.list - case "did.v1.Credential.attestation_type": - x.AttestationType = value.Interface().(string) - case "did.v1.Credential.display_name": - x.DisplayName = value.Interface().(string) - case "did.v1.Credential.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Credential.transport": - if x.Transport == nil { - x.Transport = []string{} - } - value := &_Credential_4_list{list: &x.Transport} - return protoreflect.ValueOfList(value) - case "did.v1.Credential.id": - panic(fmt.Errorf("field id of message did.v1.Credential is not mutable")) - case "did.v1.Credential.credential_type": - panic(fmt.Errorf("field credential_type of message did.v1.Credential is not mutable")) - case "did.v1.Credential.credential_id": - panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) - case "did.v1.Credential.attestation_type": - panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable")) - case "did.v1.Credential.display_name": - panic(fmt.Errorf("field display_name of message did.v1.Credential is not mutable")) - case "did.v1.Credential.controller": - panic(fmt.Errorf("field controller of message did.v1.Credential is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Credential.id": - return protoreflect.ValueOfString("") - case "did.v1.Credential.credential_type": - return protoreflect.ValueOfString("") - case "did.v1.Credential.credential_id": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Credential.transport": - list := []string{} - return protoreflect.ValueOfList(&_Credential_4_list{list: &list}) - case "did.v1.Credential.attestation_type": - return protoreflect.ValueOfString("") - case "did.v1.Credential.display_name": - return protoreflect.ValueOfString("") - case "did.v1.Credential.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) - } - panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Credential", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Credential) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CredentialType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CredentialId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Transport) > 0 { - for _, s := range x.Transport { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.AttestationType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DisplayName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x3a - } - if len(x.DisplayName) > 0 { - i -= len(x.DisplayName) - copy(dAtA[i:], x.DisplayName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DisplayName))) - i-- - dAtA[i] = 0x32 - } - if len(x.AttestationType) > 0 { - i -= len(x.AttestationType) - copy(dAtA[i:], x.AttestationType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) - i-- - dAtA[i] = 0x2a - } - if len(x.Transport) > 0 { - for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Transport[iNdEx]) - copy(dAtA[i:], x.Transport[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Transport[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.CredentialId) > 0 { - i -= len(x.CredentialId) - copy(dAtA[i:], x.CredentialId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) - i-- - dAtA[i] = 0x1a - } - if len(x.CredentialType) > 0 { - i -= len(x.CredentialType) - copy(dAtA[i:], x.CredentialType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialType))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Credential) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if x.CredentialId == nil { - x.CredentialId = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Document_2_list)(nil) - -type _Document_2_list struct { - list *[]*VerificationMethod -} - -func (x *_Document_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Document_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_Document_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_2_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Document_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Document_2_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Document_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_4_list)(nil) - -type _Document_4_list struct { - list *[]string -} - -func (x *_Document_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) -} - -func (x *_Document_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_5_list)(nil) - -type _Document_5_list struct { - list *[]string -} - -func (x *_Document_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) -} - -func (x *_Document_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_7_list)(nil) - -type _Document_7_list struct { - list *[]string -} - -func (x *_Document_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) -} - -func (x *_Document_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Document_8_list)(nil) - -type _Document_8_list struct { - list *[]string -} - -func (x *_Document_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Document_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Document_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Document_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Document_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) -} - -func (x *_Document_8_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Document_8_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Document_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Document protoreflect.MessageDescriptor - fd_Document_id protoreflect.FieldDescriptor - fd_Document_verification_methods protoreflect.FieldDescriptor - fd_Document_authentication protoreflect.FieldDescriptor - fd_Document_assertion_method protoreflect.FieldDescriptor - fd_Document_capability_delegation protoreflect.FieldDescriptor - fd_Document_capability_invocation protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_Document = File_did_v1_types_proto.Messages().ByName("Document") - fd_Document_id = md_Document.Fields().ByName("id") - fd_Document_verification_methods = md_Document.Fields().ByName("verification_methods") - fd_Document_authentication = md_Document.Fields().ByName("authentication") - fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") - fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") - fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation") -} - -var _ protoreflect.Message = (*fastReflection_Document)(nil) - -type fastReflection_Document Document - -func (x *Document) ProtoReflect() protoreflect.Message { - return (*fastReflection_Document)(x) -} - -func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Document_messageType fastReflection_Document_messageType -var _ protoreflect.MessageType = fastReflection_Document_messageType{} - -type fastReflection_Document_messageType struct{} - -func (x fastReflection_Document_messageType) Zero() protoreflect.Message { - return (*fastReflection_Document)(nil) -} -func (x fastReflection_Document_messageType) New() protoreflect.Message { - return new(fastReflection_Document) -} -func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { - return md_Document -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Document) Type() protoreflect.MessageType { - return _fastReflection_Document_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Document) New() protoreflect.Message { - return new(fastReflection_Document) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { - return (*Document)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Document_id, value) { - return - } - } - if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_Document_2_list{list: &x.VerificationMethods}) - if !f(fd_Document_verification_methods, value) { - return - } - } - if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_Document_4_list{list: &x.Authentication}) - if !f(fd_Document_authentication, value) { - return - } - } - if len(x.AssertionMethod) != 0 { - value := protoreflect.ValueOfList(&_Document_5_list{list: &x.AssertionMethod}) - if !f(fd_Document_assertion_method, value) { - return - } - } - if len(x.CapabilityDelegation) != 0 { - value := protoreflect.ValueOfList(&_Document_7_list{list: &x.CapabilityDelegation}) - if !f(fd_Document_capability_delegation, value) { - return - } - } - if len(x.CapabilityInvocation) != 0 { - value := protoreflect.ValueOfList(&_Document_8_list{list: &x.CapabilityInvocation}) - if !f(fd_Document_capability_invocation, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Document.id": - return x.Id != "" - case "did.v1.Document.verification_methods": - return len(x.VerificationMethods) != 0 - case "did.v1.Document.authentication": - return len(x.Authentication) != 0 - case "did.v1.Document.assertion_method": - return len(x.AssertionMethod) != 0 - case "did.v1.Document.capability_delegation": - return len(x.CapabilityDelegation) != 0 - case "did.v1.Document.capability_invocation": - return len(x.CapabilityInvocation) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Document.id": - x.Id = "" - case "did.v1.Document.verification_methods": - x.VerificationMethods = nil - case "did.v1.Document.authentication": - x.Authentication = nil - case "did.v1.Document.assertion_method": - x.AssertionMethod = nil - case "did.v1.Document.capability_delegation": - x.CapabilityDelegation = nil - case "did.v1.Document.capability_invocation": - x.CapabilityInvocation = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Document.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Document.verification_methods": - if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_Document_2_list{}) - } - listValue := &_Document_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.authentication": - if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_Document_4_list{}) - } - listValue := &_Document_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.assertion_method": - if len(x.AssertionMethod) == 0 { - return protoreflect.ValueOfList(&_Document_5_list{}) - } - listValue := &_Document_5_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.capability_delegation": - if len(x.CapabilityDelegation) == 0 { - return protoreflect.ValueOfList(&_Document_7_list{}) - } - listValue := &_Document_7_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(listValue) - case "did.v1.Document.capability_invocation": - if len(x.CapabilityInvocation) == 0 { - return protoreflect.ValueOfList(&_Document_8_list{}) - } - listValue := &_Document_8_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Document.id": - x.Id = value.Interface().(string) - case "did.v1.Document.verification_methods": - lv := value.List() - clv := lv.(*_Document_2_list) - x.VerificationMethods = *clv.list - case "did.v1.Document.authentication": - lv := value.List() - clv := lv.(*_Document_4_list) - x.Authentication = *clv.list - case "did.v1.Document.assertion_method": - lv := value.List() - clv := lv.(*_Document_5_list) - x.AssertionMethod = *clv.list - case "did.v1.Document.capability_delegation": - lv := value.List() - clv := lv.(*_Document_7_list) - x.CapabilityDelegation = *clv.list - case "did.v1.Document.capability_invocation": - lv := value.List() - clv := lv.(*_Document_8_list) - x.CapabilityInvocation = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Document.verification_methods": - if x.VerificationMethods == nil { - x.VerificationMethods = []*VerificationMethod{} - } - value := &_Document_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(value) - case "did.v1.Document.authentication": - if x.Authentication == nil { - x.Authentication = []string{} - } - value := &_Document_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(value) - case "did.v1.Document.assertion_method": - if x.AssertionMethod == nil { - x.AssertionMethod = []string{} - } - value := &_Document_5_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(value) - case "did.v1.Document.capability_delegation": - if x.CapabilityDelegation == nil { - x.CapabilityDelegation = []string{} - } - value := &_Document_7_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(value) - case "did.v1.Document.capability_invocation": - if x.CapabilityInvocation == nil { - x.CapabilityInvocation = []string{} - } - value := &_Document_8_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(value) - case "did.v1.Document.id": - panic(fmt.Errorf("field id of message did.v1.Document is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Document.id": - return protoreflect.ValueOfString("") - case "did.v1.Document.verification_methods": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_Document_2_list{list: &list}) - case "did.v1.Document.authentication": - list := []string{} - return protoreflect.ValueOfList(&_Document_4_list{list: &list}) - case "did.v1.Document.assertion_method": - list := []string{} - return protoreflect.ValueOfList(&_Document_5_list{list: &list}) - case "did.v1.Document.capability_delegation": - list := []string{} - return protoreflect.ValueOfList(&_Document_7_list{list: &list}) - case "did.v1.Document.capability_invocation": - list := []string{} - return protoreflect.ValueOfList(&_Document_8_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) - } - panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Document) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Document) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - 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)) - } - if len(x.VerificationMethods) > 0 { - for _, e := range x.VerificationMethods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Authentication) > 0 { - for _, s := range x.Authentication { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.AssertionMethod) > 0 { - for _, s := range x.AssertionMethod { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.CapabilityDelegation) > 0 { - for _, s := range x.CapabilityDelegation { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.CapabilityInvocation) > 0 { - for _, s := range x.CapabilityInvocation { - 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().(*Document) - 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.CapabilityInvocation) > 0 { - for iNdEx := len(x.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], x.CapabilityInvocation[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.CapabilityDelegation) > 0 { - for iNdEx := len(x.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], x.CapabilityDelegation[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.AssertionMethod) > 0 { - for iNdEx := len(x.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AssertionMethod[iNdEx]) - copy(dAtA[i:], x.AssertionMethod[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Authentication) > 0 { - for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Authentication[iNdEx]) - copy(dAtA[i:], x.Authentication[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.VerificationMethods) > 0 { - for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VerificationMethods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 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().(*Document) - 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: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", 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.Authentication = append(x.Authentication, 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 AssertionMethod", 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.AssertionMethod = append(x.AssertionMethod, 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 CapabilityDelegation", 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.CapabilityDelegation = append(x.CapabilityDelegation, 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 CapabilityInvocation", 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.CapabilityInvocation = append(x.CapabilityInvocation, 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_Endpoint protoreflect.MessageDescriptor - fd_Endpoint_url protoreflect.FieldDescriptor - fd_Endpoint_is_primary protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_Endpoint = File_did_v1_types_proto.Messages().ByName("Endpoint") - fd_Endpoint_url = md_Endpoint.Fields().ByName("url") - fd_Endpoint_is_primary = md_Endpoint.Fields().ByName("is_primary") -} - -var _ protoreflect.Message = (*fastReflection_Endpoint)(nil) - -type fastReflection_Endpoint Endpoint - -func (x *Endpoint) ProtoReflect() protoreflect.Message { - return (*fastReflection_Endpoint)(x) -} - -func (x *Endpoint) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Endpoint_messageType fastReflection_Endpoint_messageType -var _ protoreflect.MessageType = fastReflection_Endpoint_messageType{} - -type fastReflection_Endpoint_messageType struct{} - -func (x fastReflection_Endpoint_messageType) Zero() protoreflect.Message { - return (*fastReflection_Endpoint)(nil) -} -func (x fastReflection_Endpoint_messageType) New() protoreflect.Message { - return new(fastReflection_Endpoint) -} -func (x fastReflection_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Endpoint -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Endpoint) Descriptor() protoreflect.MessageDescriptor { - return md_Endpoint -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Endpoint) Type() protoreflect.MessageType { - return _fastReflection_Endpoint_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Endpoint) New() protoreflect.Message { - return new(fastReflection_Endpoint) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Endpoint) Interface() protoreflect.ProtoMessage { - return (*Endpoint)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_Endpoint_url, value) { - return - } - } - if x.IsPrimary != false { - value := protoreflect.ValueOfBool(x.IsPrimary) - if !f(fd_Endpoint_is_primary, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Endpoint.url": - return x.Url != "" - case "did.v1.Endpoint.is_primary": - return x.IsPrimary != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Endpoint) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Endpoint.url": - x.Url = "" - case "did.v1.Endpoint.is_primary": - x.IsPrimary = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Endpoint.url": - value := x.Url - return protoreflect.ValueOfString(value) - case "did.v1.Endpoint.is_primary": - value := x.IsPrimary - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Endpoint.url": - x.Url = value.Interface().(string) - case "did.v1.Endpoint.is_primary": - x.IsPrimary = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Endpoint.url": - panic(fmt.Errorf("field url of message did.v1.Endpoint is not mutable")) - case "did.v1.Endpoint.is_primary": - panic(fmt.Errorf("field is_primary of message did.v1.Endpoint is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Endpoint.url": - return protoreflect.ValueOfString("") - case "did.v1.Endpoint.is_primary": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) - } - panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Endpoint", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Endpoint) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Endpoint) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Endpoint) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Endpoint) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Endpoint) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Url) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsPrimary { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Endpoint) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.IsPrimary { - i-- - if x.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Endpoint) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ExplorerInfo protoreflect.MessageDescriptor - fd_ExplorerInfo_name protoreflect.FieldDescriptor - fd_ExplorerInfo_url protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_ExplorerInfo = File_did_v1_types_proto.Messages().ByName("ExplorerInfo") - fd_ExplorerInfo_name = md_ExplorerInfo.Fields().ByName("name") - fd_ExplorerInfo_url = md_ExplorerInfo.Fields().ByName("url") -} - -var _ protoreflect.Message = (*fastReflection_ExplorerInfo)(nil) - -type fastReflection_ExplorerInfo ExplorerInfo - -func (x *ExplorerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ExplorerInfo)(x) -} - -func (x *ExplorerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ExplorerInfo_messageType fastReflection_ExplorerInfo_messageType -var _ protoreflect.MessageType = fastReflection_ExplorerInfo_messageType{} - -type fastReflection_ExplorerInfo_messageType struct{} - -func (x fastReflection_ExplorerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ExplorerInfo)(nil) -} -func (x fastReflection_ExplorerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ExplorerInfo) -} -func (x fastReflection_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ExplorerInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ExplorerInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ExplorerInfo) Type() protoreflect.MessageType { - return _fastReflection_ExplorerInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ExplorerInfo) New() protoreflect.Message { - return new(fastReflection_ExplorerInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ExplorerInfo) Interface() protoreflect.ProtoMessage { - return (*ExplorerInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_ExplorerInfo_name, value) { - return - } - } - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_ExplorerInfo_url, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - return x.Name != "" - case "did.v1.ExplorerInfo.url": - return x.Url != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - x.Name = "" - case "did.v1.ExplorerInfo.url": - x.Url = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ExplorerInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "did.v1.ExplorerInfo.url": - value := x.Url - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - x.Name = value.Interface().(string) - case "did.v1.ExplorerInfo.url": - x.Url = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - panic(fmt.Errorf("field name of message did.v1.ExplorerInfo is not mutable")) - case "did.v1.ExplorerInfo.url": - panic(fmt.Errorf("field url of message did.v1.ExplorerInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ExplorerInfo.name": - return protoreflect.ValueOfString("") - case "did.v1.ExplorerInfo.url": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) - } - panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ExplorerInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ExplorerInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExplorerInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ExplorerInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ExplorerInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ExplorerInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Url) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ExplorerInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Url) > 0 { - i -= len(x.Url) - copy(dAtA[i:], x.Url) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) - i-- - dAtA[i] = 0x12 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ExplorerInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_FeeInfo_2_list)(nil) - -type _FeeInfo_2_list struct { - list *[]string -} - -func (x *_FeeInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_FeeInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_FeeInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_FeeInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_FeeInfo_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message FeeInfo at list field FeeRates as it is not of Message kind")) -} - -func (x *_FeeInfo_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_FeeInfo_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_FeeInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_FeeInfo protoreflect.MessageDescriptor - fd_FeeInfo_base_denom protoreflect.FieldDescriptor - fd_FeeInfo_fee_rates protoreflect.FieldDescriptor - fd_FeeInfo_init_gas_limit protoreflect.FieldDescriptor - fd_FeeInfo_is_simulable protoreflect.FieldDescriptor - fd_FeeInfo_gas_multiply protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_FeeInfo = File_did_v1_types_proto.Messages().ByName("FeeInfo") - fd_FeeInfo_base_denom = md_FeeInfo.Fields().ByName("base_denom") - fd_FeeInfo_fee_rates = md_FeeInfo.Fields().ByName("fee_rates") - fd_FeeInfo_init_gas_limit = md_FeeInfo.Fields().ByName("init_gas_limit") - fd_FeeInfo_is_simulable = md_FeeInfo.Fields().ByName("is_simulable") - fd_FeeInfo_gas_multiply = md_FeeInfo.Fields().ByName("gas_multiply") -} - -var _ protoreflect.Message = (*fastReflection_FeeInfo)(nil) - -type fastReflection_FeeInfo FeeInfo - -func (x *FeeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_FeeInfo)(x) -} - -func (x *FeeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_FeeInfo_messageType fastReflection_FeeInfo_messageType -var _ protoreflect.MessageType = fastReflection_FeeInfo_messageType{} - -type fastReflection_FeeInfo_messageType struct{} - -func (x fastReflection_FeeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_FeeInfo)(nil) -} -func (x fastReflection_FeeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_FeeInfo) -} -func (x fastReflection_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_FeeInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_FeeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_FeeInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_FeeInfo) Type() protoreflect.MessageType { - return _fastReflection_FeeInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_FeeInfo) New() protoreflect.Message { - return new(fastReflection_FeeInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_FeeInfo) Interface() protoreflect.ProtoMessage { - return (*FeeInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BaseDenom != "" { - value := protoreflect.ValueOfString(x.BaseDenom) - if !f(fd_FeeInfo_base_denom, value) { - return - } - } - if len(x.FeeRates) != 0 { - value := protoreflect.ValueOfList(&_FeeInfo_2_list{list: &x.FeeRates}) - if !f(fd_FeeInfo_fee_rates, value) { - return - } - } - if x.InitGasLimit != int32(0) { - value := protoreflect.ValueOfInt32(x.InitGasLimit) - if !f(fd_FeeInfo_init_gas_limit, value) { - return - } - } - if x.IsSimulable != false { - value := protoreflect.ValueOfBool(x.IsSimulable) - if !f(fd_FeeInfo_is_simulable, value) { - return - } - } - if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { - value := protoreflect.ValueOfFloat64(x.GasMultiply) - if !f(fd_FeeInfo_gas_multiply, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - return x.BaseDenom != "" - case "did.v1.FeeInfo.fee_rates": - return len(x.FeeRates) != 0 - case "did.v1.FeeInfo.init_gas_limit": - return x.InitGasLimit != int32(0) - case "did.v1.FeeInfo.is_simulable": - return x.IsSimulable != false - case "did.v1.FeeInfo.gas_multiply": - return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - x.BaseDenom = "" - case "did.v1.FeeInfo.fee_rates": - x.FeeRates = nil - case "did.v1.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(0) - case "did.v1.FeeInfo.is_simulable": - x.IsSimulable = false - case "did.v1.FeeInfo.gas_multiply": - x.GasMultiply = float64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.FeeInfo.base_denom": - value := x.BaseDenom - return protoreflect.ValueOfString(value) - case "did.v1.FeeInfo.fee_rates": - if len(x.FeeRates) == 0 { - return protoreflect.ValueOfList(&_FeeInfo_2_list{}) - } - listValue := &_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(listValue) - case "did.v1.FeeInfo.init_gas_limit": - value := x.InitGasLimit - return protoreflect.ValueOfInt32(value) - case "did.v1.FeeInfo.is_simulable": - value := x.IsSimulable - return protoreflect.ValueOfBool(value) - case "did.v1.FeeInfo.gas_multiply": - value := x.GasMultiply - return protoreflect.ValueOfFloat64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - x.BaseDenom = value.Interface().(string) - case "did.v1.FeeInfo.fee_rates": - lv := value.List() - clv := lv.(*_FeeInfo_2_list) - x.FeeRates = *clv.list - case "did.v1.FeeInfo.init_gas_limit": - x.InitGasLimit = int32(value.Int()) - case "did.v1.FeeInfo.is_simulable": - x.IsSimulable = value.Bool() - case "did.v1.FeeInfo.gas_multiply": - x.GasMultiply = value.Float() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.FeeInfo.fee_rates": - if x.FeeRates == nil { - x.FeeRates = []string{} - } - value := &_FeeInfo_2_list{list: &x.FeeRates} - return protoreflect.ValueOfList(value) - case "did.v1.FeeInfo.base_denom": - panic(fmt.Errorf("field base_denom of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.init_gas_limit": - panic(fmt.Errorf("field init_gas_limit of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.is_simulable": - panic(fmt.Errorf("field is_simulable of message did.v1.FeeInfo is not mutable")) - case "did.v1.FeeInfo.gas_multiply": - panic(fmt.Errorf("field gas_multiply of message did.v1.FeeInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.FeeInfo.base_denom": - return protoreflect.ValueOfString("") - case "did.v1.FeeInfo.fee_rates": - list := []string{} - return protoreflect.ValueOfList(&_FeeInfo_2_list{list: &list}) - case "did.v1.FeeInfo.init_gas_limit": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.FeeInfo.is_simulable": - return protoreflect.ValueOfBool(false) - case "did.v1.FeeInfo.gas_multiply": - return protoreflect.ValueOfFloat64(float64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) - } - panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.FeeInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_FeeInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_FeeInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_FeeInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*FeeInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.BaseDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.FeeRates) > 0 { - for _, s := range x.FeeRates { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.InitGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.InitGasLimit)) - } - if x.IsSimulable { - n += 2 - } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - n += 9 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*FeeInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.GasMultiply)))) - i-- - dAtA[i] = 0x29 - } - if x.IsSimulable { - i-- - if x.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.InitGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.InitGasLimit)) - i-- - dAtA[i] = 0x18 - } - if len(x.FeeRates) > 0 { - for iNdEx := len(x.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.FeeRates[iNdEx]) - copy(dAtA[i:], x.FeeRates[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRates[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.BaseDenom) > 0 { - i -= len(x.BaseDenom) - copy(dAtA[i:], x.BaseDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*FeeInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FeeRates = append(x.FeeRates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) - } - x.InitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.InitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.GasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Identity_4_list)(nil) - -type _Identity_4_list struct { - list *[]*Credential -} - -func (x *_Identity_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Identity_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Identity_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - (*x.list)[i] = concreteValue -} - -func (x *_Identity_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Identity_4_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Identity_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Identity_4_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Identity_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Identity_5_list)(nil) - -type _Identity_5_list struct { - list *[]*VerificationMethod -} - -func (x *_Identity_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Identity_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Identity_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_Identity_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Identity_5_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Identity_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Identity_5_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Identity_5_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Identity protoreflect.MessageDescriptor - fd_Identity_id protoreflect.FieldDescriptor - fd_Identity_subject protoreflect.FieldDescriptor - fd_Identity_controller protoreflect.FieldDescriptor - fd_Identity_credentials protoreflect.FieldDescriptor - fd_Identity_verification_methods protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_Identity = File_did_v1_types_proto.Messages().ByName("Identity") - fd_Identity_id = md_Identity.Fields().ByName("id") - fd_Identity_subject = md_Identity.Fields().ByName("subject") - fd_Identity_controller = md_Identity.Fields().ByName("controller") - fd_Identity_credentials = md_Identity.Fields().ByName("credentials") - fd_Identity_verification_methods = md_Identity.Fields().ByName("verification_methods") -} - -var _ protoreflect.Message = (*fastReflection_Identity)(nil) - -type fastReflection_Identity Identity - -func (x *Identity) ProtoReflect() protoreflect.Message { - return (*fastReflection_Identity)(x) -} - -func (x *Identity) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Identity_messageType fastReflection_Identity_messageType -var _ protoreflect.MessageType = fastReflection_Identity_messageType{} - -type fastReflection_Identity_messageType struct{} - -func (x fastReflection_Identity_messageType) Zero() protoreflect.Message { - return (*fastReflection_Identity)(nil) -} -func (x fastReflection_Identity_messageType) New() protoreflect.Message { - return new(fastReflection_Identity) -} -func (x fastReflection_Identity_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Identity -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Identity) Descriptor() protoreflect.MessageDescriptor { - return md_Identity -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Identity) Type() protoreflect.MessageType { - return _fastReflection_Identity_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Identity) New() protoreflect.Message { - return new(fastReflection_Identity) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Identity) Interface() protoreflect.ProtoMessage { - return (*Identity)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Identity) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Identity_id, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Identity_subject, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Identity_controller, value) { - return - } - } - if len(x.Credentials) != 0 { - value := protoreflect.ValueOfList(&_Identity_4_list{list: &x.Credentials}) - if !f(fd_Identity_credentials, value) { - return - } - } - if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_Identity_5_list{list: &x.VerificationMethods}) - if !f(fd_Identity_verification_methods, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Identity) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Identity.id": - return x.Id != "" - case "did.v1.Identity.subject": - return x.Subject != "" - case "did.v1.Identity.controller": - return x.Controller != "" - case "did.v1.Identity.credentials": - return len(x.Credentials) != 0 - case "did.v1.Identity.verification_methods": - return len(x.VerificationMethods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Identity.id": - x.Id = "" - case "did.v1.Identity.subject": - x.Subject = "" - case "did.v1.Identity.controller": - x.Controller = "" - case "did.v1.Identity.credentials": - x.Credentials = nil - case "did.v1.Identity.verification_methods": - x.VerificationMethods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Identity) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Identity.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.Identity.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Identity.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Identity.credentials": - if len(x.Credentials) == 0 { - return protoreflect.ValueOfList(&_Identity_4_list{}) - } - listValue := &_Identity_4_list{list: &x.Credentials} - return protoreflect.ValueOfList(listValue) - case "did.v1.Identity.verification_methods": - if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_Identity_5_list{}) - } - listValue := &_Identity_5_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Identity.id": - x.Id = value.Interface().(string) - case "did.v1.Identity.subject": - x.Subject = value.Interface().(string) - case "did.v1.Identity.controller": - x.Controller = value.Interface().(string) - case "did.v1.Identity.credentials": - lv := value.List() - clv := lv.(*_Identity_4_list) - x.Credentials = *clv.list - case "did.v1.Identity.verification_methods": - lv := value.List() - clv := lv.(*_Identity_5_list) - x.VerificationMethods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Identity.credentials": - if x.Credentials == nil { - x.Credentials = []*Credential{} - } - value := &_Identity_4_list{list: &x.Credentials} - return protoreflect.ValueOfList(value) - case "did.v1.Identity.verification_methods": - if x.VerificationMethods == nil { - x.VerificationMethods = []*VerificationMethod{} - } - value := &_Identity_5_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(value) - case "did.v1.Identity.id": - panic(fmt.Errorf("field id of message did.v1.Identity is not mutable")) - case "did.v1.Identity.subject": - panic(fmt.Errorf("field subject of message did.v1.Identity is not mutable")) - case "did.v1.Identity.controller": - panic(fmt.Errorf("field controller of message did.v1.Identity is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Identity) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Identity.id": - return protoreflect.ValueOfString("") - case "did.v1.Identity.subject": - return protoreflect.ValueOfString("") - case "did.v1.Identity.controller": - return protoreflect.ValueOfString("") - case "did.v1.Identity.credentials": - list := []*Credential{} - return protoreflect.ValueOfList(&_Identity_4_list{list: &list}) - case "did.v1.Identity.verification_methods": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_Identity_5_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) - } - panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Identity) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Identity", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Identity) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Identity) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Identity) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Identity) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Credentials) > 0 { - for _, e := range x.Credentials { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.VerificationMethods) > 0 { - for _, e := range x.VerificationMethods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Identity) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VerificationMethods) > 0 { - for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VerificationMethods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Credentials) > 0 { - for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Credentials[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Identity) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Credentials = append(x.Credentials, &Credential{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_PubKey protoreflect.MessageDescriptor - fd_PubKey_id protoreflect.FieldDescriptor - fd_PubKey_key protoreflect.FieldDescriptor - fd_PubKey_key_type protoreflect.FieldDescriptor - fd_PubKey_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_PubKey = File_did_v1_types_proto.Messages().ByName("PubKey") - fd_PubKey_id = md_PubKey.Fields().ByName("id") - fd_PubKey_key = md_PubKey.Fields().ByName("key") - fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type") - fd_PubKey_controller = md_PubKey.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_PubKey)(nil) - -type fastReflection_PubKey PubKey - -func (x *PubKey) ProtoReflect() protoreflect.Message { - return (*fastReflection_PubKey)(x) -} - -func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType -var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} - -type fastReflection_PubKey_messageType struct{} - -func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { - return (*fastReflection_PubKey)(nil) -} -func (x fastReflection_PubKey_messageType) New() protoreflect.Message { - return new(fastReflection_PubKey) -} -func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { - return md_PubKey -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_PubKey) Type() protoreflect.MessageType { - return _fastReflection_PubKey_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PubKey) New() protoreflect.Message { - return new(fastReflection_PubKey) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { - return (*PubKey)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_PubKey_id, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PubKey_key, value) { - return - } - } - if x.KeyType != "" { - value := protoreflect.ValueOfString(x.KeyType) - if !f(fd_PubKey_key_type, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_PubKey_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.PubKey.id": - return x.Id != "" - case "did.v1.PubKey.key": - return len(x.Key) != 0 - case "did.v1.PubKey.key_type": - return x.KeyType != "" - case "did.v1.PubKey.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.PubKey.id": - x.Id = "" - case "did.v1.PubKey.key": - x.Key = nil - case "did.v1.PubKey.key_type": - x.KeyType = "" - case "did.v1.PubKey.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.PubKey.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "did.v1.PubKey.key_type": - value := x.KeyType - return protoreflect.ValueOfString(value) - case "did.v1.PubKey.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.PubKey.id": - x.Id = value.Interface().(string) - case "did.v1.PubKey.key": - x.Key = value.Bytes() - case "did.v1.PubKey.key_type": - x.KeyType = value.Interface().(string) - case "did.v1.PubKey.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.id": - panic(fmt.Errorf("field id of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.key": - panic(fmt.Errorf("field key of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.key_type": - panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.controller": - panic(fmt.Errorf("field controller of message did.v1.PubKey is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.PubKey.id": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.key": - return protoreflect.ValueOfBytes(nil) - case "did.v1.PubKey.key_type": - return protoreflect.ValueOfString("") - case "did.v1.PubKey.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) - } - panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_PubKey) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.KeyType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(x.KeyType) > 0 { - i -= len(x.KeyType) - copy(dAtA[i:], x.KeyType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PubKey) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.Map = (*_VerificationMethod_4_map)(nil) - -type _VerificationMethod_4_map struct { - m *map[string]string -} - -func (x *_VerificationMethod_4_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_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 *_VerificationMethod_4_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_VerificationMethod_4_map) IsValid() bool { - return x.m != nil -} - -var ( - md_VerificationMethod protoreflect.MessageDescriptor - fd_VerificationMethod_id protoreflect.FieldDescriptor - fd_VerificationMethod_controller protoreflect.FieldDescriptor - fd_VerificationMethod_public_key_multibase protoreflect.FieldDescriptor - fd_VerificationMethod_public_key_jwks protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_types_proto_init() - md_VerificationMethod = File_did_v1_types_proto.Messages().ByName("VerificationMethod") - fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") - fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") - fd_VerificationMethod_public_key_multibase = md_VerificationMethod.Fields().ByName("public_key_multibase") - fd_VerificationMethod_public_key_jwks = md_VerificationMethod.Fields().ByName("public_key_jwks") -} - -var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) - -type fastReflection_VerificationMethod VerificationMethod - -func (x *VerificationMethod) ProtoReflect() protoreflect.Message { - return (*fastReflection_VerificationMethod)(x) -} - -func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_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_VerificationMethod_messageType fastReflection_VerificationMethod_messageType -var _ protoreflect.MessageType = fastReflection_VerificationMethod_messageType{} - -type fastReflection_VerificationMethod_messageType struct{} - -func (x fastReflection_VerificationMethod_messageType) Zero() protoreflect.Message { - return (*fastReflection_VerificationMethod)(nil) -} -func (x fastReflection_VerificationMethod_messageType) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} -func (x fastReflection_VerificationMethod_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VerificationMethod) Descriptor() protoreflect.MessageDescriptor { - return md_VerificationMethod -} - -// 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_VerificationMethod) Type() protoreflect.MessageType { - return _fastReflection_VerificationMethod_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VerificationMethod) New() protoreflect.Message { - return new(fastReflection_VerificationMethod) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VerificationMethod) Interface() protoreflect.ProtoMessage { - return (*VerificationMethod)(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_VerificationMethod) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_VerificationMethod_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_VerificationMethod_controller, value) { - return - } - } - if x.PublicKeyMultibase != "" { - value := protoreflect.ValueOfString(x.PublicKeyMultibase) - if !f(fd_VerificationMethod_public_key_multibase, value) { - return - } - } - if len(x.PublicKeyJwks) != 0 { - value := protoreflect.ValueOfMap(&_VerificationMethod_4_map{m: &x.PublicKeyJwks}) - if !f(fd_VerificationMethod_public_key_jwks, 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_VerificationMethod) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.VerificationMethod.id": - return x.Id != "" - case "did.v1.VerificationMethod.controller": - return x.Controller != "" - case "did.v1.VerificationMethod.public_key_multibase": - return x.PublicKeyMultibase != "" - case "did.v1.VerificationMethod.public_key_jwks": - return len(x.PublicKeyJwks) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.VerificationMethod.id": - x.Id = "" - case "did.v1.VerificationMethod.controller": - x.Controller = "" - case "did.v1.VerificationMethod.public_key_multibase": - x.PublicKeyMultibase = "" - case "did.v1.VerificationMethod.public_key_jwks": - x.PublicKeyJwks = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.VerificationMethod.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key_multibase": - value := x.PublicKeyMultibase - return protoreflect.ValueOfString(value) - case "did.v1.VerificationMethod.public_key_jwks": - if len(x.PublicKeyJwks) == 0 { - return protoreflect.ValueOfMap(&_VerificationMethod_4_map{}) - } - mapValue := &_VerificationMethod_4_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.VerificationMethod.id": - x.Id = value.Interface().(string) - case "did.v1.VerificationMethod.controller": - x.Controller = value.Interface().(string) - case "did.v1.VerificationMethod.public_key_multibase": - x.PublicKeyMultibase = value.Interface().(string) - case "did.v1.VerificationMethod.public_key_jwks": - mv := value.Map() - cmv := mv.(*_VerificationMethod_4_map) - x.PublicKeyJwks = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.VerificationMethod.public_key_jwks": - if x.PublicKeyJwks == nil { - x.PublicKeyJwks = make(map[string]string) - } - value := &_VerificationMethod_4_map{m: &x.PublicKeyJwks} - return protoreflect.ValueOfMap(value) - 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.public_key_multibase": - panic(fmt.Errorf("field public_key_multibase 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")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.VerificationMethod.id": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.controller": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key_multibase": - return protoreflect.ValueOfString("") - case "did.v1.VerificationMethod.public_key_jwks": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_VerificationMethod_4_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) - } - panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.VerificationMethod", 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VerificationMethod) - 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.PublicKeyMultibase) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PublicKeyJwks) > 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.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.PublicKeyJwks[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.PublicKeyJwks { - SiZeMaP(k, v) - } - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*VerificationMethod) - 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.PublicKeyJwks) > 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] = 0x22 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForPublicKeyJwks := make([]string, 0, len(x.PublicKeyJwks)) - for k := range x.PublicKeyJwks { - keysForPublicKeyJwks = append(keysForPublicKeyJwks, string(k)) - } - sort.Slice(keysForPublicKeyJwks, func(i, j int) bool { - return keysForPublicKeyJwks[i] < keysForPublicKeyJwks[j] - }) - for iNdEx := len(keysForPublicKeyJwks) - 1; iNdEx >= 0; iNdEx-- { - v := x.PublicKeyJwks[string(keysForPublicKeyJwks[iNdEx])] - out, err := MaRsHaLmAp(keysForPublicKeyJwks[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.PublicKeyJwks { - v := x.PublicKeyJwks[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.PublicKeyMultibase) > 0 { - i -= len(x.PublicKeyMultibase) - copy(dAtA[i:], x.PublicKeyMultibase) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKeyMultibase))) - 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().(*VerificationMethod) - 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: VerificationMethod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerificationMethod: 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 PublicKeyMultibase", 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.PublicKeyMultibase = 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 PublicKeyJwks", 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.PublicKeyJwks == nil { - x.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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.PublicKeyJwks[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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/types.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) -) - -// AssetInfo defines the asset info -type AssetInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` -} - -func (x *AssetInfo) Reset() { - *x = AssetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssetInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssetInfo) ProtoMessage() {} - -// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. -func (*AssetInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{0} -} - -func (x *AssetInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *AssetInfo) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *AssetInfo) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *AssetInfo) GetAssetType() string { - if x != nil { - return x.AssetType - } - return "" -} - -func (x *AssetInfo) GetOriginChain() string { - if x != nil { - return x.OriginChain - } - return "" -} - -func (x *AssetInfo) GetOriginDenom() string { - if x != nil { - return x.OriginDenom - } - return "" -} - -func (x *AssetInfo) GetDecimals() int32 { - if x != nil { - return x.Decimals - } - return 0 -} - -func (x *AssetInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AssetInfo) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -func (x *AssetInfo) GetCoingeckoId() string { - if x != nil { - return x.CoingeckoId - } - return "" -} - -func (x *AssetInfo) GetIsEnabled() bool { - if x != nil { - return x.IsEnabled - } - return false -} - -func (x *AssetInfo) GetIbcPath() string { - if x != nil { - return x.IbcPath - } - return "" -} - -func (x *AssetInfo) GetIbcChannel() string { - if x != nil { - return x.IbcChannel - } - return "" -} - -func (x *AssetInfo) GetIbcPort() string { - if x != nil { - return x.IbcPort - } - return "" -} - -// ChainInfo defines the chain info -type ChainInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` -} - -func (x *ChainInfo) Reset() { - *x = ChainInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainInfo) ProtoMessage() {} - -// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. -func (*ChainInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{1} -} - -func (x *ChainInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ChainInfo) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *ChainInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ChainInfo) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *ChainInfo) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -func (x *ChainInfo) GetGenesisTime() string { - if x != nil { - return x.GenesisTime - } - return "" -} - -func (x *ChainInfo) GetGrpcEndpoints() []*Endpoint { - if x != nil { - return x.GrpcEndpoints - } - return nil -} - -func (x *ChainInfo) GetRestEndpoints() []*Endpoint { - if x != nil { - return x.RestEndpoints - } - return nil -} - -func (x *ChainInfo) GetExplorer() *ExplorerInfo { - if x != nil { - return x.Explorer - } - return nil -} - -func (x *ChainInfo) GetFeeInfo() *FeeInfo { - if x != nil { - return x.FeeInfo - } - return nil -} - -// Credential defines a WebAuthn credential -type Credential struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *Credential) Reset() { - *x = Credential{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Credential) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Credential) ProtoMessage() {} - -// Deprecated: Use Credential.ProtoReflect.Descriptor instead. -func (*Credential) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{2} -} - -func (x *Credential) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Credential) GetCredentialType() string { - if x != nil { - return x.CredentialType - } - return "" -} - -func (x *Credential) GetCredentialId() []byte { - if x != nil { - return x.CredentialId - } - return nil -} - -func (x *Credential) GetTransport() []string { - if x != nil { - return x.Transport - } - return nil -} - -func (x *Credential) GetAttestationType() string { - if x != nil { - return x.AttestationType - } - return "" -} - -func (x *Credential) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Credential) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -// Document defines a DID document -type Document struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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 (x *Document) Reset() { - *x = Document{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Document) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Document) ProtoMessage() {} - -// Deprecated: Use Document.ProtoReflect.Descriptor instead. -func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{3} -} - -func (x *Document) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Document) GetVerificationMethods() []*VerificationMethod { - if x != nil { - return x.VerificationMethods - } - return nil -} - -func (x *Document) GetAuthentication() []string { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *Document) GetAssertionMethod() []string { - if x != nil { - return x.AssertionMethod - } - return nil -} - -func (x *Document) GetCapabilityDelegation() []string { - if x != nil { - return x.CapabilityDelegation - } - return nil -} - -func (x *Document) GetCapabilityInvocation() []string { - if x != nil { - return x.CapabilityInvocation - } - return nil -} - -// Endpoint defines an endpoint -type Endpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` -} - -func (x *Endpoint) Reset() { - *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoint) ProtoMessage() {} - -// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. -func (*Endpoint) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{4} -} - -func (x *Endpoint) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Endpoint) GetIsPrimary() bool { - if x != nil { - return x.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ExplorerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *ExplorerInfo) Reset() { - *x = ExplorerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExplorerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExplorerInfo) ProtoMessage() {} - -// Deprecated: Use ExplorerInfo.ProtoReflect.Descriptor instead. -func (*ExplorerInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{5} -} - -func (x *ExplorerInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ExplorerInfo) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// FeeInfo defines a fee info -type FeeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (x *FeeInfo) Reset() { - *x = FeeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FeeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FeeInfo) ProtoMessage() {} - -// Deprecated: Use FeeInfo.ProtoReflect.Descriptor instead. -func (*FeeInfo) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{6} -} - -func (x *FeeInfo) GetBaseDenom() string { - if x != nil { - return x.BaseDenom - } - return "" -} - -func (x *FeeInfo) GetFeeRates() []string { - if x != nil { - return x.FeeRates - } - return nil -} - -func (x *FeeInfo) GetInitGasLimit() int32 { - if x != nil { - return x.InitGasLimit - } - return 0 -} - -func (x *FeeInfo) GetIsSimulable() bool { - if x != nil { - return x.IsSimulable - } - return false -} - -func (x *FeeInfo) GetGasMultiply() float64 { - if x != nil { - return x.GasMultiply - } - return 0 -} - -// Identity defines an associated profile for a did subject -type Identity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` -} - -func (x *Identity) Reset() { - *x = Identity{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identity) ProtoMessage() {} - -// Deprecated: Use Identity.ProtoReflect.Descriptor instead. -func (*Identity) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{7} -} - -func (x *Identity) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Identity) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Identity) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Identity) GetCredentials() []*Credential { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *Identity) GetVerificationMethods() []*VerificationMethod { - if x != nil { - return x.VerificationMethods - } - return nil -} - -// PubKey defines a public key for a did -type PubKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *PubKey) Reset() { - *x = PubKey{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PubKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PubKey) ProtoMessage() {} - -// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. -func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{8} -} - -func (x *PubKey) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PubKey) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *PubKey) GetKeyType() string { - if x != nil { - return x.KeyType - } - return "" -} - -func (x *PubKey) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -// VerificationMethod defines a verification method -type VerificationMethod struct { - state protoimpl.MessageState - 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"` - // 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 (x *VerificationMethod) Reset() { - *x = VerificationMethod{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerificationMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerificationMethod) ProtoMessage() {} - -// Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{9} -} - -func (x *VerificationMethod) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *VerificationMethod) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *VerificationMethod) GetPublicKeyMultibase() string { - if x != nil { - return x.PublicKeyMultibase - } - return "" -} - -func (x *VerificationMethod) GetPublicKeyJwks() map[string]string { - if x != nil { - return x.PublicKeyJwks - } - return nil -} - -var File_did_v1_types_proto protoreflect.FileDescriptor - -var file_did_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, - 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, - 0x61, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, - 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x5f, - 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, - 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x1f, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xfa, 0x02, 0x0a, 0x09, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, - 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x37, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, - 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x78, - 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x08, - 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x22, 0xa6, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, - 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, - 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x08, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, - 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xb1, 0x01, - 0x0a, 0x07, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, - 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, - 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, - 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, - 0x73, 0x5f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x79, 0x22, 0xd9, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, - 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x65, 0x0a, - 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, - 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x55, 0x0a, - 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x4a, 0x77, 0x6b, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, - 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_did_v1_types_proto_rawDescOnce sync.Once - file_did_v1_types_proto_rawDescData = file_did_v1_types_proto_rawDesc -) - -func file_did_v1_types_proto_rawDescGZIP() []byte { - file_did_v1_types_proto_rawDescOnce.Do(func() { - file_did_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_types_proto_rawDescData) - }) - return file_did_v1_types_proto_rawDescData -} - -var file_did_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_did_v1_types_proto_goTypes = []interface{}{ - (*AssetInfo)(nil), // 0: did.v1.AssetInfo - (*ChainInfo)(nil), // 1: did.v1.ChainInfo - (*Credential)(nil), // 2: did.v1.Credential - (*Document)(nil), // 3: did.v1.Document - (*Endpoint)(nil), // 4: did.v1.Endpoint - (*ExplorerInfo)(nil), // 5: did.v1.ExplorerInfo - (*FeeInfo)(nil), // 6: did.v1.FeeInfo - (*Identity)(nil), // 7: did.v1.Identity - (*PubKey)(nil), // 8: did.v1.PubKey - (*VerificationMethod)(nil), // 9: did.v1.VerificationMethod - nil, // 10: did.v1.VerificationMethod.PublicKeyJwksEntry -} -var file_did_v1_types_proto_depIdxs = []int32{ - 4, // 0: did.v1.ChainInfo.grpc_endpoints:type_name -> did.v1.Endpoint - 4, // 1: did.v1.ChainInfo.rest_endpoints:type_name -> did.v1.Endpoint - 5, // 2: did.v1.ChainInfo.explorer:type_name -> did.v1.ExplorerInfo - 6, // 3: did.v1.ChainInfo.fee_info:type_name -> did.v1.FeeInfo - 9, // 4: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod - 2, // 5: did.v1.Identity.credentials:type_name -> did.v1.Credential - 9, // 6: did.v1.Identity.verification_methods:type_name -> did.v1.VerificationMethod - 10, // 7: did.v1.VerificationMethod.public_key_jwks:type_name -> did.v1.VerificationMethod.PublicKeyJwksEntry - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_did_v1_types_proto_init() } -func file_did_v1_types_proto_init() { - if File_did_v1_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_did_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Credential); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Document); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExplorerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FeeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerificationMethod); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_types_proto_goTypes, - DependencyIndexes: file_did_v1_types_proto_depIdxs, - MessageInfos: file_did_v1_types_proto_msgTypes, - }.Build() - File_did_v1_types_proto = out.File - file_did_v1_types_proto_rawDesc = nil - file_did_v1_types_proto_goTypes = nil - file_did_v1_types_proto_depIdxs = nil -} diff --git a/app/ante.go b/app/ante.go index ee57181c0..b79eaa7fe 100644 --- a/app/ante.go +++ b/app/ante.go @@ -47,8 +47,8 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { } poaDoGenTxRateValidation := false - poaRateFloor := sdkmath.LegacyMustNewDecFromStr("0.10") - poaRateCeil := sdkmath.LegacyMustNewDecFromStr("0.50") + poaRateFloor := sdkmath.LegacyMustNewDecFromStr("0.05") + poaRateCeil := sdkmath.LegacyMustNewDecFromStr("0.25") anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first diff --git a/cmd/sonrd/main.go b/cmd/sonrd/main.go index fcca52569..5944aa356 100644 --- a/cmd/sonrd/main.go +++ b/cmd/sonrd/main.go @@ -8,12 +8,12 @@ import ( _ "github.com/joho/godotenv/autoload" "github.com/onsonr/sonr/app" - "github.com/onsonr/sonr/internal/tui" + "github.com/onsonr/sonr/internal/cli" ) func main() { rootCmd := NewRootCmd() - tui.AddTUICmds(rootCmd) + cli.AddTUICmds(rootCmd) if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err) diff --git a/config/caddy/Caddyfile b/config/caddy/Caddyfile new file mode 100644 index 000000000..c97299e26 --- /dev/null +++ b/config/caddy/Caddyfile @@ -0,0 +1,33 @@ +{ + email team@sonr.id +} + +# Vaults at vault.sonr.id +vault.sonr.id { + tls { + dns cloudflare {env.CLOUDFLARE_API_TOKEN} + resolvers 1.1.1.1 + } + + # Match paths that are bech32 addresses + @vault path_regexp vaultPath ^/([a-z0-9]{42})(/.*|)$ + + handle @vault { + # Rewrite to IPFS gateway format + uri replace /{re.vaultPath.0} /ipns/{re.vaultPath.1}{re.vaultPath.2} + + # Proxy to IPFS gateway + reverse_proxy http://localhost:8080 + } + + file_server + + header { + Content-Type .wasm application/wasm + Service-Worker-Allowed "/" + # Add any other necessary headers + } + + # Optional: Enable compression + encode zstd gzip +} diff --git a/config/caddy/caddy.json b/config/caddy/caddy.json new file mode 100644 index 000000000..e69de29bb diff --git a/config/dwn/Config.pkl.go b/config/dwn/Config.pkl.go new file mode 100644 index 000000000..69b448bea --- /dev/null +++ b/config/dwn/Config.pkl.go @@ -0,0 +1,12 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Config struct { + Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"` + + Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"` + + Motr *Motr `pkl:"motr" json:"motr,omitempty"` + + Schema *Schema `pkl:"schema" json:"schema,omitempty"` +} diff --git a/config/dwn/Dwn.pkl.go b/config/dwn/Dwn.pkl.go new file mode 100644 index 000000000..8bc5e41f5 --- /dev/null +++ b/config/dwn/Dwn.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Dwn struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Dwn +func LoadFromPath(ctx context.Context, path string) (ret *Dwn, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Dwn +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Dwn, error) { + var ret Dwn + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/config/dwn/IPFS.pkl.go b/config/dwn/IPFS.pkl.go new file mode 100644 index 000000000..78084810b --- /dev/null +++ b/config/dwn/IPFS.pkl.go @@ -0,0 +1,8 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type IPFS struct { + ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` + + GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"` +} diff --git a/config/dwn/Motr.pkl.go b/config/dwn/Motr.pkl.go new file mode 100644 index 000000000..bc144efd0 --- /dev/null +++ b/config/dwn/Motr.pkl.go @@ -0,0 +1,10 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Motr struct { + Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` + + Address string `pkl:"address" json:"address,omitempty"` + + Origin string `pkl:"origin" json:"origin,omitempty"` +} diff --git a/config/dwn/Schema.pkl.go b/config/dwn/Schema.pkl.go new file mode 100644 index 000000000..4ded3ac6a --- /dev/null +++ b/config/dwn/Schema.pkl.go @@ -0,0 +1,24 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Schema struct { + Version int `pkl:"version"` + + Account string `pkl:"account" json:"account,omitempty"` + + Asset string `pkl:"asset" json:"asset,omitempty"` + + Chain string `pkl:"chain" json:"chain,omitempty"` + + Credential string `pkl:"credential" json:"credential,omitempty"` + + Jwk string `pkl:"jwk" json:"jwk,omitempty"` + + Grant string `pkl:"grant" json:"grant,omitempty"` + + Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"` + + Profile string `pkl:"profile" json:"profile,omitempty"` +} diff --git a/config/dwn/Sonr.pkl.go b/config/dwn/Sonr.pkl.go new file mode 100644 index 000000000..8693af808 --- /dev/null +++ b/config/dwn/Sonr.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Sonr struct { + ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` + + GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"` + + RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"` + + WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"` + + ChainId string `pkl:"chainId" json:"chainId,omitempty"` +} diff --git a/config/dwn/init.pkl.go b/config/dwn/init.pkl.go new file mode 100644 index 000000000..5654e722a --- /dev/null +++ b/config/dwn/init.pkl.go @@ -0,0 +1,13 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("dwn", Dwn{}) + pkl.RegisterMapping("dwn#Config", Config{}) + pkl.RegisterMapping("dwn#IPFS", IPFS{}) + pkl.RegisterMapping("dwn#Sonr", Sonr{}) + pkl.RegisterMapping("dwn#Motr", Motr{}) + pkl.RegisterMapping("dwn#Schema", Schema{}) +} diff --git a/config/pkl/dwn.pkl b/config/pkl/dwn.pkl new file mode 100644 index 000000000..ea4cea655 --- /dev/null +++ b/config/pkl/dwn.pkl @@ -0,0 +1,97 @@ +@go.Package { name = "github.com/onsonr/sonr/config/dwn" } + +module dwn + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + +typealias JSON = String + +class JsonField extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + } +} + +class Config { + @JsonField + ipfs: IPFS + + @JsonField + sonr: Sonr + + @JsonField + motr: Motr + + @JsonField + schema: Schema +} + +class IPFS { + @JsonField + apiUrl: String + + @JsonField + gatewayUrl: String +} + +class Motr { + @JsonField + keyshare: JSON + + @JsonField + address: String + + @JsonField + origin: String +} + +class Schema { + version: Int + + @JsonField + account: String + + @JsonField + asset: String + + @JsonField + chain: String + + @JsonField + credential: String + + @JsonField + jwk: String + + @JsonField + grant: String + + @JsonField + keyshare: String + + @JsonField + publicKey: String + + @JsonField + profile: String +} + +class Sonr { + @JsonField + apiUrl: String + + @JsonField + grpcUrl: String + + @JsonField + rpcUrl: String + + @JsonField + webSocketUrl: String + + @JsonField + chainId: String +} + + + diff --git a/config/pkl/orm.pkl b/config/pkl/orm.pkl new file mode 100644 index 000000000..145d89654 --- /dev/null +++ b/config/pkl/orm.pkl @@ -0,0 +1,276 @@ +@go.Package { name = "github.com/onsonr/sonr/internal/orm" } + +module orm + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + +typealias Base58 = String +typealias Base64 = String + +typealias Bech32 = String +typealias Keccak = String + +typealias DID = String +typealias ChainCode = UInt +typealias Scope = String + +typealias Hex = String + +class PrimaryKey extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + ["query"] = "%{name}" + } +} + +class JsonField extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + } +} + +// Enums +typealias AssetType = "native"|"wrapped"|"staking"|"pool"|"ibc"|"cw20" + +typealias DIDMethod = "ipfs"|"sonr"|"bitcoin"|"ethereum"|"ibc"|"webauthn"|"dwn"|"service" + +typealias KeyAlgorithm = "es256"|"es384"|"es512"|"eddsa"|"es256k"|"ecdsa" + +typealias KeyCurve = "p256"|"p384"|"p521"|"x25519"|"x448"|"ed25519"|"ed448"|"secp256k1"|"bls12381"|"keccak256" + +typealias KeyEncoding = "raw"|"hex"|"multibase" + +typealias KeyRole = "authentication"|"assertion"|"delegation"|"invocation" + +typealias KeyType = "octet"|"elliptic"|"rsa"|"symmetric"|"hmac"|"mpc"|"zk"|"webauthn"|"bip32" + +typealias KeyShareRole = "user"|"validator" + +typealias PermissionGrant = "none"|"read"|"write"|"verify"|"broadcast"|"admin" + +typealias PermissionScope = "profile"|"metadata"|"permissions"|"wallets"|"transactions"|"user"|"validator" + + +class Account { + @PrimaryKey + id: DID + + @JsonField + name: String + + @JsonField + address: Bech32|Keccak|String + + @JsonField + publicKey: Base58 + + @JsonField + chainCode: ChainCode + + @JsonField + index: Int + + @JsonField + controller: Bech32 + + @JsonField + createdAt: String? +} + +class Asset { + @PrimaryKey + id: DID + + @JsonField + name: String + + @JsonField + symbol: String + + @JsonField + decimals: Int + + @JsonField + chainCode: ChainCode + + @JsonField + createdAt: String? +} + +class Chain { + @PrimaryKey + id: DID + + @JsonField + name: String + + @JsonField + networkId: String + + @JsonField + chainCode: ChainCode + + @JsonField + createdAt: String? +} + +class Credential { + @PrimaryKey + id: DID + + @JsonField + subject: String + + @JsonField + controller: Bech32 + + @JsonField + attestationType: String + + @JsonField + origin: String + + @JsonField + label: String? + + @JsonField + deviceId: String? + + @JsonField + credentialId: Base64 + + @JsonField + publicKey: Base64 + + @JsonField + transport: List + + @JsonField + signCount: UInt + + @JsonField + userPresent: Boolean + + @JsonField + userVerified: Boolean + + @JsonField + backupEligible: Boolean + + @JsonField + backupState: Boolean + + @JsonField + cloneWarning: Boolean + + @JsonField + createdAt: String? + + @JsonField + updatedAt: String? +} + +class JWK { + @JsonField + kty: String + + @JsonField + crv: String + + @JsonField + x: String + + @JsonField + y: String + + @JsonField + n: String + + @JsonField + e: String +} + +class Grant { + @PrimaryKey + id: UInt + + @JsonField + subject: String + + @JsonField + controller: Bech32 + + @JsonField + origin: String + + @JsonField + token: String + + @JsonField + scopes: List + + @JsonField + createdAt: String? + + @JsonField + updatedAt: String? +} + +class Keyshare { + @PrimaryKey + id: DID + + @JsonField + data: Base64 + + @JsonField + role: Int + + @JsonField + createdAt: String? + + @JsonField + lastRefreshed: String? +} + +class PublicKey { + @PrimaryKey + role: KeyRole + algorithm: KeyAlgorithm + encoding: KeyEncoding + curve: KeyCurve + key_type: KeyType + raw: Base58 + jwk: JWK +} + +class Profile { + @PrimaryKey + id: String + + @JsonField + subject: String + + @JsonField + controller: Bech32 + + @JsonField + originUri: String? + + @JsonField + publicMetadata: String? + + @JsonField + privateMetadata: String? + + @JsonField + createdAt: String? + + @JsonField + updatedAt: String? +} + + +db_name: String = "vault" +db_version: Int = 1 + diff --git a/config/pkl/txns.pkl b/config/pkl/txns.pkl new file mode 100644 index 000000000..e658489b1 --- /dev/null +++ b/config/pkl/txns.pkl @@ -0,0 +1,174 @@ +@go.Package { name = "github.com/onsonr/sonr/internal/orm/transactions" } + +module transactions + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + +/// Common Cosmos SDK types +typealias Coin = Dynamic +typealias AccAddress = String +typealias ValAddress = String +typealias Timestamp = String + +/// Base class for all messages +abstract class Msg { + /// The type URL for the message + typeUrl: String +} + +/// Base class for all proposals +class Proposal { + /// The title of the proposal + title: String + + /// The description of the proposal + description: String +} + +/// Gov module messages +class MsgGovSubmitProposal extends Msg { + typeUrl = "/cosmos.gov.v1beta1.MsgSubmitProposal" + content: Proposal + initialDeposit: List + proposer: AccAddress +} + +class MsgGovVote extends Msg { + typeUrl = "/cosmos.gov.v1beta1.MsgVote" + proposalId: Int + voter: AccAddress + option: Int +} + +class MsgGovDeposit extends Msg { + typeUrl = "/cosmos.gov.v1beta1.MsgDeposit" + proposalId: Int + depositor: AccAddress + amount: List +} + +/// Group module messages + class MsgGroupCreateGroup extends Msg { + typeUrl = "/cosmos.group.v1.MsgCreateGroup" + admin: AccAddress + members: List + metadata: String + } + + class MsgGroupSubmitProposal extends Msg { + typeUrl = "/cosmos.group.v1.MsgSubmitProposal" + groupPolicyAddress: AccAddress + proposers: List + metadata: String + messages: List + exec: Int + } + + class MsgGroupVote extends Msg { + typeUrl = "/cosmos.group.v1.MsgVote" + proposalId: Int + voter: AccAddress + option: Int + metadata: String + exec: Int + } + +/// Staking module messages + class MsgStakingCreateValidator extends Msg { + typeUrl = "/cosmos.staking.v1beta1.MsgCreateValidator" + description: Dynamic + commission: Dynamic + minSelfDelegation: String + delegatorAddress: AccAddress + validatorAddress: ValAddress + pubkey: Dynamic + value: Coin + } + + class MsgStakingDelegate extends Msg { + typeUrl = "/cosmos.staking.v1beta1.MsgDelegate" + delegatorAddress: AccAddress + validatorAddress: ValAddress + amount: Coin + } + + class MsgStakingUndelegate extends Msg { + typeUrl = "/cosmos.staking.v1beta1.MsgUndelegate" + delegatorAddress: AccAddress + validatorAddress: ValAddress + amount: Coin + } + + class MsgStakingBeginRedelegate extends Msg { + typeUrl = "/cosmos.staking.v1beta1.MsgBeginRedelegate" + delegatorAddress: AccAddress + validatorSrcAddress: ValAddress + validatorDstAddress: ValAddress + amount: Coin + } + class MsgDidUpdateParams extends Msg { + typeUrl = "/sonr.did.v1.MsgUpdateParams" + authority: AccAddress + params: Dynamic + token: Dynamic + } + + class MsgDidAllocateVault extends Msg { + typeUrl = "/sonr.did.v1.MsgAllocateVault" + authority: AccAddress + subject: String + token: Dynamic + } + + class MsgDidProveWitness extends Msg { + typeUrl = "/sonr.did.v1.MsgProveWitness" + authority: AccAddress + property: String + witness: Listing + token: Dynamic + } + + class MsgDidSyncVault extends Msg { + typeUrl = "/sonr.did.v1.MsgSyncVault" + controller: AccAddress + token: Dynamic + } + +class MsgDidRegisterController extends Msg { + typeUrl = "/sonr.did.v1.MsgRegisterController" + authority: AccAddress + cid: String + origin: String + authentication: List + token: Dynamic + } + +class MsgDidAuthorize extends Msg { + typeUrl = "/sonr.did.v1.MsgAuthorize" + authority: AccAddress + controller: AccAddress + address: AccAddress + origin: String + token: Dynamic + } + +class MsgDidRegisterService extends Msg { + typeUrl = "/sonr.did.v1.MsgRegisterService" + controller: AccAddress + originUri: String + scopes: Dynamic + description: String + serviceEndpoints: Map + metadata: Dynamic + token: Dynamic + } + +/// Represents a transaction body +class TxBody { + messages: List + memo: String? + timeoutHeight: Int? + extensionOptions: List? + nonCriticalExtensionOptions: List? +} + diff --git a/config/pkl/web.pkl b/config/pkl/web.pkl new file mode 100644 index 000000000..ed06f3e6b --- /dev/null +++ b/config/pkl/web.pkl @@ -0,0 +1,72 @@ +@go.Package { name = "github.com/onsonr/sonr/internal/orm/browser" } + +module browser + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + + +class JsonField extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + } +} + +class PublicKeyCredentialRequestOptions { + challenge: String + timeout: Int + rpId: String + allowCredentials: List + userVerification: String + extensions: List +} + +class PublicKeyCredentialDescriptor { + id: String + transports: List + type: String +} + +class PublicKeyCredentialParameters { + type: String + alg: Int? +} + +class AuthenticatorSelectionCriteria { + authenticatorAttachment: String + requireResidentKey: Boolean + userVerification: String +} + + +class PublicKeyCredentialCreationOptions { + rp: RpEntity + user: UserEntity + challenge: String + pubKeyCredParams: List + timeout: Int + excludeCredentials: List + authenticatorSelection: AuthenticatorSelectionCriteria? + attestation: String + extensions: List +} + +class RpEntity { + id: String + name: String? + icon: String? +} + +class UserEntity { + id: String + displayName: String? + name: String? +} + +class SWT { + origin: String + location: String + identifier: String + scopes: List + properties: Map + expiryBlock: Int +} diff --git a/deploy/air.toml b/deploy/air.toml new file mode 100644 index 000000000..1fc4c2ec2 --- /dev/null +++ b/deploy/air.toml @@ -0,0 +1,50 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "tmp" + +[build] +delay = 1000 +cmd = "devbox run build:motr" +exclude_dir = ["assets", "tmp", "vendor", "testdata"] +exclude_file = [] +exclude_regex = ["_test.go", ".pk.go", "_templ.go", ".pb.go"] +exclude_unchanged = true +follow_symlink = false +full_bin = "bunx wrangler -c ./web/wrangler.toml dev" +include_dir = ["web", "internal/dwn", "pkl"] +include_ext = ["go", "templ", "html", "pkl", "js", "mjs"] +include_file = [ + "wrangler.toml", + "Dockerfile", + ".goreleaser.yaml", + "go.mod", + "devbox.json", + ".air.toml", +] +kill_delay = "2s" +log = "build-errors.log" +poll = false +poll_interval = 0 +post_cmd = [] +pre_cmd = ["templ generate", "devbox run gen:pkl"] +rerun = false +rerun_delay = 500 +send_interrupt = false +stop_on_error = false + +[color] +build = "yellow" +main = "magenta" +runner = "green" +watcher = "cyan" + +[log] +main_only = true +time = true + +[misc] +clean_on_exit = true + +[screen] +clear_on_rebuild = true +keep_scroll = true diff --git a/deploy/docker-compose.yaml b/deploy/docker-compose.yaml new file mode 100644 index 000000000..9b7687ed8 --- /dev/null +++ b/deploy/docker-compose.yaml @@ -0,0 +1,30 @@ +version: "3" + +services: + sonr-node: + build: + context: . + dockerfile: Dockerfile + volumes: + - /home/prad/.scnr:/root/.sonr + ports: + - "26657:26657" + - "1317:1317" + - "9090:9090" + environment: + - CHAIN_ID=local-1 + - MONIKER=localvalidator + - KEYRING=test + - KEY=user1 + - KEY2=user2 + - DENOM=usnr + - CLEAN=true + - BLOCK_TIME=5s + command: "start --pruning=nothing" + restart: always + networks: + - sonr-network + +networks: + sonr-network: + name: sonr-network diff --git a/deploy/process-compose.dev.yaml b/deploy/process-compose.dev.yaml new file mode 100644 index 000000000..8338ec468 --- /dev/null +++ b/deploy/process-compose.dev.yaml @@ -0,0 +1,25 @@ +version: "0.6" + +processes: + sonr: + namespace: testnet + command: "devbox run serve:sonr" + restart: on_failure + max_restarts: 3 + depends: + + caddy: + namespace: testnet + command: "devbox run serve:xcaddy" + restart: on_failure + max_restarts: 3 + depends: + - sonr + + air: + namespace: testnet + command: "devbox run serve:air" + restart: on_failure + max_restarts: 3 + depends: + - sonr diff --git a/deploy/process-compose.yaml b/deploy/process-compose.yaml new file mode 100644 index 000000000..6fc59f530 --- /dev/null +++ b/deploy/process-compose.yaml @@ -0,0 +1,17 @@ +version: "0.6" + +processes: + sonr: + namespace: testnet + command: "devbox run serve:sonr" + restart: on_failure + max_restarts: 3 + depends: + + caddy: + namespace: testnet + command: "devbox run serve:xcaddy" + restart: on_failure + max_restarts: 3 + depends: + - sonr diff --git a/devbox.json b/devbox.json index 72dabf8f9..914f40e5b 100644 --- a/devbox.json +++ b/devbox.json @@ -2,21 +2,19 @@ "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", "packages": [ "go@1.22", - "templ@latest", - "go-task@latest", - "templ@latest", "bun@latest", - "ipfs-cluster@latest", - "air@latest" + "process-compose@latest" ], - "packages": ["go@1.21"], "env": { + "CLOUDFLARE_API_TOKEN": "$CLOUDFLARE_API_TOKEN", "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH", + "TEMPL_EXPERIMENT": "rawgo", "CHAIN_ID": "sonr-testnet-1", "DENOM": "usnr", "KEYRING": "test", - "MONIKER": "florence" + "MONIKER": "florence", + "ENV": "$ENVIRONMENT" }, "shell": { "scripts": { @@ -24,38 +22,41 @@ "make install" ], "build": [ - "make build", - "make local-image" + "make build" ], "build:dwn": [ - "templ generate", "make dwn" ], + "build:image": [ + "make local-image" + ], "build:motr": [ - "templ generate", "make motr" ], "gen:proto": [ "make proto-gen" ], "gen:pkl": [ - "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/oidc.pkl", - "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl", - "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl" + "make pkl" ], - "dev": [ - "air" + "gen:templ": [ + "make templ" + ], + "serve:air": [ + "make air" + ], + "serve:xcaddy": [ + "make xcaddy" + ], + "serve:sonr": [ + "make sh-testnet" + ], + "local": [ + "process-compose -f ./deploy/process-compose.dev.yaml" ], "testnet": [ - "devbox services up" + "process-compose -f ./deploy/process-compose.yaml" ] - "install": ["make install"], - "gen": ["make proto-gen"], - "build": [ - "make local-image", - "docker tag sonr:local ghcr.io/onsonr/sonrd:latest" - ], - "push": ["docker push ghcr.io/onsonr/sonrd:latest"] } } } diff --git a/go.mod b/go.mod index 266cd90bf..65608f681 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,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/a-h/templ v0.2.778 github.com/apple/pkl-go v0.8.0 github.com/btcsuite/btcd/btcec/v2 v2.3.3 github.com/charmbracelet/bubbles v0.19.0 @@ -67,16 +67,12 @@ require ( github.com/go-webauthn/webauthn v0.10.2 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hack-pad/go-indexeddb v0.3.2 github.com/ipfs/boxo v0.21.0 github.com/ipfs/kubo v0.29.0 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.10.2 - github.com/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-js-promise v1.0.0 - github.com/onsonr/crypto v1.29.0 + github.com/onsonr/crypto v1.32.0 github.com/segmentio/ksuid v1.0.4 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 @@ -91,11 +87,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 - gopkg.in/macaroon-bakery.v2 v2.3.0 gopkg.in/macaroon.v2 v2.1.0 - gorm.io/gorm v1.25.11 - lukechampine.com/adiantum v1.1.1 - lukechampine.com/blake3 v1.3.0 ) require ( @@ -194,7 +186,6 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect - github.com/hack-pad/safejs v0.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect diff --git a/go.sum b/go.sum index e40ecf31a..b44bf1f17 100644 --- a/go.sum +++ b/go.sum @@ -835,8 +835,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/a-h/templ v0.2.778 h1:VzhOuvWECrwOec4790lcLlZpP4Iptt5Q4K9aFxQmtaM= +github.com/a-h/templ v0.2.778/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= @@ -1150,9 +1150,6 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.0.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= -github.com/frankban/quicktest v1.1.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= -github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -1403,10 +1400,6 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8 github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/hack-pad/go-indexeddb v0.3.2 h1:DTqeJJYc1usa45Q5r52t01KhvlSN02+Oq+tQbSBI91A= -github.com/hack-pad/go-indexeddb v0.3.2/go.mod h1:QvfTevpDVlkfomY498LhstjwbPW6QC4VC/lxYb0Kom0= -github.com/hack-pad/safejs v0.1.0 h1:qPS6vjreAqh2amUqj4WNG1zIw7qlRQJ9K10eDKMCnE8= -github.com/hack-pad/safejs v0.1.0/go.mod h1:HdS+bKF1NrE72VoXZeWzxFOVQVUSqZJAG0xNCnb+Tio= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1861,8 +1854,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.29.0 h1:ontCN/XNNmpWv23N8VB6vsirLXcjxZaA67lLX9RNj0c= -github.com/onsonr/crypto v1.29.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= +github.com/onsonr/crypto v1.32.0 h1:3XxItjoYg4vLuTU7uvpbIl/MTk2tb6L43SSO9RFcEXc= +github.com/onsonr/crypto v1.32.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -1979,7 +1972,6 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -2314,7 +2306,6 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.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= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2619,7 +2610,6 @@ 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-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-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= @@ -3052,12 +3042,8 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/httprequest.v1 v1.2.0/go.mod h1:T61ZUaJLpMnzvoJDO03ZD8yRXD4nZzBeDoW5e9sffjg= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/juju/environschema.v1 v1.0.0/go.mod h1:WTgU3KXKCVoO9bMmG/4KHzoaRvLeoxfjArpgd1MGWFA= -gopkg.in/macaroon-bakery.v2 v2.3.0 h1:b40knPgPTke1QLTE8BSYeH7+R/hiIozB1A8CTLYN0Ic= -gopkg.in/macaroon-bakery.v2 v2.3.0/go.mod h1:/8YhtPARXeRzbpEPLmRB66+gQE8/pzBBkWwg7Vz/guc= gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI= gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/internal/cli/dexmodel/dexmodel.go b/internal/cli/dexmodel/dexmodel.go new file mode 100644 index 000000000..c6a77a8d8 --- /dev/null +++ b/internal/cli/dexmodel/dexmodel.go @@ -0,0 +1,165 @@ +package dexmodel + +import ( + "fmt" + "time" + + "github.com/charmbracelet/bubbles/table" + tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/lipgloss" + "github.com/spf13/cobra" +) + +var ( + subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"} + highlight = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#7D56F4"} + special = lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"} + + titleStyle = lipgloss.NewStyle(). + MarginLeft(1). + MarginRight(5). + Padding(0, 1). + Italic(true). + Foreground(lipgloss.Color("#FFF7DB")). + SetString("Cosmos Block Explorer") + + infoStyle = lipgloss.NewStyle(). + BorderStyle(lipgloss.NormalBorder()). + BorderTop(true). + BorderForeground(subtle) +) + +type model struct { + blocks []string + transactionTable table.Model + stats map[string]string + width int + height int +} + +func initialModel() model { + columns := []table.Column{ + {Title: "Hash", Width: 10}, + {Title: "Type", Width: 15}, + {Title: "Height", Width: 10}, + {Title: "Time", Width: 20}, + } + + rows := []table.Row{ + {"abc123", "Transfer", "1000", time.Now().Format(time.RFC3339)}, + {"def456", "Delegate", "999", time.Now().Add(-1 * time.Minute).Format(time.RFC3339)}, + {"ghi789", "Vote", "998", time.Now().Add(-2 * time.Minute).Format(time.RFC3339)}, + } + + t := table.New( + table.WithColumns(columns), + table.WithRows(rows), + table.WithFocused(true), + table.WithHeight(7), + ) + + s := table.DefaultStyles() + s.Header = s.Header. + BorderStyle(lipgloss.NormalBorder()). + BorderForeground(lipgloss.Color("240")). + BorderBottom(true). + Bold(false) + s.Selected = s.Selected. + Foreground(lipgloss.Color("229")). + Background(lipgloss.Color("57")). + Bold(false) + t.SetStyles(s) + + return model{ + blocks: []string{"Block 1", "Block 2", "Block 3"}, + transactionTable: t, + stats: map[string]string{ + "Latest Block": "1000", + "Validators": "100", + "Bonded Tokens": "1,000,000", + }, + } +} + +func (m model) Init() tea.Cmd { + return tick +} + +func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + var cmd tea.Cmd + switch msg := msg.(type) { + case tea.KeyMsg: + switch msg.String() { + case "q", "ctrl+c": + return m, tea.Quit + case "enter": + return m, tea.Batch( + tea.Printf("Selected transaction: %s", m.transactionTable.SelectedRow()[0]), + ) + } + case tea.WindowSizeMsg: + m.height = msg.Height + m.width = msg.Width + case tickMsg: + // Update data here + m.blocks = append([]string{"New Block"}, m.blocks...) + if len(m.blocks) > 5 { + m.blocks = m.blocks[:5] + } + + // Add a new transaction to the table + newRow := table.Row{ + fmt.Sprintf("tx%d", time.Now().Unix()), + "NewTxType", + fmt.Sprintf("%d", 1000+len(m.transactionTable.Rows())), + time.Now().Format(time.RFC3339), + } + m.transactionTable.SetRows(append([]table.Row{newRow}, m.transactionTable.Rows()...)) + if len(m.transactionTable.Rows()) > 10 { + m.transactionTable.SetRows(m.transactionTable.Rows()[:10]) + } + + return m, tick + } + m.transactionTable, cmd = m.transactionTable.Update(msg) + return m, cmd +} + +func (m model) View() string { + s := titleStyle.Render("Cosmos Block Explorer") + s += "\n\n" + + // Blocks + s += lipgloss.NewStyle().Bold(true).Render("Recent Blocks") + "\n" + for _, block := range m.blocks { + s += "• " + block + "\n" + } + s += "\n" + + // Transactions + s += lipgloss.NewStyle().Bold(true).Render("Recent Transactions") + "\n" + s += m.transactionTable.View() + "\n\n" + + // Stats + s += lipgloss.NewStyle().Bold(true).Render("Network Statistics") + "\n" + for key, value := range m.stats { + s += fmt.Sprintf("%s: %s\n", key, value) + } + + return s +} + +type tickMsg time.Time + +func tick() tea.Msg { + time.Sleep(time.Second) + return tickMsg{} +} + +func RunExplorerTUI(cmd *cobra.Command, args []string) error { + p := tea.NewProgram(initialModel(), tea.WithAltScreen()) + if _, err := p.Run(); err != nil { + return fmt.Errorf("error running explorer: %v", err) + } + return nil +} diff --git a/internal/cli/tui.go b/internal/cli/tui.go new file mode 100644 index 000000000..f49f6c7cf --- /dev/null +++ b/internal/cli/tui.go @@ -0,0 +1,49 @@ +package cli + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/onsonr/sonr/internal/cli/dexmodel" + "github.com/onsonr/sonr/internal/cli/txmodel" + "github.com/spf13/cobra" +) + +func AddTUICmds(rootCmd *cobra.Command) { + rootCmd.AddCommand(newBuildTxnTUICmd()) + rootCmd.AddCommand(newExplorerTUICmd()) +} + +func newBuildTxnTUICmd() *cobra.Command { + return &cobra.Command{ + Use: "dash", + Short: "TUI for managing the local Sonr validator node", + RunE: func(cmd *cobra.Command, args []string) error { + txBody, err := txmodel.RunBuildTxnTUI() + if err != nil { + return err + } + + interfaceRegistry := codectypes.NewInterfaceRegistry() + marshaler := codec.NewProtoCodec(interfaceRegistry) + jsonBytes, err := marshaler.MarshalJSON(txBody) + if err != nil { + return fmt.Errorf("failed to marshal tx body: %w", err) + } + + fmt.Println("Generated Protobuf Message (JSON format):") + fmt.Println(string(jsonBytes)) + + return nil + }, + } +} + +func newExplorerTUICmd() *cobra.Command { + return &cobra.Command{ + Use: "cosmos-explorer", + Short: "A terminal-based Cosmos blockchain explorer", + RunE: dexmodel.RunExplorerTUI, + } +} diff --git a/internal/cli/txmodel/txmodel.go b/internal/cli/txmodel/txmodel.go new file mode 100644 index 000000000..4c493ad24 --- /dev/null +++ b/internal/cli/txmodel/txmodel.go @@ -0,0 +1,322 @@ +package txmodel + +import ( + "fmt" + "strings" + + tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/huh" + "github.com/charmbracelet/lipgloss" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +const maxWidth = 100 + +var ( + red = lipgloss.AdaptiveColor{Light: "#FE5F86", Dark: "#FE5F86"} + indigo = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"} + green = lipgloss.AdaptiveColor{Light: "#02BA84", Dark: "#02BF87"} +) + +type Styles struct { + Base, + HeaderText, + Status, + StatusHeader, + Highlight, + ErrorHeaderText, + Help lipgloss.Style +} + +func NewStyles(lg *lipgloss.Renderer) *Styles { + s := Styles{} + s.Base = lg.NewStyle(). + Padding(1, 2, 0, 1) + s.HeaderText = lg.NewStyle(). + Foreground(indigo). + Bold(true). + Padding(0, 1, 0, 1) + s.Status = lg.NewStyle(). + Border(lipgloss.RoundedBorder()). + BorderForeground(indigo). + PaddingLeft(1). + MarginTop(1) + s.StatusHeader = lg.NewStyle(). + Foreground(green). + Bold(true) + s.Highlight = lg.NewStyle(). + Foreground(lipgloss.Color("212")) + s.ErrorHeaderText = s.HeaderText. + Foreground(red) + s.Help = lg.NewStyle(). + Foreground(lipgloss.Color("240")) + return &s +} + +type state int + +const ( + statusNormal state = iota + stateDone +) + +type Model struct { + state state + lg *lipgloss.Renderer + styles *Styles + form *huh.Form + width int + message *tx.TxBody +} + +func NewModel() Model { + m := Model{width: maxWidth} + m.lg = lipgloss.DefaultRenderer() + m.styles = NewStyles(m.lg) + + m.form = huh.NewForm( + huh.NewGroup( + huh.NewInput(). + Key("from"). + Title("From Address"). + Placeholder("cosmos1..."). + Validate(func(s string) error { + if !strings.HasPrefix(s, "cosmos1") { + return fmt.Errorf("invalid address format") + } + return nil + }), + + huh.NewInput(). + Key("to"). + Title("To Address"). + Placeholder("cosmos1..."). + Validate(func(s string) error { + if !strings.HasPrefix(s, "cosmos1") { + return fmt.Errorf("invalid address format") + } + return nil + }), + + huh.NewInput(). + Key("amount"). + Title("Amount"). + Placeholder("100"). + Validate(func(s string) error { + if _, err := sdk.ParseCoinNormalized(s + "atom"); err != nil { + return fmt.Errorf("invalid coin amount") + } + return nil + }), + + huh.NewSelect[string](). + Key("denom"). + Title("Denom"). + Options(huh.NewOptions("atom", "osmo", "usnr", "snr")...), + + huh.NewInput(). + Key("memo"). + Title("Memo"). + Placeholder("Optional"), + + huh.NewConfirm(). + Key("done"). + Title("Ready to convert?"). + Validate(func(v bool) error { + if !v { + return fmt.Errorf("Please confirm when you're ready to convert") + } + return nil + }). + Affirmative("Yes, convert!"). + Negative("Not yet"), + ), + ). + WithWidth(60). + WithShowHelp(false). + WithShowErrors(false) + + return m +} + +func (m Model) Init() tea.Cmd { + return m.form.Init() +} + +func min(x, y int) int { + if x > y { + return y + } + return x +} + +func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + switch msg := msg.(type) { + case tea.WindowSizeMsg: + m.width = min(msg.Width, maxWidth) - m.styles.Base.GetHorizontalFrameSize() + case tea.KeyMsg: + switch msg.String() { + case "esc", "ctrl+c", "q": + return m, tea.Quit + } + } + + var cmds []tea.Cmd + + form, cmd := m.form.Update(msg) + if f, ok := form.(*huh.Form); ok { + m.form = f + cmds = append(cmds, cmd) + } + + if m.form.State == huh.StateCompleted { + m.buildMessage() + cmds = append(cmds, tea.Quit) + } + + return m, tea.Batch(cmds...) +} + +func (m Model) View() string { + s := m.styles + + switch m.form.State { + case huh.StateCompleted: + pklCode := m.generatePkl() + messageView := m.getMessageView() + var b strings.Builder + fmt.Fprintf(&b, "Final Tx:\n\n%s\n\n%s", pklCode, messageView) + return s.Status.Margin(0, 1).Padding(1, 2).Width(80).Render(b.String()) + "\n\n" + default: + var schemaType string + if m.form.GetString("schemaType") != "" { + schemaType = "Schema Type: " + m.form.GetString("schemaType") + } + + v := strings.TrimSuffix(m.form.View(), "\n\n") + form := m.lg.NewStyle().Margin(1, 0).Render(v) + + var status string + { + preview := "(Preview will appear here)" + if m.form.GetString("schema") != "" { + preview = m.generatePkl() + } + + const statusWidth = 40 + statusMarginLeft := m.width - statusWidth - lipgloss.Width(form) - s.Status.GetMarginRight() + status = s.Status. + Height(lipgloss.Height(form)). + Width(statusWidth). + MarginLeft(statusMarginLeft). + Render(s.StatusHeader.Render("Pkl Preview") + "\n" + + schemaType + "\n\n" + + preview) + } + + errors := m.form.Errors() + header := m.appBoundaryView("Sonr TX Builder") + if len(errors) > 0 { + header = m.appErrorBoundaryView(m.errorView()) + } + body := lipgloss.JoinHorizontal(lipgloss.Top, form, status) + + footer := m.appBoundaryView(m.form.Help().ShortHelpView(m.form.KeyBinds())) + if len(errors) > 0 { + footer = m.appErrorBoundaryView("") + } + + return s.Base.Render(header + "\n" + body + "\n\n" + footer) + } +} + +func (m Model) errorView() string { + var s string + for _, err := range m.form.Errors() { + s += err.Error() + } + return s +} + +func (m Model) appBoundaryView(text string) string { + return lipgloss.PlaceHorizontal( + m.width, + lipgloss.Left, + m.styles.HeaderText.Render(text), + lipgloss.WithWhitespaceChars("="), + lipgloss.WithWhitespaceForeground(indigo), + ) +} + +func (m Model) appErrorBoundaryView(text string) string { + return lipgloss.PlaceHorizontal( + m.width, + lipgloss.Left, + m.styles.ErrorHeaderText.Render(text), + lipgloss.WithWhitespaceChars("="), + lipgloss.WithWhitespaceForeground(red), + ) +} + +func (m Model) generatePkl() string { + schemaType := m.form.GetString("schemaType") + schema := m.form.GetString("schema") + + // This is a placeholder for the actual conversion logic + // In a real implementation, you would parse the schema and generate Pkl code + return fmt.Sprintf("// Converted from %s\n\nclass ConvertedSchema {\n // TODO: Implement conversion from %s\n // Original schema:\n /*\n%s\n */\n}", schemaType, schemaType, schema) +} + +func (m *Model) buildMessage() { + from := m.form.GetString("from") + to := m.form.GetString("to") + amount := m.form.GetString("amount") + denom := m.form.GetString("denom") + memo := m.form.GetString("memo") + + coin, _ := sdk.ParseCoinNormalized(fmt.Sprintf("%s%s", amount, denom)) + sendMsg := &banktypes.MsgSend{ + FromAddress: from, + ToAddress: to, + Amount: sdk.NewCoins(coin), + } + + anyMsg, _ := codectypes.NewAnyWithValue(sendMsg) + m.message = &tx.TxBody{ + Messages: []*codectypes.Any{anyMsg}, + Memo: memo, + } +} + +func (m Model) getMessageView() string { + if m.message == nil { + return "Current Message: None" + } + + interfaceRegistry := codectypes.NewInterfaceRegistry() + marshaler := codec.NewProtoCodec(interfaceRegistry) + jsonBytes, _ := marshaler.MarshalJSON(m.message) + + return fmt.Sprintf("Current Message:\n%s", string(jsonBytes)) +} + +func RunBuildTxnTUI() (*tx.TxBody, error) { + m := NewModel() + p := tea.NewProgram(m) + + finalModel, err := p.Run() + if err != nil { + return nil, fmt.Errorf("failed to run program: %w", err) + } + + finalM, ok := finalModel.(Model) + if !ok || finalM.message == nil { + return nil, fmt.Errorf("form not completed") + } + + return finalM.message, nil +} diff --git a/internal/dwn/handlers/auth.go b/internal/dwn/handlers/auth.go new file mode 100644 index 000000000..d725449a3 --- /dev/null +++ b/internal/dwn/handlers/auth.go @@ -0,0 +1,43 @@ +package handlers + +import ( + "encoding/json" + "fmt" + + "github.com/go-webauthn/webauthn/protocol" + "github.com/labstack/echo/v4" +) + +func checkSubjectIsValid(e echo.Context) error { + credentialID := e.FormValue("credentialID") + return e.JSON(200, credentialID) +} + +func handleCredentialAssertion(e echo.Context) error { + return e.JSON(200, "HandleCredentialAssertion") +} + +func handleCredentialCreation(e echo.Context) error { + // Get the serialized credential data from the form + credentialDataJSON := e.FormValue("credentialData") + + // Deserialize the JSON into a temporary struct + var ccr protocol.CredentialCreationResponse + err := json.Unmarshal([]byte(credentialDataJSON), &ccr) + if err != nil { + return e.JSON(500, err.Error()) + } + // + // // Parse the CredentialCreationResponse + // parsedData, err := ccr.Parse() + // if err != nil { + // return e.JSON(500, err.Error()) + // } + // + // // Create the Credential + // // credential := orm.NewCredential(parsedData, e.Request().Host, "") + // + // // Set additional fields + // credential.Controller = "" // Set this to the appropriate controller value + return e.JSON(200, fmt.Sprintf("REGISTER: %s", string(ccr.ID))) +} diff --git a/internal/dwn/handlers/manifest.go b/internal/dwn/handlers/manifest.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/internal/dwn/handlers/manifest.go @@ -0,0 +1 @@ +package handlers diff --git a/internal/dwn/handlers/openid.go b/internal/dwn/handlers/openid.go new file mode 100644 index 000000000..0d981247f --- /dev/null +++ b/internal/dwn/handlers/openid.go @@ -0,0 +1,23 @@ +package handlers + +import ( + "github.com/labstack/echo/v4" +) + +func grantAuthorization(e echo.Context) error { + // Implement authorization endpoint using passkey authentication + // Store session data in cache + return nil +} + +func getJWKS(e echo.Context) error { + // Implement token endpoint + // Use cached session data for validation + return nil +} + +func getToken(e echo.Context) error { + // Implement token endpoint + // Use cached session data for validation + return nil +} diff --git a/internal/dwn/handlers/routes.go b/internal/dwn/handlers/routes.go new file mode 100644 index 000000000..0b8af5917 --- /dev/null +++ b/internal/dwn/handlers/routes.go @@ -0,0 +1,22 @@ +package handlers + +import ( + "github.com/labstack/echo/v4" + middleware "github.com/onsonr/sonr/internal/dwn/middleware" +) + +func RegisterState(e *echo.Echo) { + g := e.Group("state") + g.POST("/login/:identifier", handleCredentialAssertion) + // g.GET("/discovery", state.GetDiscovery) + g.GET("/jwks", getJWKS) + g.GET("/token", getToken) + g.POST("/:origin/grant/:subject", grantAuthorization) + g.POST("/register/:subject", handleCredentialCreation) + g.POST("/register/:subject/check", checkSubjectIsValid) +} + +func RegisterSync(e *echo.Echo) { + g := e.Group("sync") + g.Use(middleware.MacaroonMiddleware("test", "test")) +} diff --git a/internal/dwn/handlers/views.go b/internal/dwn/handlers/views.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/internal/dwn/handlers/views.go @@ -0,0 +1 @@ +package handlers diff --git a/internal/dwn/handlers/wellknown.go b/internal/dwn/handlers/wellknown.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/internal/dwn/handlers/wellknown.go @@ -0,0 +1 @@ +package handlers diff --git a/internal/dwn/main.go b/internal/dwn/main.go new file mode 100644 index 000000000..6aad26089 --- /dev/null +++ b/internal/dwn/main.go @@ -0,0 +1,141 @@ +//go:build js && wasm +// +build js,wasm + +package main + +import ( + "bytes" + "fmt" + "io" + "net/http" + "net/http/httptest" + "strings" + "syscall/js" + + "github.com/labstack/echo/v4" + promise "github.com/nlepage/go-js-promise" + "github.com/onsonr/sonr/internal/dwn/handlers" + "github.com/onsonr/sonr/internal/dwn/middleware" + "github.com/onsonr/sonr/pkg/nebula" +) + +func main() { + e := echo.New() + e.Use(middleware.UseSession) + nebula.RouteViews(e) + handlers.RegisterState(e) + Serve(e) +} + +// Serve serves HTTP requests using handler or http.DefaultServeMux if handler is nil. +func Serve(handler http.Handler) func() { + h := handler + if h == nil { + h = http.DefaultServeMux + } + + prefix := js.Global().Get("wasmhttp").Get("path").String() + for strings.HasSuffix(prefix, "/") { + prefix = strings.TrimSuffix(prefix, "/") + } + + if prefix != "" { + mux := http.NewServeMux() + mux.Handle(prefix+"/", http.StripPrefix(prefix, h)) + h = mux + } + + cb := js.FuncOf(func(_ js.Value, args []js.Value) interface{} { + resPromise, resolve, reject := promise.New() + + go func() { + defer func() { + if r := recover(); r != nil { + if err, ok := r.(error); ok { + reject(fmt.Sprintf("wasmhttp: panic: %+v\n", err)) + } else { + reject(fmt.Sprintf("wasmhttp: panic: %v\n", r)) + } + } + }() + + res := NewResponseRecorder() + + h.ServeHTTP(res, Request(args[0])) + + resolve(res.JSResponse()) + }() + + return resPromise + }) + + js.Global().Get("wasmhttp").Call("setHandler", cb) + + return cb.Release +} + +// Request builds and returns the equivalent http.Request +func Request(r js.Value) *http.Request { + jsBody := js.Global().Get("Uint8Array").New(promise.Await(r.Call("arrayBuffer"))) + body := make([]byte, jsBody.Get("length").Int()) + js.CopyBytesToGo(body, jsBody) + + req := httptest.NewRequest( + r.Get("method").String(), + r.Get("url").String(), + bytes.NewBuffer(body), + ) + + headersIt := r.Get("headers").Call("entries") + for { + e := headersIt.Call("next") + if e.Get("done").Bool() { + break + } + v := e.Get("value") + req.Header.Set(v.Index(0).String(), v.Index(1).String()) + } + + return req +} + +// ResponseRecorder uses httptest.ResponseRecorder to build a JS Response +type ResponseRecorder struct { + *httptest.ResponseRecorder +} + +// NewResponseRecorder returns a new ResponseRecorder +func NewResponseRecorder() ResponseRecorder { + return ResponseRecorder{httptest.NewRecorder()} +} + +// JSResponse builds and returns the equivalent JS Response +func (rr ResponseRecorder) JSResponse() js.Value { + res := rr.Result() + + body := js.Undefined() + if res.ContentLength != 0 { + b, err := io.ReadAll(res.Body) + if err != nil { + panic(err) + } + body = js.Global().Get("Uint8Array").New(len(b)) + js.CopyBytesToJS(body, b) + } + + init := make(map[string]interface{}, 2) + + if res.StatusCode != 0 { + init["status"] = res.StatusCode + } + + if len(res.Header) != 0 { + headers := make(map[string]interface{}, len(res.Header)) + for k := range res.Header { + headers[k] = res.Header.Get(k) + } + init["headers"] = headers + } + + return js.Global().Get("Response").New(body, init) +} diff --git a/internal/dwn/middleware/headers.go b/internal/dwn/middleware/headers.go new file mode 100644 index 000000000..eecdecffc --- /dev/null +++ b/internal/dwn/middleware/headers.go @@ -0,0 +1,55 @@ +package middleware + +type RequestHeaders struct { + Authorization *string `header:"Authorization"` + CacheControl *string `header:"Cache-Control"` + DeviceMemory *string `header:"Device-Memory"` + Forwarded *string `header:"Forwarded"` + From *string `header:"From"` + Host *string `header:"Host"` + Link *string `header:"Link"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + Referer *string `header:"Referer"` + UserAgent *string `header:"User-Agent"` + ViewportWidth *string `header:"Viewport-Width"` + Width *string `header:"Width"` + WWWAuthenticate *string `header:"WWW-Authenticate"` + + // HTMX Specific + HXBoosted *string `header:"HX-Boosted"` + HXCurrentURL *string `header:"HX-Current-URL"` + HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"` + HXPrompt *string `header:"HX-Prompt"` + HXRequest *string `header:"HX-Request"` + HXTarget *string `header:"HX-Target"` + HXTriggerName *string `header:"HX-Trigger-Name"` + HXTrigger *string `header:"HX-Trigger"` +} + +type ResponseHeaders struct { + AcceptCH *string `header:"Accept-CH"` + AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"` + AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"` + AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"` + AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"` + AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"` + ContentSecurityPolicy *string `header:"Content-Security-Policy"` + CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + WWWAuthenticate *string `header:"WWW-Authenticate"` + + // HTMX Specific + HXLocation *string `header:"HX-Location"` + HXPushURL *string `header:"HX-Push-Url"` + HXRedirect *string `header:"HX-Redirect"` + HXRefresh *string `header:"HX-Refresh"` + HXReplaceURL *string `header:"HX-Replace-Url"` + HXReswap *string `header:"HX-Reswap"` + HXRetarget *string `header:"HX-Retarget"` + HXReselect *string `header:"HX-Reselect"` + HXTrigger *string `header:"HX-Trigger"` + HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"` + HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"` +} diff --git a/internal/dwn/middleware/middleware.go b/internal/dwn/middleware/middleware.go new file mode 100644 index 000000000..32b681a86 --- /dev/null +++ b/internal/dwn/middleware/middleware.go @@ -0,0 +1,63 @@ +package middleware + +import ( + "net/http" + + "github.com/labstack/echo/v4" + "gopkg.in/macaroon.v2" +) + +// GetSession returns the current Session +func GetSession(c echo.Context) *Session { + return c.(*Session) +} + +// UseSession establishes a Session Cookie. +func UseSession(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + sc := initSession(c) + headers := new(RequestHeaders) + sc.Bind(headers) + return next(sc) + } +} + +func MacaroonMiddleware(secretKeyStr string, location string) echo.MiddlewareFunc { + secretKey := []byte(secretKeyStr) + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + // Extract the macaroon from the Authorization header + auth := c.Request().Header.Get("Authorization") + if auth == "" { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Missing Authorization header"}) + } + + // Decode the macaroon + mac, err := macaroon.Base64Decode([]byte(auth)) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon encoding"}) + } + + token, err := macaroon.New(secretKey, mac, location, macaroon.LatestVersion) + if err != nil { + return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon"}) + } + + // Verify the macaroon + err = token.Verify(secretKey, func(caveat string) error { + for _, c := range MacroonCaveats { + if c.String() == caveat { + return nil + } + } + return nil // Return nil if the caveat is valid + }, nil) + if err != nil { + return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Invalid macaroon"}) + } + + // Macaroon is valid, proceed to the next handler + return next(c) + } + } +} diff --git a/internal/dwn/middleware/session.go b/internal/dwn/middleware/session.go new file mode 100644 index 000000000..a98b1a761 --- /dev/null +++ b/internal/dwn/middleware/session.go @@ -0,0 +1,51 @@ +package middleware + +import ( + "net/http" + "time" + + "github.com/donseba/go-htmx" + "github.com/labstack/echo/v4" + "github.com/segmentio/ksuid" +) + +type Session struct { + echo.Context + htmx *htmx.HTMX +} + +func (c *Session) Htmx() *htmx.HTMX { + return c.htmx +} + +func (c *Session) ID() string { + return ReadCookie(c, "session") +} + +func initSession(c echo.Context) *Session { + s := &Session{Context: c} + if val := ReadCookie(c, "session"); val == "" { + id := ksuid.New().String() + WriteCookie(c, "session", id) + } + return s +} + +func ReadCookie(c echo.Context, key string) string { + cookie, err := c.Cookie(key) + if err != nil { + return "" + } + if cookie == nil { + return "" + } + return cookie.Value +} + +func WriteCookie(c echo.Context, key string, value string) { + cookie := new(http.Cookie) + cookie.Name = key + cookie.Value = value + cookie.Expires = time.Now().Add(24 * time.Hour) + c.SetCookie(cookie) +} diff --git a/internal/dwn/middleware/token.go b/internal/dwn/middleware/token.go new file mode 100644 index 000000000..5c462003c --- /dev/null +++ b/internal/dwn/middleware/token.go @@ -0,0 +1,51 @@ +package middleware + +import ( + "fmt" + "time" +) + +const ( + OriginMacroonCaveat MacroonCaveat = "origin" + ScopesMacroonCaveat MacroonCaveat = "scopes" + SubjectMacroonCaveat MacroonCaveat = "subject" + ExpMacroonCaveat MacroonCaveat = "exp" + TokenMacroonCaveat MacroonCaveat = "token" +) + +type MacroonCaveat string + +func (c MacroonCaveat) Equal(other string) bool { + return string(c) == other +} + +func (c MacroonCaveat) String() string { + return string(c) +} + +func (c MacroonCaveat) Verify(value string) error { + switch c { + case OriginMacroonCaveat: + return nil + case ScopesMacroonCaveat: + return nil + case SubjectMacroonCaveat: + return nil + case ExpMacroonCaveat: + // Check if the expiration time is still valid + exp, err := time.Parse(time.RFC3339, value) + if err != nil { + return err + } + if time.Now().After(exp) { + return fmt.Errorf("expired") + } + return nil + case TokenMacroonCaveat: + return nil + default: + return fmt.Errorf("unknown caveat: %s", c) + } +} + +var MacroonCaveats = []MacroonCaveat{OriginMacroonCaveat, ScopesMacroonCaveat, SubjectMacroonCaveat, ExpMacroonCaveat, TokenMacroonCaveat} diff --git a/internal/gui/elements/alert_templ.go b/internal/gui/elements/alert_templ.go index 9e21f5df5..0a95440bb 100644 --- a/internal/gui/elements/alert_templ.go +++ b/internal/gui/elements/alert_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -15,6 +15,9 @@ func Alert(variant Variant, icon Icon, title, message string) templ.Component { func alertElement(attrs templ.Attributes, title, message string, icon templ.Component) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/animation_templ.go b/internal/gui/elements/animation_templ.go index facdbf620..523e659da 100644 --- a/internal/gui/elements/animation_templ.go +++ b/internal/gui/elements/animation_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func Animation() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/badge_templ.go b/internal/gui/elements/badge_templ.go index 7d70a6e32..c7dd81760 100644 --- a/internal/gui/elements/badge_templ.go +++ b/internal/gui/elements/badge_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func PoweredBySonr() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/breadcrumbs_templ.go b/internal/gui/elements/breadcrumbs_templ.go index fd10e29ed..219bb897f 100644 --- a/internal/gui/elements/breadcrumbs_templ.go +++ b/internal/gui/elements/breadcrumbs_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func Breadcrumbs() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -69,6 +72,9 @@ func Breadcrumbs() templ.Component { func breadcrumbItem(title string, active bool) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -128,6 +134,9 @@ func breadcrumbItem(title string, active bool) templ.Component { func breadcrumbIcon() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/button_templ.go b/internal/gui/elements/button_templ.go index 95f6f7533..ad66da28e 100644 --- a/internal/gui/elements/button_templ.go +++ b/internal/gui/elements/button_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -87,6 +87,9 @@ func Button(opts ...ButtonOpt) templ.Component { func renderButton(attrs templ.Attributes) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -129,6 +132,9 @@ func renderButton(attrs templ.Attributes) templ.Component { func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -223,6 +229,9 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component { func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/card_templ.go b/internal/gui/elements/card_templ.go index 9636e8d1f..6e086c670 100644 --- a/internal/gui/elements/card_templ.go +++ b/internal/gui/elements/card_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -15,6 +15,9 @@ func Card(id string, size Size) templ.Component { func renderCard(id string, attrs templ.Attributes) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -70,6 +73,9 @@ func renderCard(id string, attrs templ.Attributes) templ.Component { func ProfileCard() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/fonts_templ.go b/internal/gui/elements/fonts_templ.go index c881cd20a..4022c9887 100644 --- a/internal/gui/elements/fonts_templ.go +++ b/internal/gui/elements/fonts_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -27,6 +27,9 @@ func Text(content string) templ.Component { func renderText(level int, text string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -123,6 +126,9 @@ func renderText(level int, text string) templ.Component { func renderLink(attrs templ.Attributes, text string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -170,6 +176,9 @@ func renderLink(attrs templ.Attributes, text string) templ.Component { func renderStrong(attrs templ.Attributes, text string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -217,6 +226,9 @@ func renderStrong(attrs templ.Attributes, text string) templ.Component { func renderEmphasis(attrs templ.Attributes, text string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -264,6 +276,9 @@ func renderEmphasis(attrs templ.Attributes, text string) templ.Component { func renderCode(attrs templ.Attributes, text string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/global_templ.go b/internal/gui/elements/global_templ.go index 46606b039..d9a36c6e7 100644 --- a/internal/gui/elements/global_templ.go +++ b/internal/gui/elements/global_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func Layout(title string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -66,6 +69,9 @@ func Layout(title string) templ.Component { func Spacer() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -92,6 +98,9 @@ func Spacer() templ.Component { func ServiceWorker(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 + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -118,6 +127,9 @@ func ServiceWorker(path string) templ.Component { func defaultStyles() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -144,6 +156,9 @@ func defaultStyles() templ.Component { func Rows() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -178,6 +193,9 @@ func Rows() templ.Component { func Columns() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/icons_templ.go b/internal/gui/elements/icons_templ.go index 9bb3c551a..1b45bb48f 100644 --- a/internal/gui/elements/icons_templ.go +++ b/internal/gui/elements/icons_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -24,6 +24,9 @@ func (v Icons) Render() templ.Component { func renderIconVariant(v Icons) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -72,6 +75,9 @@ func renderIconVariant(v Icons) templ.Component { func SonrIcon() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/inputs_templ.go b/internal/gui/elements/inputs_templ.go index 31088115b..545265f72 100644 --- a/internal/gui/elements/inputs_templ.go +++ b/internal/gui/elements/inputs_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -19,6 +19,9 @@ const ( func TextInput(state InputState, label string, placeholder string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/radios_templ.go b/internal/gui/elements/radios_templ.go index 5a91c9f7c..0f69a82fa 100644 --- a/internal/gui/elements/radios_templ.go +++ b/internal/gui/elements/radios_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func RadioGroup() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/elements/sizes_templ.go b/internal/gui/elements/sizes_templ.go index 20bc7d8b4..5a60b8fef 100644 --- a/internal/gui/elements/sizes_templ.go +++ b/internal/gui/elements/sizes_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/gui/elements/tabs_templ.go b/internal/gui/elements/tabs_templ.go index a5ab4fc09..9b974744e 100644 --- a/internal/gui/elements/tabs_templ.go +++ b/internal/gui/elements/tabs_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package elements //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func Tabs() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -45,6 +48,9 @@ func Tabs() templ.Component { func Table() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/forms/register_templ.go b/internal/gui/forms/register_templ.go index 99dbc9976..a9309199a 100644 --- a/internal/gui/forms/register_templ.go +++ b/internal/gui/forms/register_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package forms //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -13,6 +13,9 @@ import "github.com/labstack/echo/v4" func BasicInfo(c echo.Context, state FormState) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -42,6 +45,9 @@ func BasicInfo(c echo.Context, state FormState) templ.Component { func CreateCredentials(state FormState) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -64,6 +70,9 @@ func CreateCredentials(state FormState) templ.Component { func PrivacyTerms(state FormState) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/views/home_templ.go b/internal/gui/views/home_templ.go index 8259d8a94..1254e7d14 100644 --- a/internal/gui/views/home_templ.go +++ b/internal/gui/views/home_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package views //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -20,6 +20,9 @@ func HomeView(c echo.Context) error { func renderHomeView() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/views/login_templ.go b/internal/gui/views/login_templ.go index 7ec36e580..87d103eb0 100644 --- a/internal/gui/views/login_templ.go +++ b/internal/gui/views/login_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package views //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -20,6 +20,9 @@ func LoginView(c echo.Context) error { func renderLoginView() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/views/openid_templ.go b/internal/gui/views/openid_templ.go index 1f62a9b5d..d0c6a899a 100644 --- a/internal/gui/views/openid_templ.go +++ b/internal/gui/views/openid_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package views //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -20,6 +20,9 @@ func AuthorizeView(c echo.Context) error { func renderAuthorizeView() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/views/profile_templ.go b/internal/gui/views/profile_templ.go index 189837b19..08af9920c 100644 --- a/internal/gui/views/profile_templ.go +++ b/internal/gui/views/profile_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package views //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -20,6 +20,9 @@ func ProfileView(c echo.Context) error { func renderProfileView() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/gui/views/register_templ.go b/internal/gui/views/register_templ.go index 3a10827f4..d54ee67bd 100644 --- a/internal/gui/views/register_templ.go +++ b/internal/gui/views/register_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.2.778 package views //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -21,6 +21,9 @@ func RegisterView(c echo.Context) error { func renderRegisterView(c echo.Context) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { diff --git a/internal/orm/Account.pkl.go b/internal/orm/Account.pkl.go new file mode 100644 index 000000000..9bf3f02f4 --- /dev/null +++ b/internal/orm/Account.pkl.go @@ -0,0 +1,20 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Account struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty"` + + Address any `pkl:"address" json:"address,omitempty"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"` + + ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"` + + Index int `pkl:"index" json:"index,omitempty"` + + Controller string `pkl:"controller" json:"controller,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` +} diff --git a/internal/orm/Asset.pkl.go b/internal/orm/Asset.pkl.go new file mode 100644 index 000000000..7fdfaebc0 --- /dev/null +++ b/internal/orm/Asset.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Asset struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty"` + + Symbol string `pkl:"symbol" json:"symbol,omitempty"` + + Decimals int `pkl:"decimals" json:"decimals,omitempty"` + + ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` +} diff --git a/internal/orm/Chain.pkl.go b/internal/orm/Chain.pkl.go new file mode 100644 index 000000000..6fa443c58 --- /dev/null +++ b/internal/orm/Chain.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Chain struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Name string `pkl:"name" json:"name,omitempty"` + + NetworkId string `pkl:"networkId" json:"networkId,omitempty"` + + ChainCode uint `pkl:"chainCode" json:"chainCode,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` +} diff --git a/internal/orm/Credential.pkl.go b/internal/orm/Credential.pkl.go new file mode 100644 index 000000000..138ce7f88 --- /dev/null +++ b/internal/orm/Credential.pkl.go @@ -0,0 +1,40 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Credential struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Subject string `pkl:"subject" json:"subject,omitempty"` + + Controller string `pkl:"controller" json:"controller,omitempty"` + + AttestationType string `pkl:"attestationType" json:"attestationType,omitempty"` + + Origin string `pkl:"origin" json:"origin,omitempty"` + + Label *string `pkl:"label" json:"label,omitempty"` + + DeviceId *string `pkl:"deviceId" json:"deviceId,omitempty"` + + CredentialId string `pkl:"credentialId" json:"credentialId,omitempty"` + + PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"` + + Transport []string `pkl:"transport" json:"transport,omitempty"` + + SignCount uint `pkl:"signCount" json:"signCount,omitempty"` + + UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty"` + + UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty"` + + BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty"` + + BackupState bool `pkl:"backupState" json:"backupState,omitempty"` + + CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` +} diff --git a/internal/orm/Grant.pkl.go b/internal/orm/Grant.pkl.go new file mode 100644 index 000000000..b5b4d1e3d --- /dev/null +++ b/internal/orm/Grant.pkl.go @@ -0,0 +1,20 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Grant struct { + Id uint `pkl:"id" json:"id,omitempty" query:"id"` + + Subject string `pkl:"subject" json:"subject,omitempty"` + + Controller string `pkl:"controller" json:"controller,omitempty"` + + Origin string `pkl:"origin" json:"origin,omitempty"` + + Token string `pkl:"token" json:"token,omitempty"` + + Scopes []string `pkl:"scopes" json:"scopes,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` +} diff --git a/internal/orm/JWK.pkl.go b/internal/orm/JWK.pkl.go new file mode 100644 index 000000000..3cd3f044f --- /dev/null +++ b/internal/orm/JWK.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type JWK struct { + Kty string `pkl:"kty" json:"kty,omitempty"` + + Crv string `pkl:"crv" json:"crv,omitempty"` + + X string `pkl:"x" json:"x,omitempty"` + + Y string `pkl:"y" json:"y,omitempty"` + + N string `pkl:"n" json:"n,omitempty"` + + E string `pkl:"e" json:"e,omitempty"` +} diff --git a/internal/orm/Keyshare.pkl.go b/internal/orm/Keyshare.pkl.go new file mode 100644 index 000000000..cbc8b356f --- /dev/null +++ b/internal/orm/Keyshare.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Keyshare struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Data string `pkl:"data" json:"data,omitempty"` + + Role int `pkl:"role" json:"role,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` + + LastRefreshed *string `pkl:"lastRefreshed" json:"lastRefreshed,omitempty"` +} diff --git a/internal/orm/Orm.pkl.go b/internal/orm/Orm.pkl.go new file mode 100644 index 000000000..0c1f09dbc --- /dev/null +++ b/internal/orm/Orm.pkl.go @@ -0,0 +1,39 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Orm struct { + DbName string `pkl:"db_name"` + + DbVersion int `pkl:"db_version"` +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm +func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) { + var ret Orm + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/internal/orm/Profile.pkl.go b/internal/orm/Profile.pkl.go new file mode 100644 index 000000000..794e4e352 --- /dev/null +++ b/internal/orm/Profile.pkl.go @@ -0,0 +1,20 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +type Profile struct { + Id string `pkl:"id" json:"id,omitempty" query:"id"` + + Subject string `pkl:"subject" json:"subject,omitempty"` + + Controller string `pkl:"controller" json:"controller,omitempty"` + + OriginUri *string `pkl:"originUri" json:"originUri,omitempty"` + + PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty"` + + PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty"` + + CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"` + + UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"` +} diff --git a/internal/orm/PublicKey.pkl.go b/internal/orm/PublicKey.pkl.go new file mode 100644 index 000000000..a81904913 --- /dev/null +++ b/internal/orm/PublicKey.pkl.go @@ -0,0 +1,26 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +import ( + "github.com/onsonr/sonr/internal/orm/keyalgorithm" + "github.com/onsonr/sonr/internal/orm/keycurve" + "github.com/onsonr/sonr/internal/orm/keyencoding" + "github.com/onsonr/sonr/internal/orm/keyrole" + "github.com/onsonr/sonr/internal/orm/keytype" +) + +type PublicKey struct { + Role keyrole.KeyRole `pkl:"role" json:"role,omitempty" query:"role"` + + Algorithm keyalgorithm.KeyAlgorithm `pkl:"algorithm"` + + Encoding keyencoding.KeyEncoding `pkl:"encoding"` + + Curve keycurve.KeyCurve `pkl:"curve"` + + KeyType keytype.KeyType `pkl:"key_type"` + + Raw string `pkl:"raw"` + + Jwk *JWK `pkl:"jwk"` +} diff --git a/internal/orm/assettype/AssetType.pkl.go b/internal/orm/assettype/AssetType.pkl.go new file mode 100644 index 000000000..ba491f869 --- /dev/null +++ b/internal/orm/assettype/AssetType.pkl.go @@ -0,0 +1,46 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package assettype + +import ( + "encoding" + "fmt" +) + +type AssetType string + +const ( + Native AssetType = "native" + Wrapped AssetType = "wrapped" + Staking AssetType = "staking" + Pool AssetType = "pool" + Ibc AssetType = "ibc" + Cw20 AssetType = "cw20" +) + +// String returns the string representation of AssetType +func (rcv AssetType) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(AssetType) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for AssetType. +func (rcv *AssetType) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "native": + *rcv = Native + case "wrapped": + *rcv = Wrapped + case "staking": + *rcv = Staking + case "pool": + *rcv = Pool + case "ibc": + *rcv = Ibc + case "cw20": + *rcv = Cw20 + default: + return fmt.Errorf(`illegal: "%s" is not a valid AssetType`, str) + } + return nil +} diff --git a/internal/orm/bip44.go b/internal/orm/bip44.go new file mode 100644 index 000000000..a48b40b2e --- /dev/null +++ b/internal/orm/bip44.go @@ -0,0 +1,116 @@ +package orm + +import ( + "crypto/hmac" + "crypto/sha512" + "encoding/binary" + "encoding/hex" + "errors" + "math/big" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/onsonr/sonr/internal/orm/didmethod" +) + +type ChainCode uint32 + +func GetChainCode(m didmethod.DIDMethod) ChainCode { + switch m { + case didmethod.Bitcoin: + return 0 // 0 + case didmethod.Ethereum: + return 64 // 60 + case didmethod.Ibc: + return 118 // 118 + case didmethod.Sonr: + return 703 // 703 + default: + return 0 + } +} + +func FormatAddress(pubKey *PublicKey, m didmethod.DIDMethod) (string, error) { + hexPubKey, err := hex.DecodeString(pubKey.Raw) + if err != nil { + return "", err + } + + // switch m { + // case didmethod.Bitcoin: + // return bech32.Encode("bc", pubKey.Bytes()) + // + // case didmethod.Ethereum: + // epk, err := pubKey.ECDSA() + // if err != nil { + // return "", err + // } + // return ComputeEthAddress(*epk), nil + // + // case didmethod.Sonr: + // return bech32.Encode("idx", hexPubKey) + // + // case didmethod.Ibc: + // return bech32.Encode("cosmos", hexPubKey) + // + // } + return string(hexPubKey), nil +} + +// ComputeAccountPublicKey computes the public key of a child key given the extended public key, chain code, and index. +func ComputeBip32AccountPublicKey(extPubKey PublicKey, chainCode ChainCode, index int) (*PublicKey, error) { + // Check if the index is a hardened child key + if chainCode&0x80000000 != 0 && index < 0 { + return nil, errors.New("invalid index") + } + + hexPubKey, err := hex.DecodeString(extPubKey.Raw) + if err != nil { + return nil, err + } + + // Serialize the public key + pubKey, err := btcec.ParsePubKey(hexPubKey) + if err != nil { + return nil, err + } + pubKeyBytes := pubKey.SerializeCompressed() + + // Serialize the index + indexBytes := make([]byte, 4) + binary.BigEndian.PutUint32(indexBytes, uint32(index)) + + // Compute the HMAC-SHA512 + mac := hmac.New(sha512.New, []byte{byte(chainCode)}) + mac.Write(pubKeyBytes) + mac.Write(indexBytes) + I := mac.Sum(nil) + + // Split I into two 32-byte sequences + IL := I[:32] + + // Convert IL to a big integer + ilNum := new(big.Int).SetBytes(IL) + + // Check if parse256(IL) >= n + curve := btcec.S256() + if ilNum.Cmp(curve.N) >= 0 { + return nil, errors.New("invalid child key") + } + + // Compute the child public key + ilx, ily := curve.ScalarBaseMult(IL) + childX, childY := curve.Add(ilx, ily, pubKey.X(), pubKey.Y()) + lx := newBigIntFieldVal(childX) + ly := newBigIntFieldVal(childY) + + // Create the child public key + _ = btcec.NewPublicKey(lx, ly) + return &PublicKey{}, nil +} + +// newBigIntFieldVal creates a new field value from a big integer. +func newBigIntFieldVal(val *big.Int) *btcec.FieldVal { + lx := new(btcec.FieldVal) + lx.SetByteSlice(val.Bytes()) + return lx +} diff --git a/internal/orm/browser/AuthenticatorSelectionCriteria.pkl.go b/internal/orm/browser/AuthenticatorSelectionCriteria.pkl.go new file mode 100644 index 000000000..a53b382f2 --- /dev/null +++ b/internal/orm/browser/AuthenticatorSelectionCriteria.pkl.go @@ -0,0 +1,10 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type AuthenticatorSelectionCriteria struct { + AuthenticatorAttachment string `pkl:"authenticatorAttachment"` + + RequireResidentKey bool `pkl:"requireResidentKey"` + + UserVerification string `pkl:"userVerification"` +} diff --git a/internal/orm/browser/Browser.pkl.go b/internal/orm/browser/Browser.pkl.go new file mode 100644 index 000000000..3943b79a5 --- /dev/null +++ b/internal/orm/browser/Browser.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Browser struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Browser +func LoadFromPath(ctx context.Context, path string) (ret *Browser, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Browser +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Browser, error) { + var ret Browser + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/internal/orm/browser/PublicKeyCredentialCreationOptions.pkl.go b/internal/orm/browser/PublicKeyCredentialCreationOptions.pkl.go new file mode 100644 index 000000000..db72fb8fe --- /dev/null +++ b/internal/orm/browser/PublicKeyCredentialCreationOptions.pkl.go @@ -0,0 +1,22 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type PublicKeyCredentialCreationOptions struct { + Rp *RpEntity `pkl:"rp"` + + User *UserEntity `pkl:"user"` + + Challenge string `pkl:"challenge"` + + PubKeyCredParams []*PublicKeyCredentialParameters `pkl:"pubKeyCredParams"` + + Timeout int `pkl:"timeout"` + + ExcludeCredentials []*PublicKeyCredentialDescriptor `pkl:"excludeCredentials"` + + AuthenticatorSelection *AuthenticatorSelectionCriteria `pkl:"authenticatorSelection"` + + Attestation string `pkl:"attestation"` + + Extensions []*PublicKeyCredentialParameters `pkl:"extensions"` +} diff --git a/internal/orm/browser/PublicKeyCredentialDescriptor.pkl.go b/internal/orm/browser/PublicKeyCredentialDescriptor.pkl.go new file mode 100644 index 000000000..ac66c213b --- /dev/null +++ b/internal/orm/browser/PublicKeyCredentialDescriptor.pkl.go @@ -0,0 +1,10 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type PublicKeyCredentialDescriptor struct { + Id string `pkl:"id"` + + Transports []string `pkl:"transports"` + + Type string `pkl:"type"` +} diff --git a/internal/orm/browser/PublicKeyCredentialParameters.pkl.go b/internal/orm/browser/PublicKeyCredentialParameters.pkl.go new file mode 100644 index 000000000..7c7492bda --- /dev/null +++ b/internal/orm/browser/PublicKeyCredentialParameters.pkl.go @@ -0,0 +1,8 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type PublicKeyCredentialParameters struct { + Type string `pkl:"type"` + + Alg *int `pkl:"alg"` +} diff --git a/internal/orm/browser/PublicKeyCredentialRequestOptions.pkl.go b/internal/orm/browser/PublicKeyCredentialRequestOptions.pkl.go new file mode 100644 index 000000000..f494a9fcb --- /dev/null +++ b/internal/orm/browser/PublicKeyCredentialRequestOptions.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type PublicKeyCredentialRequestOptions struct { + Challenge string `pkl:"challenge"` + + Timeout int `pkl:"timeout"` + + RpId string `pkl:"rpId"` + + AllowCredentials []*PublicKeyCredentialDescriptor `pkl:"allowCredentials"` + + UserVerification string `pkl:"userVerification"` + + Extensions []*PublicKeyCredentialParameters `pkl:"extensions"` +} diff --git a/internal/orm/browser/RpEntity.pkl.go b/internal/orm/browser/RpEntity.pkl.go new file mode 100644 index 000000000..facd857a2 --- /dev/null +++ b/internal/orm/browser/RpEntity.pkl.go @@ -0,0 +1,10 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type RpEntity struct { + Id string `pkl:"id"` + + Name *string `pkl:"name"` + + Icon *string `pkl:"icon"` +} diff --git a/internal/orm/browser/SWT.pkl.go b/internal/orm/browser/SWT.pkl.go new file mode 100644 index 000000000..32e9ebe54 --- /dev/null +++ b/internal/orm/browser/SWT.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type SWT struct { + Origin string `pkl:"origin"` + + Location string `pkl:"location"` + + Identifier string `pkl:"identifier"` + + Scopes []string `pkl:"scopes"` + + Properties map[string]string `pkl:"properties"` + + ExpiryBlock int `pkl:"expiryBlock"` +} diff --git a/internal/orm/browser/UserEntity.pkl.go b/internal/orm/browser/UserEntity.pkl.go new file mode 100644 index 000000000..6b99cb2b8 --- /dev/null +++ b/internal/orm/browser/UserEntity.pkl.go @@ -0,0 +1,10 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +type UserEntity struct { + Id string `pkl:"id"` + + DisplayName *string `pkl:"displayName"` + + Name *string `pkl:"name"` +} diff --git a/internal/orm/browser/init.pkl.go b/internal/orm/browser/init.pkl.go new file mode 100644 index 000000000..df843093c --- /dev/null +++ b/internal/orm/browser/init.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `browser`. DO NOT EDIT. +package browser + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("browser", Browser{}) + pkl.RegisterMapping("browser#PublicKeyCredentialRequestOptions", PublicKeyCredentialRequestOptions{}) + pkl.RegisterMapping("browser#PublicKeyCredentialDescriptor", PublicKeyCredentialDescriptor{}) + pkl.RegisterMapping("browser#PublicKeyCredentialParameters", PublicKeyCredentialParameters{}) + pkl.RegisterMapping("browser#AuthenticatorSelectionCriteria", AuthenticatorSelectionCriteria{}) + pkl.RegisterMapping("browser#PublicKeyCredentialCreationOptions", PublicKeyCredentialCreationOptions{}) + pkl.RegisterMapping("browser#RpEntity", RpEntity{}) + pkl.RegisterMapping("browser#UserEntity", UserEntity{}) + pkl.RegisterMapping("browser#SWT", SWT{}) +} diff --git a/internal/orm/constants.go b/internal/orm/constants.go new file mode 100644 index 000000000..744733c81 --- /dev/null +++ b/internal/orm/constants.go @@ -0,0 +1,334 @@ +package orm + +import ( + "github.com/onsonr/sonr/x/did/types" +) + +type ( + AuthenticatorAttachment string + AuthenticatorTransport string +) + +const ( + // Platform represents a platform authenticator is attached using a client device-specific transport, called + // platform attachment, and is usually not removable from the client device. A public key credential bound to a + // platform authenticator is called a platform credential. + Platform AuthenticatorAttachment = "platform" + + // CrossPlatform represents a roaming authenticator is attached using cross-platform transports, called + // cross-platform attachment. Authenticators of this class are removable from, and can "roam" among, client devices. + // A public key credential bound to a roaming authenticator is called a roaming credential. + CrossPlatform AuthenticatorAttachment = "cross-platform" +) + +func ParseAuthenticatorAttachment(s string) AuthenticatorAttachment { + switch s { + case "platform": + return Platform + default: + return CrossPlatform + } +} + +const ( + // USB indicates the respective authenticator can be contacted over removable USB. + USB AuthenticatorTransport = "usb" + + // NFC indicates the respective authenticator can be contacted over Near Field Communication (NFC). + NFC AuthenticatorTransport = "nfc" + + // BLE indicates the respective authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy / BLE). + BLE AuthenticatorTransport = "ble" + + // SmartCard indicates the respective authenticator can be contacted over ISO/IEC 7816 smart card with contacts. + // + // WebAuthn Level 3. + SmartCard AuthenticatorTransport = "smart-card" + + // Hybrid indicates the respective authenticator can be contacted using a combination of (often separate) + // data-transport and proximity mechanisms. This supports, for example, authentication on a desktop computer using + // a smartphone. + // + // WebAuthn Level 3. + Hybrid AuthenticatorTransport = "hybrid" + + // Internal indicates the respective authenticator is contacted using a client device-specific transport, i.e., it + // is a platform authenticator. These authenticators are not removable from the client device. + Internal AuthenticatorTransport = "internal" +) + +func ParseAuthenticatorTransport(s string) AuthenticatorTransport { + switch s { + case "usb": + return USB + case "nfc": + return NFC + case "ble": + return BLE + case "smart-card": + return SmartCard + case "hybrid": + return Hybrid + default: + return Internal + } +} + +type AuthenticatorFlags byte + +const ( + // FlagUserPresent Bit 00000001 in the byte sequence. Tells us if user is present. Also referred to as the UP flag. + FlagUserPresent AuthenticatorFlags = 1 << iota // Referred to as UP + + // FlagRFU1 is a reserved for future use flag. + FlagRFU1 + + // FlagUserVerified Bit 00000100 in the byte sequence. Tells us if user is verified + // by the authenticator using a biometric or PIN. Also referred to as the UV flag. + FlagUserVerified + + // FlagBackupEligible Bit 00001000 in the byte sequence. Tells us if a backup is eligible for device. Also referred + // to as the BE flag. + FlagBackupEligible // Referred to as BE + + // FlagBackupState Bit 00010000 in the byte sequence. Tells us if a backup state for device. Also referred to as the + // BS flag. + FlagBackupState + + // FlagRFU2 is a reserved for future use flag. + FlagRFU2 + + // FlagAttestedCredentialData Bit 01000000 in the byte sequence. Indicates whether + // the authenticator added attested credential data. Also referred to as the AT flag. + FlagAttestedCredentialData + + // FlagHasExtensions Bit 10000000 in the byte sequence. Indicates if the authenticator data has extensions. Also + // referred to as the ED flag. + FlagHasExtensions +) + +type AttestationFormat string + +const ( + // AttestationFormatPacked is the "packed" attestation statement format is a WebAuthn-optimized format for + // attestation. It uses a very compact but still extensible encoding method. This format is implementable by + // authenticators with limited resources (e.g., secure elements). + AttestationFormatPacked AttestationFormat = "packed" + + // AttestationFormatTPM is the TPM attestation statement format returns an attestation statement in the same format + // as the packed attestation statement format, although the rawData and signature fields are computed differently. + AttestationFormatTPM AttestationFormat = "tpm" + + // AttestationFormatAndroidKey is the attestation statement format for platform authenticators on versions "N", and + // later, which may provide this proprietary "hardware attestation" statement. + AttestationFormatAndroidKey AttestationFormat = "android-key" + + // AttestationFormatAndroidSafetyNet is the attestation statement format that Android-based platform authenticators + // MAY produce an attestation statement based on the Android SafetyNet API. + AttestationFormatAndroidSafetyNet AttestationFormat = "android-safetynet" + + // AttestationFormatFIDOUniversalSecondFactor is the attestation statement format that is used with FIDO U2F + // authenticators. + AttestationFormatFIDOUniversalSecondFactor AttestationFormat = "fido-u2f" + + // AttestationFormatApple is the attestation statement format that is used with Apple devices' platform + // authenticators. + AttestationFormatApple AttestationFormat = "apple" + + // AttestationFormatNone is the attestation statement format that is used to replace any authenticator-provided + // attestation statement when a WebAuthn Relying Party indicates it does not wish to receive attestation information. + AttestationFormatNone AttestationFormat = "none" +) + +func ExtractAttestationFormats(p *types.Params) []AttestationFormat { + var formats []AttestationFormat + for _, v := range p.AttestationFormats { + formats = append(formats, parseAttestationFormat(v)) + } + return formats +} + +func parseAttestationFormat(s string) AttestationFormat { + switch s { + case "packed": + return AttestationFormatPacked + case "tpm": + return AttestationFormatTPM + case "android-key": + return AttestationFormatAndroidKey + case "android-safetynet": + return AttestationFormatAndroidSafetyNet + case "fido-u2f": + return AttestationFormatFIDOUniversalSecondFactor + case "apple": + return AttestationFormatApple + case "none": + return AttestationFormatNone + default: + return AttestationFormatPacked + } +} + +type CredentialType string + +const ( + CredentialTypePublicKeyCredential CredentialType = "public-key" +) + +type ConveyancePreference string + +const ( + // PreferNoAttestation is a ConveyancePreference value. + // + // This value indicates that the Relying Party is not interested in authenticator attestation. For example, in order + // to potentially avoid having to obtain user consent to relay identifying information to the Relying Party, or to + // save a round trip to an Attestation CA or Anonymization CA. + // + // This is the default value. + // + // Specification: §5.4.7. Attestation Conveyance Preference Enumeration (https://www.w3.org/TR/webauthn/#dom-attestationconveyancepreference-none) + PreferNoAttestation ConveyancePreference = "none" + + // PreferIndirectAttestation is a ConveyancePreference value. + // + // This value indicates that the Relying Party prefers an attestation conveyance yielding verifiable attestation + // statements, but allows the client to decide how to obtain such attestation statements. The client MAY replace the + // authenticator-generated attestation statements with attestation statements generated by an Anonymization CA, in + // order to protect the user’s privacy, or to assist Relying Parties with attestation verification in a + // heterogeneous ecosystem. + // + // Note: There is no guarantee that the Relying Party will obtain a verifiable attestation statement in this case. + // For example, in the case that the authenticator employs self attestation. + // + // Specification: §5.4.7. Attestation Conveyance Preference Enumeration (https://www.w3.org/TR/webauthn/#dom-attestationconveyancepreference-indirect) + PreferIndirectAttestation ConveyancePreference = "indirect" + + // PreferDirectAttestation is a ConveyancePreference value. + // + // This value indicates that the Relying Party wants to receive the attestation statement as generated by the + // authenticator. + // + // Specification: §5.4.7. Attestation Conveyance Preference Enumeration (https://www.w3.org/TR/webauthn/#dom-attestationconveyancepreference-direct) + PreferDirectAttestation ConveyancePreference = "direct" + + // PreferEnterpriseAttestation is a ConveyancePreference value. + // + // This value indicates that the Relying Party wants to receive an attestation statement that may include uniquely + // identifying information. This is intended for controlled deployments within an enterprise where the organization + // wishes to tie registrations to specific authenticators. User agents MUST NOT provide such an attestation unless + // the user agent or authenticator configuration permits it for the requested RP ID. + // + // If permitted, the user agent SHOULD signal to the authenticator (at invocation time) that enterprise + // attestation is requested, and convey the resulting AAGUID and attestation statement, unaltered, to the Relying + // Party. + // + // Specification: §5.4.7. Attestation Conveyance Preference Enumeration (https://www.w3.org/TR/webauthn/#dom-attestationconveyancepreference-enterprise) + PreferEnterpriseAttestation ConveyancePreference = "enterprise" +) + +func ExtractConveyancePreference(p *types.Params) ConveyancePreference { + switch p.ConveyancePreference { + case "none": + return PreferNoAttestation + case "indirect": + return PreferIndirectAttestation + case "direct": + return PreferDirectAttestation + case "enterprise": + return PreferEnterpriseAttestation + default: + return PreferNoAttestation + } +} + +type PublicKeyCredentialHints string + +const ( + // PublicKeyCredentialHintSecurityKey is a PublicKeyCredentialHint that indicates that the Relying Party believes + // that users will satisfy this request with a physical security key. For example, an enterprise Relying Party may + // set this hint if they have issued security keys to their employees and will only accept those authenticators for + // registration and authentication. + // + // For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions, the + // authenticatorAttachment SHOULD be set to cross-platform. + PublicKeyCredentialHintSecurityKey PublicKeyCredentialHints = "security-key" + + // PublicKeyCredentialHintClientDevice is a PublicKeyCredentialHint that indicates that the Relying Party believes + // that users will satisfy this request with a platform authenticator attached to the client device. + // + // For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions, the + // authenticatorAttachment SHOULD be set to platform. + PublicKeyCredentialHintClientDevice PublicKeyCredentialHints = "client-device" + + // PublicKeyCredentialHintHybrid is a PublicKeyCredentialHint that indicates that the Relying Party believes that + // users will satisfy this request with general-purpose authenticators such as smartphones. For example, a consumer + // Relying Party may believe that only a small fraction of their customers possesses dedicated security keys. This + // option also implies that the local platform authenticator should not be promoted in the UI. + // + // For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions, the + // authenticatorAttachment SHOULD be set to cross-platform. + PublicKeyCredentialHintHybrid PublicKeyCredentialHints = "hybrid" +) + +func ParsePublicKeyCredentialHints(s string) PublicKeyCredentialHints { + switch s { + case "security-key": + return PublicKeyCredentialHintSecurityKey + case "client-device": + return PublicKeyCredentialHintClientDevice + case "hybrid": + return PublicKeyCredentialHintHybrid + default: + return "" + } +} + +type AttestedCredentialData struct { + AAGUID []byte `json:"aaguid"` + CredentialID []byte `json:"credential_id"` + + // The raw credential public key bytes received from the attestation data. + CredentialPublicKey []byte `json:"public_key"` +} + +type ResidentKeyRequirement string + +const ( + // ResidentKeyRequirementDiscouraged indicates the Relying Party prefers creating a server-side credential, but will + // accept a client-side discoverable credential. This is the default. + ResidentKeyRequirementDiscouraged ResidentKeyRequirement = "discouraged" + + // ResidentKeyRequirementPreferred indicates to the client we would prefer a discoverable credential. + ResidentKeyRequirementPreferred ResidentKeyRequirement = "preferred" + + // ResidentKeyRequirementRequired indicates the Relying Party requires a client-side discoverable credential, and is + // prepared to receive an error if a client-side discoverable credential cannot be created. + ResidentKeyRequirementRequired ResidentKeyRequirement = "required" +) + +func ParseResidentKeyRequirement(s string) ResidentKeyRequirement { + switch s { + case "discouraged": + return ResidentKeyRequirementDiscouraged + case "preferred": + return ResidentKeyRequirementPreferred + default: + return ResidentKeyRequirementRequired + } +} + +type ( + AuthenticationExtensions map[string]any + UserVerificationRequirement string +) + +const ( + // VerificationRequired User verification is required to create/release a credential + VerificationRequired UserVerificationRequirement = "required" + + // VerificationPreferred User verification is preferred to create/release a credential + VerificationPreferred UserVerificationRequirement = "preferred" // This is the default + + // VerificationDiscouraged The authenticator should not verify the user for the credential + VerificationDiscouraged UserVerificationRequirement = "discouraged" +) diff --git a/internal/orm/credential.go b/internal/orm/credential.go new file mode 100644 index 000000000..5448bba29 --- /dev/null +++ b/internal/orm/credential.go @@ -0,0 +1,56 @@ +package orm + +import ( + "encoding/base64" + + "github.com/go-webauthn/webauthn/protocol" +) + +// NewCredential will return a credential pointer on successful validation of a registration response. +func NewCredential(c *protocol.ParsedCredentialCreationData, origin, handle string) *Credential { + return &Credential{ + Subject: handle, + Origin: origin, + AttestationType: c.Response.AttestationObject.Format, + CredentialId: BytesToBase64(c.Response.AttestationObject.AuthData.AttData.CredentialID), + PublicKey: BytesToBase64(c.Response.AttestationObject.AuthData.AttData.CredentialPublicKey), + Transport: NormalizeTransports(c.Response.Transports), + SignCount: uint(c.Response.AttestationObject.AuthData.Counter), + UserPresent: c.Response.AttestationObject.AuthData.Flags.HasUserPresent(), + UserVerified: c.Response.AttestationObject.AuthData.Flags.HasUserVerified(), + BackupEligible: c.Response.AttestationObject.AuthData.Flags.HasBackupEligible(), + BackupState: c.Response.AttestationObject.AuthData.Flags.HasAttestedCredentialData(), + } +} + +func BytesToBase64(b []byte) string { + return base64.RawURLEncoding.EncodeToString(b) +} + +func Base64ToBytes(b string) ([]byte, error) { + return base64.RawURLEncoding.DecodeString(b) +} + +// Descriptor converts a Credential into a protocol.CredentialDescriptor. +func (c *Credential) Descriptor() protocol.CredentialDescriptor { + id, err := base64.RawURLEncoding.DecodeString(c.CredentialId) + if err != nil { + panic(err) + } + return protocol.CredentialDescriptor{ + Type: protocol.PublicKeyCredentialType, + CredentialID: id, + Transport: ConvertTransports(c.Transport), + AttestationType: c.AttestationType, + } +} + +// This is a signal that the authenticator may be cloned, see CloneWarning above for more information. +func (a *Credential) UpdateCounter(authDataCount uint) { + if authDataCount <= a.SignCount && (authDataCount != 0 || a.SignCount != 0) { + a.CloneWarning = true + return + } + + a.SignCount = authDataCount +} diff --git a/internal/orm/didmethod/DIDMethod.pkl.go b/internal/orm/didmethod/DIDMethod.pkl.go new file mode 100644 index 000000000..4d6c583d6 --- /dev/null +++ b/internal/orm/didmethod/DIDMethod.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package didmethod + +import ( + "encoding" + "fmt" +) + +type DIDMethod string + +const ( + Ipfs DIDMethod = "ipfs" + Sonr DIDMethod = "sonr" + Bitcoin DIDMethod = "bitcoin" + Ethereum DIDMethod = "ethereum" + Ibc DIDMethod = "ibc" + Webauthn DIDMethod = "webauthn" + Dwn DIDMethod = "dwn" + Service DIDMethod = "service" +) + +// String returns the string representation of DIDMethod +func (rcv DIDMethod) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(DIDMethod) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod. +func (rcv *DIDMethod) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "ipfs": + *rcv = Ipfs + case "sonr": + *rcv = Sonr + case "bitcoin": + *rcv = Bitcoin + case "ethereum": + *rcv = Ethereum + case "ibc": + *rcv = Ibc + case "webauthn": + *rcv = Webauthn + case "dwn": + *rcv = Dwn + case "service": + *rcv = Service + default: + return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str) + } + return nil +} diff --git a/internal/orm/init.pkl.go b/internal/orm/init.pkl.go new file mode 100644 index 000000000..390916a45 --- /dev/null +++ b/internal/orm/init.pkl.go @@ -0,0 +1,17 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package orm + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("orm", Orm{}) + pkl.RegisterMapping("orm#Account", Account{}) + pkl.RegisterMapping("orm#Asset", Asset{}) + pkl.RegisterMapping("orm#Chain", Chain{}) + pkl.RegisterMapping("orm#Credential", Credential{}) + pkl.RegisterMapping("orm#JWK", JWK{}) + pkl.RegisterMapping("orm#Grant", Grant{}) + pkl.RegisterMapping("orm#Keyshare", Keyshare{}) + pkl.RegisterMapping("orm#PublicKey", PublicKey{}) + pkl.RegisterMapping("orm#Profile", Profile{}) +} diff --git a/internal/orm/jwk.go b/internal/orm/jwk.go new file mode 100644 index 000000000..a55d8f226 --- /dev/null +++ b/internal/orm/jwk.go @@ -0,0 +1,111 @@ +package orm + +import ( + "encoding/base64" + "fmt" + + "github.com/go-webauthn/webauthn/protocol" + "github.com/go-webauthn/webauthn/protocol/webauthncose" +) + +func FormatEC2PublicKey(key *webauthncose.EC2PublicKeyData) (*JWK, error) { + curve, err := GetCOSECurveName(key.Curve) + if err != nil { + return nil, err + } + + jwkMap := map[string]interface{}{ + "kty": "EC", + "crv": curve, + "x": base64.RawURLEncoding.EncodeToString(key.XCoord), + "y": base64.RawURLEncoding.EncodeToString(key.YCoord), + } + + return MapToJWK(jwkMap) +} + +func FormatRSAPublicKey(key *webauthncose.RSAPublicKeyData) (*JWK, error) { + jwkMap := map[string]interface{}{ + "kty": "RSA", + "n": base64.RawURLEncoding.EncodeToString(key.Modulus), + "e": base64.RawURLEncoding.EncodeToString(key.Exponent), + } + + return MapToJWK(jwkMap) +} + +func FormatOKPPublicKey(key *webauthncose.OKPPublicKeyData) (*JWK, error) { + curve, err := GetOKPCurveName(key.Curve) + if err != nil { + return nil, err + } + + jwkMap := map[string]interface{}{ + "kty": "OKP", + "crv": curve, + "x": base64.RawURLEncoding.EncodeToString(key.XCoord), + } + + return MapToJWK(jwkMap) +} + +func MapToJWK(m map[string]interface{}) (*JWK, error) { + jwk := &JWK{} + for k, v := range m { + switch k { + case "kty": + jwk.Kty = v.(string) + case "crv": + jwk.Crv = v.(string) + case "x": + jwk.X = v.(string) + case "y": + jwk.Y = v.(string) + case "n": + jwk.N = v.(string) + case "e": + jwk.E = v.(string) + } + } + return jwk, nil +} + +func GetCOSECurveName(curveID int64) (string, error) { + switch curveID { + case int64(webauthncose.P256): + return "P-256", nil + case int64(webauthncose.P384): + return "P-384", nil + case int64(webauthncose.P521): + return "P-521", nil + default: + return "", fmt.Errorf("unknown curve ID: %d", curveID) + } +} + +func GetOKPCurveName(curveID int64) (string, error) { + switch curveID { + case int64(webauthncose.Ed25519): + return "Ed25519", nil + default: + return "", fmt.Errorf("unknown OKP curve ID: %d", curveID) + } +} + +// ConvertTransports converts the transports from strings to protocol.AuthenticatorTransport +func ConvertTransports(transports []string) []protocol.AuthenticatorTransport { + tss := make([]protocol.AuthenticatorTransport, len(transports)) + for i, t := range transports { + tss[i] = protocol.AuthenticatorTransport(t) + } + return tss +} + +// NormalizeTransports returns the transports as strings +func NormalizeTransports(transports []protocol.AuthenticatorTransport) []string { + tss := make([]string, len(transports)) + for i, t := range transports { + tss[i] = string(t) + } + return tss +} diff --git a/internal/orm/keyalg.go b/internal/orm/keyalg.go new file mode 100644 index 000000000..387df8d3d --- /dev/null +++ b/internal/orm/keyalg.go @@ -0,0 +1,22 @@ +package orm + +import "github.com/onsonr/sonr/internal/orm/keyalgorithm" + +type COSEAlgorithmIdentifier int + +func GetCoseIdentifier(alg keyalgorithm.KeyAlgorithm) COSEAlgorithmIdentifier { + switch alg { + case keyalgorithm.Es256: + return COSEAlgorithmIdentifier(-7) + case keyalgorithm.Es384: + return COSEAlgorithmIdentifier(-35) + case keyalgorithm.Es512: + return COSEAlgorithmIdentifier(-36) + case keyalgorithm.Eddsa: + return COSEAlgorithmIdentifier(-8) + case keyalgorithm.Es256k: + return COSEAlgorithmIdentifier(-10) + default: + return COSEAlgorithmIdentifier(0) + } +} diff --git a/internal/orm/keyalgorithm/KeyAlgorithm.pkl.go b/internal/orm/keyalgorithm/KeyAlgorithm.pkl.go new file mode 100644 index 000000000..16f47ac66 --- /dev/null +++ b/internal/orm/keyalgorithm/KeyAlgorithm.pkl.go @@ -0,0 +1,46 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keyalgorithm + +import ( + "encoding" + "fmt" +) + +type KeyAlgorithm string + +const ( + Es256 KeyAlgorithm = "es256" + Es384 KeyAlgorithm = "es384" + Es512 KeyAlgorithm = "es512" + Eddsa KeyAlgorithm = "eddsa" + Es256k KeyAlgorithm = "es256k" + Ecdsa KeyAlgorithm = "ecdsa" +) + +// String returns the string representation of KeyAlgorithm +func (rcv KeyAlgorithm) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyAlgorithm) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyAlgorithm. +func (rcv *KeyAlgorithm) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "es256": + *rcv = Es256 + case "es384": + *rcv = Es384 + case "es512": + *rcv = Es512 + case "eddsa": + *rcv = Eddsa + case "es256k": + *rcv = Es256k + case "ecdsa": + *rcv = Ecdsa + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyAlgorithm`, str) + } + return nil +} diff --git a/internal/orm/keycurve/KeyCurve.pkl.go b/internal/orm/keycurve/KeyCurve.pkl.go new file mode 100644 index 000000000..773b59ab1 --- /dev/null +++ b/internal/orm/keycurve/KeyCurve.pkl.go @@ -0,0 +1,58 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keycurve + +import ( + "encoding" + "fmt" +) + +type KeyCurve string + +const ( + P256 KeyCurve = "p256" + P384 KeyCurve = "p384" + P521 KeyCurve = "p521" + X25519 KeyCurve = "x25519" + X448 KeyCurve = "x448" + Ed25519 KeyCurve = "ed25519" + Ed448 KeyCurve = "ed448" + Secp256k1 KeyCurve = "secp256k1" + Bls12381 KeyCurve = "bls12381" + Keccak256 KeyCurve = "keccak256" +) + +// String returns the string representation of KeyCurve +func (rcv KeyCurve) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyCurve) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyCurve. +func (rcv *KeyCurve) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "p256": + *rcv = P256 + case "p384": + *rcv = P384 + case "p521": + *rcv = P521 + case "x25519": + *rcv = X25519 + case "x448": + *rcv = X448 + case "ed25519": + *rcv = Ed25519 + case "ed448": + *rcv = Ed448 + case "secp256k1": + *rcv = Secp256k1 + case "bls12381": + *rcv = Bls12381 + case "keccak256": + *rcv = Keccak256 + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyCurve`, str) + } + return nil +} diff --git a/internal/orm/keyencoding/KeyEncoding.pkl.go b/internal/orm/keyencoding/KeyEncoding.pkl.go new file mode 100644 index 000000000..dab253554 --- /dev/null +++ b/internal/orm/keyencoding/KeyEncoding.pkl.go @@ -0,0 +1,37 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keyencoding + +import ( + "encoding" + "fmt" +) + +type KeyEncoding string + +const ( + Raw KeyEncoding = "raw" + Hex KeyEncoding = "hex" + Multibase KeyEncoding = "multibase" +) + +// String returns the string representation of KeyEncoding +func (rcv KeyEncoding) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyEncoding) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyEncoding. +func (rcv *KeyEncoding) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "raw": + *rcv = Raw + case "hex": + *rcv = Hex + case "multibase": + *rcv = Multibase + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyEncoding`, str) + } + return nil +} diff --git a/internal/orm/keyrole/KeyRole.pkl.go b/internal/orm/keyrole/KeyRole.pkl.go new file mode 100644 index 000000000..ee5437cee --- /dev/null +++ b/internal/orm/keyrole/KeyRole.pkl.go @@ -0,0 +1,40 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keyrole + +import ( + "encoding" + "fmt" +) + +type KeyRole string + +const ( + Authentication KeyRole = "authentication" + Assertion KeyRole = "assertion" + Delegation KeyRole = "delegation" + Invocation KeyRole = "invocation" +) + +// String returns the string representation of KeyRole +func (rcv KeyRole) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyRole) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyRole. +func (rcv *KeyRole) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "authentication": + *rcv = Authentication + case "assertion": + *rcv = Assertion + case "delegation": + *rcv = Delegation + case "invocation": + *rcv = Invocation + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyRole`, str) + } + return nil +} diff --git a/internal/orm/keysharerole/KeyShareRole.pkl.go b/internal/orm/keysharerole/KeyShareRole.pkl.go new file mode 100644 index 000000000..84394745e --- /dev/null +++ b/internal/orm/keysharerole/KeyShareRole.pkl.go @@ -0,0 +1,34 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keysharerole + +import ( + "encoding" + "fmt" +) + +type KeyShareRole string + +const ( + User KeyShareRole = "user" + Validator KeyShareRole = "validator" +) + +// String returns the string representation of KeyShareRole +func (rcv KeyShareRole) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyShareRole) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyShareRole. +func (rcv *KeyShareRole) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "user": + *rcv = User + case "validator": + *rcv = Validator + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyShareRole`, str) + } + return nil +} diff --git a/internal/orm/keytype/KeyType.pkl.go b/internal/orm/keytype/KeyType.pkl.go new file mode 100644 index 000000000..d3f9808ad --- /dev/null +++ b/internal/orm/keytype/KeyType.pkl.go @@ -0,0 +1,55 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package keytype + +import ( + "encoding" + "fmt" +) + +type KeyType string + +const ( + Octet KeyType = "octet" + Elliptic KeyType = "elliptic" + Rsa KeyType = "rsa" + Symmetric KeyType = "symmetric" + Hmac KeyType = "hmac" + Mpc KeyType = "mpc" + Zk KeyType = "zk" + Webauthn KeyType = "webauthn" + Bip32 KeyType = "bip32" +) + +// String returns the string representation of KeyType +func (rcv KeyType) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(KeyType) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyType. +func (rcv *KeyType) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "octet": + *rcv = Octet + case "elliptic": + *rcv = Elliptic + case "rsa": + *rcv = Rsa + case "symmetric": + *rcv = Symmetric + case "hmac": + *rcv = Hmac + case "mpc": + *rcv = Mpc + case "zk": + *rcv = Zk + case "webauthn": + *rcv = Webauthn + case "bip32": + *rcv = Bip32 + default: + return fmt.Errorf(`illegal: "%s" is not a valid KeyType`, str) + } + return nil +} diff --git a/internal/orm/permissiongrant/PermissionGrant.pkl.go b/internal/orm/permissiongrant/PermissionGrant.pkl.go new file mode 100644 index 000000000..bdeea225f --- /dev/null +++ b/internal/orm/permissiongrant/PermissionGrant.pkl.go @@ -0,0 +1,46 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package permissiongrant + +import ( + "encoding" + "fmt" +) + +type PermissionGrant string + +const ( + None PermissionGrant = "none" + Read PermissionGrant = "read" + Write PermissionGrant = "write" + Verify PermissionGrant = "verify" + Broadcast PermissionGrant = "broadcast" + Admin PermissionGrant = "admin" +) + +// String returns the string representation of PermissionGrant +func (rcv PermissionGrant) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(PermissionGrant) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionGrant. +func (rcv *PermissionGrant) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "none": + *rcv = None + case "read": + *rcv = Read + case "write": + *rcv = Write + case "verify": + *rcv = Verify + case "broadcast": + *rcv = Broadcast + case "admin": + *rcv = Admin + default: + return fmt.Errorf(`illegal: "%s" is not a valid PermissionGrant`, str) + } + return nil +} diff --git a/internal/orm/permissionscope/PermissionScope.pkl.go b/internal/orm/permissionscope/PermissionScope.pkl.go new file mode 100644 index 000000000..2af42ee43 --- /dev/null +++ b/internal/orm/permissionscope/PermissionScope.pkl.go @@ -0,0 +1,49 @@ +// Code generated from Pkl module `orm`. DO NOT EDIT. +package permissionscope + +import ( + "encoding" + "fmt" +) + +type PermissionScope string + +const ( + Profile PermissionScope = "profile" + Metadata PermissionScope = "metadata" + Permissions PermissionScope = "permissions" + Wallets PermissionScope = "wallets" + Transactions PermissionScope = "transactions" + User PermissionScope = "user" + Validator PermissionScope = "validator" +) + +// String returns the string representation of PermissionScope +func (rcv PermissionScope) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(PermissionScope) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionScope. +func (rcv *PermissionScope) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "profile": + *rcv = Profile + case "metadata": + *rcv = Metadata + case "permissions": + *rcv = Permissions + case "wallets": + *rcv = Wallets + case "transactions": + *rcv = Transactions + case "user": + *rcv = User + case "validator": + *rcv = Validator + default: + return fmt.Errorf(`illegal: "%s" is not a valid PermissionScope`, str) + } + return nil +} diff --git a/internal/orm/publickey.go b/internal/orm/publickey.go new file mode 100644 index 000000000..8256d0946 --- /dev/null +++ b/internal/orm/publickey.go @@ -0,0 +1,26 @@ +package orm + +import ( + "fmt" + + "github.com/go-webauthn/webauthn/protocol/webauthncose" +) + +// ExtractWebAuthnPublicKey parses the raw public key bytes and returns a JWK representation +func ExtractWebAuthnPublicKey(keyBytes []byte) (*JWK, error) { + key, err := webauthncose.ParsePublicKey(keyBytes) + if err != nil { + return nil, fmt.Errorf("failed to parse public key: %w", err) + } + + switch k := key.(type) { + case *webauthncose.EC2PublicKeyData: + return FormatEC2PublicKey(k) + case *webauthncose.RSAPublicKeyData: + return FormatRSAPublicKey(k) + case *webauthncose.OKPPublicKeyData: + return FormatOKPPublicKey(k) + default: + return nil, fmt.Errorf("unsupported key type") + } +} diff --git a/internal/orm/transactions/Msg.pkl.go b/internal/orm/transactions/Msg.pkl.go new file mode 100644 index 000000000..fe8ffcc9a --- /dev/null +++ b/internal/orm/transactions/Msg.pkl.go @@ -0,0 +1,6 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type Msg interface { + GetTypeUrl() string +} diff --git a/internal/orm/transactions/MsgDidAllocateVault.pkl.go b/internal/orm/transactions/MsgDidAllocateVault.pkl.go new file mode 100644 index 000000000..0e691f461 --- /dev/null +++ b/internal/orm/transactions/MsgDidAllocateVault.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidAllocateVault interface { + Msg + + GetAuthority() string + + GetSubject() string + + GetToken() *pkl.Object +} + +var _ MsgDidAllocateVault = (*MsgDidAllocateVaultImpl)(nil) + +type MsgDidAllocateVaultImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Subject string `pkl:"subject"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidAllocateVaultImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidAllocateVaultImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidAllocateVaultImpl) GetSubject() string { + return rcv.Subject +} + +func (rcv *MsgDidAllocateVaultImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidAuthorize.pkl.go b/internal/orm/transactions/MsgDidAuthorize.pkl.go new file mode 100644 index 000000000..b12fc046d --- /dev/null +++ b/internal/orm/transactions/MsgDidAuthorize.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidAuthorize interface { + Msg + + GetAuthority() string + + GetController() string + + GetAddress() string + + GetOrigin() string + + GetToken() *pkl.Object +} + +var _ MsgDidAuthorize = (*MsgDidAuthorizeImpl)(nil) + +type MsgDidAuthorizeImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Controller string `pkl:"controller"` + + Address string `pkl:"address"` + + Origin string `pkl:"origin"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidAuthorizeImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidAuthorizeImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidAuthorizeImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidAuthorizeImpl) GetAddress() string { + return rcv.Address +} + +func (rcv *MsgDidAuthorizeImpl) GetOrigin() string { + return rcv.Origin +} + +func (rcv *MsgDidAuthorizeImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidProveWitness.pkl.go b/internal/orm/transactions/MsgDidProveWitness.pkl.go new file mode 100644 index 000000000..8bb849194 --- /dev/null +++ b/internal/orm/transactions/MsgDidProveWitness.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidProveWitness interface { + Msg + + GetAuthority() string + + GetProperty() string + + GetWitness() []int + + GetToken() *pkl.Object +} + +var _ MsgDidProveWitness = (*MsgDidProveWitnessImpl)(nil) + +type MsgDidProveWitnessImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Property string `pkl:"property"` + + Witness []int `pkl:"witness"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidProveWitnessImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidProveWitnessImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidProveWitnessImpl) GetProperty() string { + return rcv.Property +} + +func (rcv *MsgDidProveWitnessImpl) GetWitness() []int { + return rcv.Witness +} + +func (rcv *MsgDidProveWitnessImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidRegisterController.pkl.go b/internal/orm/transactions/MsgDidRegisterController.pkl.go new file mode 100644 index 000000000..99907f455 --- /dev/null +++ b/internal/orm/transactions/MsgDidRegisterController.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidRegisterController interface { + Msg + + GetAuthority() string + + GetCid() string + + GetOrigin() string + + GetAuthentication() []*pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidRegisterController = (*MsgDidRegisterControllerImpl)(nil) + +type MsgDidRegisterControllerImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Cid string `pkl:"cid"` + + Origin string `pkl:"origin"` + + Authentication []*pkl.Object `pkl:"authentication"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidRegisterControllerImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidRegisterControllerImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidRegisterControllerImpl) GetCid() string { + return rcv.Cid +} + +func (rcv *MsgDidRegisterControllerImpl) GetOrigin() string { + return rcv.Origin +} + +func (rcv *MsgDidRegisterControllerImpl) GetAuthentication() []*pkl.Object { + return rcv.Authentication +} + +func (rcv *MsgDidRegisterControllerImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidRegisterService.pkl.go b/internal/orm/transactions/MsgDidRegisterService.pkl.go new file mode 100644 index 000000000..d234865da --- /dev/null +++ b/internal/orm/transactions/MsgDidRegisterService.pkl.go @@ -0,0 +1,76 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidRegisterService interface { + Msg + + GetController() string + + GetOriginUri() string + + GetScopes() *pkl.Object + + GetDescription() string + + GetServiceEndpoints() map[string]string + + GetMetadata() *pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidRegisterService = (*MsgDidRegisterServiceImpl)(nil) + +type MsgDidRegisterServiceImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Controller string `pkl:"controller"` + + OriginUri string `pkl:"originUri"` + + Scopes *pkl.Object `pkl:"scopes"` + + Description string `pkl:"description"` + + ServiceEndpoints map[string]string `pkl:"serviceEndpoints"` + + Metadata *pkl.Object `pkl:"metadata"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidRegisterServiceImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidRegisterServiceImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidRegisterServiceImpl) GetOriginUri() string { + return rcv.OriginUri +} + +func (rcv *MsgDidRegisterServiceImpl) GetScopes() *pkl.Object { + return rcv.Scopes +} + +func (rcv *MsgDidRegisterServiceImpl) GetDescription() string { + return rcv.Description +} + +func (rcv *MsgDidRegisterServiceImpl) GetServiceEndpoints() map[string]string { + return rcv.ServiceEndpoints +} + +func (rcv *MsgDidRegisterServiceImpl) GetMetadata() *pkl.Object { + return rcv.Metadata +} + +func (rcv *MsgDidRegisterServiceImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidSyncVault.pkl.go b/internal/orm/transactions/MsgDidSyncVault.pkl.go new file mode 100644 index 000000000..c4de4ba64 --- /dev/null +++ b/internal/orm/transactions/MsgDidSyncVault.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidSyncVault interface { + Msg + + GetController() string + + GetToken() *pkl.Object +} + +var _ MsgDidSyncVault = (*MsgDidSyncVaultImpl)(nil) + +type MsgDidSyncVaultImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Controller string `pkl:"controller"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidSyncVaultImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidSyncVaultImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidSyncVaultImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgDidUpdateParams.pkl.go b/internal/orm/transactions/MsgDidUpdateParams.pkl.go new file mode 100644 index 000000000..a3e227ab8 --- /dev/null +++ b/internal/orm/transactions/MsgDidUpdateParams.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidUpdateParams interface { + Msg + + GetAuthority() string + + GetParams() *pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidUpdateParams = (*MsgDidUpdateParamsImpl)(nil) + +type MsgDidUpdateParamsImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Params *pkl.Object `pkl:"params"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidUpdateParamsImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidUpdateParamsImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidUpdateParamsImpl) GetParams() *pkl.Object { + return rcv.Params +} + +func (rcv *MsgDidUpdateParamsImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/internal/orm/transactions/MsgGovDeposit.pkl.go b/internal/orm/transactions/MsgGovDeposit.pkl.go new file mode 100644 index 000000000..556d1df7f --- /dev/null +++ b/internal/orm/transactions/MsgGovDeposit.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGovDeposit interface { + Msg + + GetProposalId() int + + GetDepositor() string + + GetAmount() []*pkl.Object +} + +var _ MsgGovDeposit = (*MsgGovDepositImpl)(nil) + +type MsgGovDepositImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Depositor string `pkl:"depositor"` + + Amount []*pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgGovDepositImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovDepositImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGovDepositImpl) GetDepositor() string { + return rcv.Depositor +} + +func (rcv *MsgGovDepositImpl) GetAmount() []*pkl.Object { + return rcv.Amount +} diff --git a/internal/orm/transactions/MsgGovSubmitProposal.pkl.go b/internal/orm/transactions/MsgGovSubmitProposal.pkl.go new file mode 100644 index 000000000..c33b589b6 --- /dev/null +++ b/internal/orm/transactions/MsgGovSubmitProposal.pkl.go @@ -0,0 +1,45 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGovSubmitProposal interface { + Msg + + GetContent() *Proposal + + GetInitialDeposit() []*pkl.Object + + GetProposer() string +} + +var _ MsgGovSubmitProposal = (*MsgGovSubmitProposalImpl)(nil) + +// Gov module messages +type MsgGovSubmitProposalImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Content *Proposal `pkl:"content"` + + InitialDeposit []*pkl.Object `pkl:"initialDeposit"` + + Proposer string `pkl:"proposer"` +} + +// The type URL for the message +func (rcv *MsgGovSubmitProposalImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovSubmitProposalImpl) GetContent() *Proposal { + return rcv.Content +} + +func (rcv *MsgGovSubmitProposalImpl) GetInitialDeposit() []*pkl.Object { + return rcv.InitialDeposit +} + +func (rcv *MsgGovSubmitProposalImpl) GetProposer() string { + return rcv.Proposer +} diff --git a/internal/orm/transactions/MsgGovVote.pkl.go b/internal/orm/transactions/MsgGovVote.pkl.go new file mode 100644 index 000000000..303cf1eee --- /dev/null +++ b/internal/orm/transactions/MsgGovVote.pkl.go @@ -0,0 +1,42 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type MsgGovVote interface { + Msg + + GetProposalId() int + + GetVoter() string + + GetOption() int +} + +var _ MsgGovVote = (*MsgGovVoteImpl)(nil) + +type MsgGovVoteImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Voter string `pkl:"voter"` + + Option int `pkl:"option"` +} + +// The type URL for the message +func (rcv *MsgGovVoteImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovVoteImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGovVoteImpl) GetVoter() string { + return rcv.Voter +} + +func (rcv *MsgGovVoteImpl) GetOption() int { + return rcv.Option +} diff --git a/internal/orm/transactions/MsgGroupCreateGroup.pkl.go b/internal/orm/transactions/MsgGroupCreateGroup.pkl.go new file mode 100644 index 000000000..c5dafd6bd --- /dev/null +++ b/internal/orm/transactions/MsgGroupCreateGroup.pkl.go @@ -0,0 +1,45 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGroupCreateGroup interface { + Msg + + GetAdmin() string + + GetMembers() []*pkl.Object + + GetMetadata() string +} + +var _ MsgGroupCreateGroup = (*MsgGroupCreateGroupImpl)(nil) + +// Group module messages +type MsgGroupCreateGroupImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Admin string `pkl:"admin"` + + Members []*pkl.Object `pkl:"members"` + + Metadata string `pkl:"metadata"` +} + +// The type URL for the message +func (rcv *MsgGroupCreateGroupImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupCreateGroupImpl) GetAdmin() string { + return rcv.Admin +} + +func (rcv *MsgGroupCreateGroupImpl) GetMembers() []*pkl.Object { + return rcv.Members +} + +func (rcv *MsgGroupCreateGroupImpl) GetMetadata() string { + return rcv.Metadata +} diff --git a/internal/orm/transactions/MsgGroupSubmitProposal.pkl.go b/internal/orm/transactions/MsgGroupSubmitProposal.pkl.go new file mode 100644 index 000000000..c23f15391 --- /dev/null +++ b/internal/orm/transactions/MsgGroupSubmitProposal.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGroupSubmitProposal interface { + Msg + + GetGroupPolicyAddress() string + + GetProposers() []string + + GetMetadata() string + + GetMessages() []*pkl.Object + + GetExec() int +} + +var _ MsgGroupSubmitProposal = (*MsgGroupSubmitProposalImpl)(nil) + +type MsgGroupSubmitProposalImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + GroupPolicyAddress string `pkl:"groupPolicyAddress"` + + Proposers []string `pkl:"proposers"` + + Metadata string `pkl:"metadata"` + + Messages []*pkl.Object `pkl:"messages"` + + Exec int `pkl:"exec"` +} + +// The type URL for the message +func (rcv *MsgGroupSubmitProposalImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupSubmitProposalImpl) GetGroupPolicyAddress() string { + return rcv.GroupPolicyAddress +} + +func (rcv *MsgGroupSubmitProposalImpl) GetProposers() []string { + return rcv.Proposers +} + +func (rcv *MsgGroupSubmitProposalImpl) GetMetadata() string { + return rcv.Metadata +} + +func (rcv *MsgGroupSubmitProposalImpl) GetMessages() []*pkl.Object { + return rcv.Messages +} + +func (rcv *MsgGroupSubmitProposalImpl) GetExec() int { + return rcv.Exec +} diff --git a/internal/orm/transactions/MsgGroupVote.pkl.go b/internal/orm/transactions/MsgGroupVote.pkl.go new file mode 100644 index 000000000..a79ce6899 --- /dev/null +++ b/internal/orm/transactions/MsgGroupVote.pkl.go @@ -0,0 +1,58 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type MsgGroupVote interface { + Msg + + GetProposalId() int + + GetVoter() string + + GetOption() int + + GetMetadata() string + + GetExec() int +} + +var _ MsgGroupVote = (*MsgGroupVoteImpl)(nil) + +type MsgGroupVoteImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Voter string `pkl:"voter"` + + Option int `pkl:"option"` + + Metadata string `pkl:"metadata"` + + Exec int `pkl:"exec"` +} + +// The type URL for the message +func (rcv *MsgGroupVoteImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupVoteImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGroupVoteImpl) GetVoter() string { + return rcv.Voter +} + +func (rcv *MsgGroupVoteImpl) GetOption() int { + return rcv.Option +} + +func (rcv *MsgGroupVoteImpl) GetMetadata() string { + return rcv.Metadata +} + +func (rcv *MsgGroupVoteImpl) GetExec() int { + return rcv.Exec +} diff --git a/internal/orm/transactions/MsgStakingBeginRedelegate.pkl.go b/internal/orm/transactions/MsgStakingBeginRedelegate.pkl.go new file mode 100644 index 000000000..44a019af4 --- /dev/null +++ b/internal/orm/transactions/MsgStakingBeginRedelegate.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingBeginRedelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorSrcAddress() string + + GetValidatorDstAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingBeginRedelegate = (*MsgStakingBeginRedelegateImpl)(nil) + +type MsgStakingBeginRedelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorSrcAddress string `pkl:"validatorSrcAddress"` + + ValidatorDstAddress string `pkl:"validatorDstAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingBeginRedelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorSrcAddress() string { + return rcv.ValidatorSrcAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorDstAddress() string { + return rcv.ValidatorDstAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/internal/orm/transactions/MsgStakingCreateValidator.pkl.go b/internal/orm/transactions/MsgStakingCreateValidator.pkl.go new file mode 100644 index 000000000..d904a71c6 --- /dev/null +++ b/internal/orm/transactions/MsgStakingCreateValidator.pkl.go @@ -0,0 +1,77 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingCreateValidator interface { + Msg + + GetDescription() *pkl.Object + + GetCommission() *pkl.Object + + GetMinSelfDelegation() string + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetPubkey() *pkl.Object + + GetValue() *pkl.Object +} + +var _ MsgStakingCreateValidator = (*MsgStakingCreateValidatorImpl)(nil) + +// Staking module messages +type MsgStakingCreateValidatorImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Description *pkl.Object `pkl:"description"` + + Commission *pkl.Object `pkl:"commission"` + + MinSelfDelegation string `pkl:"minSelfDelegation"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Pubkey *pkl.Object `pkl:"pubkey"` + + Value *pkl.Object `pkl:"value"` +} + +// The type URL for the message +func (rcv *MsgStakingCreateValidatorImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingCreateValidatorImpl) GetDescription() *pkl.Object { + return rcv.Description +} + +func (rcv *MsgStakingCreateValidatorImpl) GetCommission() *pkl.Object { + return rcv.Commission +} + +func (rcv *MsgStakingCreateValidatorImpl) GetMinSelfDelegation() string { + return rcv.MinSelfDelegation +} + +func (rcv *MsgStakingCreateValidatorImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingCreateValidatorImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingCreateValidatorImpl) GetPubkey() *pkl.Object { + return rcv.Pubkey +} + +func (rcv *MsgStakingCreateValidatorImpl) GetValue() *pkl.Object { + return rcv.Value +} diff --git a/internal/orm/transactions/MsgStakingDelegate.pkl.go b/internal/orm/transactions/MsgStakingDelegate.pkl.go new file mode 100644 index 000000000..9dd6fa824 --- /dev/null +++ b/internal/orm/transactions/MsgStakingDelegate.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingDelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingDelegate = (*MsgStakingDelegateImpl)(nil) + +type MsgStakingDelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingDelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingDelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingDelegateImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingDelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/internal/orm/transactions/MsgStakingUndelegate.pkl.go b/internal/orm/transactions/MsgStakingUndelegate.pkl.go new file mode 100644 index 000000000..ffc2395e6 --- /dev/null +++ b/internal/orm/transactions/MsgStakingUndelegate.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingUndelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingUndelegate = (*MsgStakingUndelegateImpl)(nil) + +type MsgStakingUndelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingUndelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingUndelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingUndelegateImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingUndelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/internal/orm/transactions/Proposal.pkl.go b/internal/orm/transactions/Proposal.pkl.go new file mode 100644 index 000000000..4a3e8bd62 --- /dev/null +++ b/internal/orm/transactions/Proposal.pkl.go @@ -0,0 +1,11 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +// Base class for all proposals +type Proposal struct { + // The title of the proposal + Title string `pkl:"title"` + + // The description of the proposal + Description string `pkl:"description"` +} diff --git a/internal/orm/transactions/Transactions.pkl.go b/internal/orm/transactions/Transactions.pkl.go new file mode 100644 index 000000000..5a551b8c4 --- /dev/null +++ b/internal/orm/transactions/Transactions.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Transactions struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Transactions +func LoadFromPath(ctx context.Context, path string) (ret *Transactions, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Transactions +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Transactions, error) { + var ret Transactions + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/internal/orm/transactions/TxBody.pkl.go b/internal/orm/transactions/TxBody.pkl.go new file mode 100644 index 000000000..8a8c23263 --- /dev/null +++ b/internal/orm/transactions/TxBody.pkl.go @@ -0,0 +1,17 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +// Represents a transaction body +type TxBody struct { + Messages []Msg `pkl:"messages"` + + Memo *string `pkl:"memo"` + + TimeoutHeight *int `pkl:"timeoutHeight"` + + ExtensionOptions *[]*pkl.Object `pkl:"extensionOptions"` + + NonCriticalExtensionOptions *[]*pkl.Object `pkl:"nonCriticalExtensionOptions"` +} diff --git a/internal/orm/transactions/init.pkl.go b/internal/orm/transactions/init.pkl.go new file mode 100644 index 000000000..211bc2e21 --- /dev/null +++ b/internal/orm/transactions/init.pkl.go @@ -0,0 +1,27 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("transactions", Transactions{}) + pkl.RegisterMapping("transactions#Proposal", Proposal{}) + pkl.RegisterMapping("transactions#MsgGovSubmitProposal", MsgGovSubmitProposalImpl{}) + pkl.RegisterMapping("transactions#MsgGovVote", MsgGovVoteImpl{}) + pkl.RegisterMapping("transactions#MsgGovDeposit", MsgGovDepositImpl{}) + pkl.RegisterMapping("transactions#MsgGroupCreateGroup", MsgGroupCreateGroupImpl{}) + pkl.RegisterMapping("transactions#MsgGroupSubmitProposal", MsgGroupSubmitProposalImpl{}) + pkl.RegisterMapping("transactions#MsgGroupVote", MsgGroupVoteImpl{}) + pkl.RegisterMapping("transactions#MsgStakingCreateValidator", MsgStakingCreateValidatorImpl{}) + pkl.RegisterMapping("transactions#MsgStakingDelegate", MsgStakingDelegateImpl{}) + pkl.RegisterMapping("transactions#MsgStakingUndelegate", MsgStakingUndelegateImpl{}) + pkl.RegisterMapping("transactions#MsgStakingBeginRedelegate", MsgStakingBeginRedelegateImpl{}) + pkl.RegisterMapping("transactions#MsgDidUpdateParams", MsgDidUpdateParamsImpl{}) + pkl.RegisterMapping("transactions#MsgDidAllocateVault", MsgDidAllocateVaultImpl{}) + pkl.RegisterMapping("transactions#MsgDidProveWitness", MsgDidProveWitnessImpl{}) + pkl.RegisterMapping("transactions#MsgDidSyncVault", MsgDidSyncVaultImpl{}) + pkl.RegisterMapping("transactions#MsgDidRegisterController", MsgDidRegisterControllerImpl{}) + pkl.RegisterMapping("transactions#MsgDidAuthorize", MsgDidAuthorizeImpl{}) + pkl.RegisterMapping("transactions#MsgDidRegisterService", MsgDidRegisterServiceImpl{}) + pkl.RegisterMapping("transactions#TxBody", TxBody{}) +} diff --git a/pkg/nebula/blocks/alert.templ b/pkg/nebula/blocks/alert.templ new file mode 100644 index 000000000..cc3d580a7 --- /dev/null +++ b/pkg/nebula/blocks/alert.templ @@ -0,0 +1,67 @@ +package blocks + +func Alert(variant Variant, icon Icon, title, message string) templ.Component { + return alertElement(variant.Attributes(), title, message, icon.Render()) +} + +templ alertElement(attrs templ.Attributes, title, message string, icon templ.Component) { +
+ @icon +
{ title }
+
{ message }
+
+} + +type AlertVariant int + +const ( + AlertVariant_Default AlertVariant = iota + AlertVariant_Info + AlertVariant_Error + AlertVariant_Success + AlertVariant_Warning + AlertVariant_Subtle_Info + AlertVariant_Subtle_Error + AlertVariant_Subtle_Success + AlertVariant_Subtle_Warning +) + +func (v AlertVariant) Attributes() templ.Attributes { + switch v { + case AlertVariant_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Subtle_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600", + } + case AlertVariant_Subtle_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600", + } + case AlertVariant_Subtle_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600", + } + case AlertVariant_Subtle_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600", + } + } + return templ.Attributes{ + "class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900", + } +} diff --git a/pkg/nebula/blocks/alert_templ.go b/pkg/nebula/blocks/alert_templ.go new file mode 100644 index 000000000..9b00895d4 --- /dev/null +++ b/pkg/nebula/blocks/alert_templ.go @@ -0,0 +1,140 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 Alert(variant Variant, icon Icon, title, message string) templ.Component { + return alertElement(variant.Attributes(), title, message, icon.Render()) +} + +func alertElement(attrs templ.Attributes, title, message string, icon templ.Component) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = icon.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/alert.templ`, Line: 10, Col: 66} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/alert.templ`, Line: 11, Col: 43} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +type AlertVariant int + +const ( + AlertVariant_Default AlertVariant = iota + AlertVariant_Info + AlertVariant_Error + AlertVariant_Success + AlertVariant_Warning + AlertVariant_Subtle_Info + AlertVariant_Subtle_Error + AlertVariant_Subtle_Success + AlertVariant_Subtle_Warning +) + +func (v AlertVariant) Attributes() templ.Attributes { + switch v { + case AlertVariant_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-600 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-500 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-white", + } + case AlertVariant_Subtle_Info: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-blue-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-blue-600", + } + case AlertVariant_Subtle_Error: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-red-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-red-600", + } + case AlertVariant_Subtle_Success: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-green-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-green-600", + } + case AlertVariant_Subtle_Warning: + return templ.Attributes{ + "class": "relative w-full rounded-lg border border-transparent bg-yellow-50 p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-yellow-600", + } + } + return templ.Attributes{ + "class": "relative w-full rounded-lg border bg-white p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11 text-neutral-900", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/badge.templ b/pkg/nebula/blocks/badge.templ new file mode 100644 index 000000000..a8ac1584e --- /dev/null +++ b/pkg/nebula/blocks/badge.templ @@ -0,0 +1,59 @@ +package blocks + +templ PoweredBySonr() { +
+
+
+ + Powered by + + + + + + +
+
+ sonr image +
+

The creative platform for developers. Community, tools, products, and more

+

+ + + + Joined June 2020 +

+
+
+
+
+
+
+} diff --git a/pkg/nebula/blocks/badge_templ.go b/pkg/nebula/blocks/badge_templ.go new file mode 100644 index 000000000..202f7ab97 --- /dev/null +++ b/pkg/nebula/blocks/badge_templ.go @@ -0,0 +1,40 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 PoweredBySonr() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Powered by
\"sonr

The creative platform for developers. Community, tools, products, and more

Joined June 2020

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/blocks.go b/pkg/nebula/blocks/blocks.go new file mode 100644 index 000000000..098e91dcf --- /dev/null +++ b/pkg/nebula/blocks/blocks.go @@ -0,0 +1,47 @@ +package blocks + +import ( + "strings" + + "github.com/a-h/templ" +) + +type Icon interface { + Render() templ.Component +} + +type Variant interface { + Attributes() templ.Attributes +} + +func clsxMerge(variants ...Variant) templ.Attributes { + combinedAttrs := templ.Attributes{} + var classElements []string + + for _, variant := range variants { + attrs := variant.Attributes() + if class, ok := attrs["class"].(string); ok { + classElements = append(classElements, strings.Fields(class)...) + } + for key, value := range attrs { + if key != "class" { + combinedAttrs[key] = value + } + } + } + + if len(classElements) > 0 { + combinedAttrs["class"] = strings.Join(classElements, " ") + } + return combinedAttrs +} + +func clsxBuilder(classes ...string) templ.Attributes { + if len(classes) == 0 { + return templ.Attributes{} + } + class := strings.Join(classes, " ") + return templ.Attributes{ + "class": class, + } +} diff --git a/pkg/nebula/blocks/button.templ b/pkg/nebula/blocks/button.templ new file mode 100644 index 000000000..6f05f6b4e --- /dev/null +++ b/pkg/nebula/blocks/button.templ @@ -0,0 +1,218 @@ +package blocks + +type button struct { + variant Variant + hxGet string + hxPost string + hxTarget string + hxTrigger string + hxSwap string +} + +type ButtonOpt func(button *button) + +func PrimaryButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantPrimary + } +} + +func InfoButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantInfo + } +} + +func ErrorButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantError + } +} + +func SuccessButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantSuccess + } +} + +func WarningButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantWarning + } +} + +func GET(action string, target string) ButtonOpt { + return func(button *button) { + button.hxGet = action + button.hxTarget = target + button.hxTrigger = "click" + button.hxSwap = "outerHTML" + } +} + +func POST(action string, target string) ButtonOpt { + return func(button *button) { + button.hxPost = action + button.hxTarget = target + button.hxTrigger = "click" + button.hxSwap = "outerHTML" + } +} + +func Button(opts ...ButtonOpt) templ.Component { + button := button{ + variant: ButtonVariantDefault, + } + for _, opt := range opts { + opt(&button) + } + if button.hxGet != "" { + return renderHxGetButton(&button, button.variant.Attributes()) + } + + if button.hxPost != "" { + return renderHxPostButton(&button, button.variant.Attributes()) + } + return renderButton(button.variant.Attributes()) +} + +templ renderButton(attrs templ.Attributes) { + +} + +templ renderHxGetButton(c *button, attrs templ.Attributes) { + +} + +templ renderHxPostButton(c *button, attrs templ.Attributes) { + +} + +type ButtonVariant int + +const ( + ButtonVariantDefault ButtonVariant = iota + ButtonVariantPrimary + ButtonVariantInfo + ButtonVariantError + ButtonVariantSuccess + ButtonVariantWarning +) + +func (v ButtonVariant) Attributes() templ.Attributes { + switch v { + case ButtonVariantPrimary: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline", + "type": "button", + } +} + +type SubtleButtonVariant int + +const ( + SubtleButtonVariantDefault SubtleButtonVariant = iota + SubtleButtonVariantInfo + SubtleButtonVariantError + SubtleButtonVariantSuccess + SubtleButtonVariantWarning +) + +func (v SubtleButtonVariant) Attributes() templ.Attributes { + switch v { + case SubtleButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100", + "type": "button", + } + case SubtleButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100", + "type": "button", + } + case SubtleButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100", + "type": "button", + } + case SubtleButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100", + "type": "button", + } +} + +type OutlineButtonVariant int + +const ( + OutlineButtonVariantDefault OutlineButtonVariant = iota + OutlineButtonVariantInfo + OutlineButtonVariantError + OutlineButtonVariantSuccess + OutlineButtonVariantWarning +) + +func (v OutlineButtonVariant) Attributes() templ.Attributes { + switch v { + case OutlineButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600", + "type": "button", + } + case OutlineButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600", + "type": "button", + } + case OutlineButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600", + "type": "button", + } + case OutlineButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900", + "type": "button", + } +} diff --git a/pkg/nebula/blocks/button_templ.go b/pkg/nebula/blocks/button_templ.go new file mode 100644 index 000000000..e5dd0aade --- /dev/null +++ b/pkg/nebula/blocks/button_templ.go @@ -0,0 +1,449 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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" + +type button struct { + variant Variant + hxGet string + hxPost string + hxTarget string + hxTrigger string + hxSwap string +} + +type ButtonOpt func(button *button) + +func PrimaryButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantPrimary + } +} + +func InfoButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantInfo + } +} + +func ErrorButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantError + } +} + +func SuccessButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantSuccess + } +} + +func WarningButtonStyle() ButtonOpt { + return func(button *button) { + button.variant = ButtonVariantWarning + } +} + +func GET(action string, target string) ButtonOpt { + return func(button *button) { + button.hxGet = action + button.hxTarget = target + button.hxTrigger = "click" + button.hxSwap = "outerHTML" + } +} + +func POST(action string, target string) ButtonOpt { + return func(button *button) { + button.hxPost = action + button.hxTarget = target + button.hxTrigger = "click" + button.hxSwap = "outerHTML" + } +} + +func Button(opts ...ButtonOpt) templ.Component { + button := button{ + variant: ButtonVariantDefault, + } + for _, opt := range opts { + opt(&button) + } + if button.hxGet != "" { + return renderHxGetButton(&button, button.variant.Attributes()) + } + + if button.hxPost != "" { + return renderHxPostButton(&button, button.variant.Attributes()) + } + return renderButton(button.variant.Attributes()) +} + +func renderButton(attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +type ButtonVariant int + +const ( + ButtonVariantDefault ButtonVariant = iota + ButtonVariantPrimary + ButtonVariantInfo + ButtonVariantError + ButtonVariantSuccess + ButtonVariantWarning +) + +func (v ButtonVariant) Attributes() templ.Attributes { + switch v { + case ButtonVariantPrimary: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-red-600 hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-green-600 hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + case ButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-white transition-colors duration-200 rounded-md bg-yellow-600 hover:bg-yellow-700 focus:ring-2 focus:ring-offset-2 focus:ring-yellow-700 focus:shadow-outline focus:outline-none", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-200 bg-white border rounded-md text-neutral-500 hover:text-neutral-700 border-neutral-200/70 hover:bg-neutral-100 active:bg-white focus:bg-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-200/60 focus:shadow-outline", + "type": "button", + } +} + +type SubtleButtonVariant int + +const ( + SubtleButtonVariantDefault SubtleButtonVariant = iota + SubtleButtonVariantInfo + SubtleButtonVariantError + SubtleButtonVariantSuccess + SubtleButtonVariantWarning +) + +func (v SubtleButtonVariant) Attributes() templ.Attributes { + switch v { + case SubtleButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-blue-100 bg-blue-50 hover:text-blue-600 hover:bg-blue-100", + "type": "button", + } + case SubtleButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-red-100 bg-red-50 hover:text-red-600 hover:bg-red-100", + "type": "button", + } + case SubtleButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-500 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-green-100 bg-green-50 hover:text-green-600 hover:bg-green-100", + "type": "button", + } + case SubtleButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 rounded-md focus:ring-2 focus:ring-offset-2 focus:ring-yellow-100 bg-yellow-50 hover:text-yellow-700 hover:bg-yellow-100", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 rounded-md text-neutral-500 bg-neutral-50 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-100 hover:text-neutral-600 hover:bg-neutral-100", + "type": "button", + } +} + +type OutlineButtonVariant int + +const ( + OutlineButtonVariantDefault OutlineButtonVariant = iota + OutlineButtonVariantInfo + OutlineButtonVariantError + OutlineButtonVariantSuccess + OutlineButtonVariantWarning +) + +func (v OutlineButtonVariant) Attributes() templ.Attributes { + switch v { + case OutlineButtonVariantInfo: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-blue-600 transition-colors duration-100 bg-white border-2 border-blue-600 rounded-md hover:text-white hover:bg-blue-600", + "type": "button", + } + case OutlineButtonVariantError: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-red-600 transition-colors duration-100 bg-white border-2 border-red-600 rounded-md hover:text-white hover:bg-red-600", + "type": "button", + } + case OutlineButtonVariantSuccess: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-green-600 transition-colors duration-100 bg-white border-2 border-green-600 rounded-md hover:text-white hover:bg-green-600", + "type": "button", + } + case OutlineButtonVariantWarning: + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide text-yellow-600 transition-colors duration-100 bg-white border-2 border-yellow-500 rounded-md hover:text-white hover:bg-yellow-500", + "type": "button", + } + } + return templ.Attributes{ + "class": "inline-flex items-center justify-center px-4 py-2 text-sm font-medium tracking-wide transition-colors duration-100 bg-white border-2 rounded-md text-neutral-900 hover:text-white border-neutral-900 hover:bg-neutral-900", + "type": "button", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/card.templ b/pkg/nebula/blocks/card.templ new file mode 100644 index 000000000..1ff009004 --- /dev/null +++ b/pkg/nebula/blocks/card.templ @@ -0,0 +1,47 @@ +package blocks + +func Card(id string, size Size) templ.Component { + return renderCard(id, size.CardAttributes()) +} + +templ renderCard(id string, attrs templ.Attributes) { +
+
+
+
+ { children... } +
+
+
+
+} + +templ ProfileCard() { +
+ +
+
+ +
+ +
Adam Wathan
+ adamwathan +
+ +
+
+

Creator of @tailwindcss. Listener of Slayer. Austin 3:16. BTW, Pines UI is super cool!

+ +
+
+} diff --git a/pkg/nebula/blocks/card_templ.go b/pkg/nebula/blocks/card_templ.go new file mode 100644 index 000000000..686fd68a9 --- /dev/null +++ b/pkg/nebula/blocks/card_templ.go @@ -0,0 +1,102 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 Card(id string, size Size) templ.Component { + return renderCard(id, size.CardAttributes()) +} + +func renderCard(id string, attrs templ.Attributes) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func ProfileCard() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Creator of @tailwindcss. Listener of Slayer. Austin 3:16. BTW, Pines UI is super cool!

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/fonts.templ b/pkg/nebula/blocks/fonts.templ new file mode 100644 index 000000000..bbd2d6e36 --- /dev/null +++ b/pkg/nebula/blocks/fonts.templ @@ -0,0 +1,62 @@ +package blocks + +func H1(content string) templ.Component { + return renderText(1, content) +} + +func H2(content string) templ.Component { + return renderText(2, content) +} + +func H3(content string) templ.Component { + return renderText(3, content) +} + +func Text(content string) templ.Component { + return renderText(0, content) +} + +templ renderText(level int, text string) { + switch level { + case 1: +

+ { text } +

+ case 2: +

+ { text } +

+ case 3: +

+ { text } +

+ default: +

+ { text } +

+ } +} + +templ renderLink(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderStrong(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderEmphasis(attrs templ.Attributes, text string) { + + { text } + +} + +templ renderCode(attrs templ.Attributes, text string) { + + { text } + +} diff --git a/pkg/nebula/blocks/fonts_templ.go b/pkg/nebula/blocks/fonts_templ.go new file mode 100644 index 000000000..8141bc7c2 --- /dev/null +++ b/pkg/nebula/blocks/fonts_templ.go @@ -0,0 +1,326 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 H1(content string) templ.Component { + return renderText(1, content) +} + +func H2(content string) templ.Component { + return renderText(2, content) +} + +func H3(content string) templ.Component { + return renderText(3, content) +} + +func Text(content string) templ.Component { + return renderText(0, content) +} + +func renderText(level int, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + switch level { + case 1: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 23, Col: 10} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case 2: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 27, Col: 10} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case 3: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 31, Col: 10} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + default: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 35, Col: 10} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return templ_7745c5c3_Err + }) +} + +func renderLink(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var7 string + templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 42, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderStrong(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var8 := templ.GetChildren(ctx) + if templ_7745c5c3_Var8 == nil { + templ_7745c5c3_Var8 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var9 string + templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 48, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderEmphasis(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var10 := templ.GetChildren(ctx) + if templ_7745c5c3_Var10 == nil { + templ_7745c5c3_Var10 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var11 string + templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 54, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func renderCode(attrs templ.Attributes, text string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var12 := templ.GetChildren(ctx) + if templ_7745c5c3_Var12 == nil { + templ_7745c5c3_Var12 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var13 string + templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/fonts.templ`, Line: 60, Col: 8} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/global.templ b/pkg/nebula/blocks/global.templ new file mode 100644 index 000000000..d353eb080 --- /dev/null +++ b/pkg/nebula/blocks/global.templ @@ -0,0 +1,40 @@ +package blocks + + +templ Spacer() { +
+} + +templ ServiceWorker(path string) { + +} + +templ defaultStyles() { + + + + + + + + + +} + +templ Rows() { +
+ { children... } +
+} + +templ Columns() { +
+ { children... } +
+} + +css main() { + font-family: R-Flex, system-ui, Avenir, Helvetica, Arial, sans-serif; +} diff --git a/pkg/nebula/blocks/global_templ.go b/pkg/nebula/blocks/global_templ.go new file mode 100644 index 000000000..fa527537a --- /dev/null +++ b/pkg/nebula/blocks/global_templ.go @@ -0,0 +1,182 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 Spacer() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func ServiceWorker(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 + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func defaultStyles() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func Rows() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var4.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func Columns() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var5.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func main() templ.CSSClass { + templ_7745c5c3_CSSBuilder := templruntime.GetBuilder() + templ_7745c5c3_CSSBuilder.WriteString(`font-family:R-Flex, system-ui, Avenir, Helvetica, Arial, sans-serif;`) + templ_7745c5c3_CSSID := templ.CSSID(`main`, templ_7745c5c3_CSSBuilder.String()) + return templ.ComponentCSSClass{ + ID: templ_7745c5c3_CSSID, + Class: templ.SafeCSS(`.` + templ_7745c5c3_CSSID + `{` + templ_7745c5c3_CSSBuilder.String() + `}`), + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/icons.templ b/pkg/nebula/blocks/icons.templ new file mode 100644 index 000000000..67b0ee5b4 --- /dev/null +++ b/pkg/nebula/blocks/icons.templ @@ -0,0 +1,31 @@ +package blocks + +type Icons int + +const ( + Icons_Info Icons = iota + Icons_Error + Icons_Success + Icons_Warning +) + +func (v Icons) Render() templ.Component { + return renderIconVariant(v) +} + +templ renderIconVariant(v Icons) { + switch v { + case Icons_Info: + + case Icons_Error: + + case Icons_Success: + + case Icons_Warning: + + } + +} + +templ SonrIcon() { +} diff --git a/pkg/nebula/blocks/icons_templ.go b/pkg/nebula/blocks/icons_templ.go new file mode 100644 index 000000000..ab14ff8d4 --- /dev/null +++ b/pkg/nebula/blocks/icons_templ.go @@ -0,0 +1,100 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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" + +type Icons int + +const ( + Icons_Info Icons = iota + Icons_Error + Icons_Success + Icons_Warning +) + +func (v Icons) Render() templ.Component { + return renderIconVariant(v) +} + +func renderIconVariant(v Icons) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + switch v { + case Icons_Info: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Error: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Success: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case Icons_Warning: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func SonrIcon() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/inputs.templ b/pkg/nebula/blocks/inputs.templ new file mode 100644 index 000000000..3ce3748ae --- /dev/null +++ b/pkg/nebula/blocks/inputs.templ @@ -0,0 +1,29 @@ +package blocks + +type InputState int + +const ( + InputStateDefault InputState = iota + InputStateError + InputStateSuccess +) + +templ TextInput(state InputState, label string, placeholder string) { + switch (state) { + case InputStateDefault: +
+ + +
+ case InputStateError: +
+ + +
+ case InputStateSuccess: +
+ + +
+ } +} diff --git a/pkg/nebula/blocks/inputs_templ.go b/pkg/nebula/blocks/inputs_templ.go new file mode 100644 index 000000000..7938e89cc --- /dev/null +++ b/pkg/nebula/blocks/inputs_templ.go @@ -0,0 +1,100 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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" + +type InputState int + +const ( + InputStateDefault InputState = iota + InputStateError + InputStateSuccess +) + +func TextInput(state InputState, label string, placeholder string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + switch state { + case InputStateDefault: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case InputStateError: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + case InputStateSuccess: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/panel.templ b/pkg/nebula/blocks/panel.templ new file mode 100644 index 000000000..4ca767061 --- /dev/null +++ b/pkg/nebula/blocks/panel.templ @@ -0,0 +1,39 @@ +package blocks + +import "github.com/labstack/echo/v4" + +templ Breadcrumbs() { + +} + +templ breadcrumbItem(title string, active bool) { + if (active) { +
  • { title }
  • + } else { +
  • { title }
  • + } +} + +templ breadcrumbIcon() { + + + + + +} +templ Panel(c echo.Context, id string) { +} diff --git a/pkg/nebula/blocks/panel_templ.go b/pkg/nebula/blocks/panel_templ.go new file mode 100644 index 000000000..39b623cbe --- /dev/null +++ b/pkg/nebula/blocks/panel_templ.go @@ -0,0 +1,190 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import "github.com/labstack/echo/v4" + +func Breadcrumbs() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func breadcrumbItem(title string, active bool) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + if active { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
  • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/panel.templ`, Line: 25, Col: 126} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
  • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } else { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
  • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/blocks/panel.templ`, Line: 27, Col: 118} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
  • ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return templ_7745c5c3_Err + }) +} + +func breadcrumbIcon() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func Panel(c echo.Context, id string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var6 := templ.GetChildren(ctx) + if templ_7745c5c3_Var6 == nil { + templ_7745c5c3_Var6 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/radios.templ b/pkg/nebula/blocks/radios.templ new file mode 100644 index 000000000..ad4f63025 --- /dev/null +++ b/pkg/nebula/blocks/radios.templ @@ -0,0 +1,37 @@ +package blocks + +templ RadioGroup() { +
    + +
    +} diff --git a/pkg/nebula/blocks/radios_templ.go b/pkg/nebula/blocks/radios_templ.go new file mode 100644 index 000000000..3777323bb --- /dev/null +++ b/pkg/nebula/blocks/radios_templ.go @@ -0,0 +1,40 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 RadioGroup() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/sizes.templ b/pkg/nebula/blocks/sizes.templ new file mode 100644 index 000000000..a36727643 --- /dev/null +++ b/pkg/nebula/blocks/sizes.templ @@ -0,0 +1,61 @@ +package blocks + +type Size int + +const ( + SizeDefault Size = iota + SizeSmall + SizeMedium + SizeLarge +) + +func (s Size) CardAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + case SizeLarge: + return templ.Attributes{ + "class": "max-w-2xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + } + return templ.Attributes{ + "class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } +} + +func (s Size) SvgAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "height": "16", + "width": "16", + } + case SizeLarge: + return templ.Attributes{ + "height": "32", + "width": "32", + } + } + return templ.Attributes{ + "height": "24", + "width": "24", + } +} + +func (s Size) TextAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case SizeLarge: + return templ.Attributes{ + "class": "text-lg", + } + } + return templ.Attributes{ + "class": "text-md", + } +} diff --git a/pkg/nebula/blocks/sizes_templ.go b/pkg/nebula/blocks/sizes_templ.go new file mode 100644 index 000000000..3a6e40584 --- /dev/null +++ b/pkg/nebula/blocks/sizes_templ.go @@ -0,0 +1,71 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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" + +type Size int + +const ( + SizeDefault Size = iota + SizeSmall + SizeMedium + SizeLarge +) + +func (s Size) CardAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "max-w-lg bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + case SizeLarge: + return templ.Attributes{ + "class": "max-w-2xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } + } + return templ.Attributes{ + "class": "max-w-xl bg-white border rounded-lg shadow-sm p-7 border-neutral-200/60", + } +} + +func (s Size) SvgAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "height": "16", + "width": "16", + } + case SizeLarge: + return templ.Attributes{ + "height": "32", + "width": "32", + } + } + return templ.Attributes{ + "height": "24", + "width": "24", + } +} + +func (s Size) TextAttributes() templ.Attributes { + switch s { + case SizeSmall: + return templ.Attributes{ + "class": "text-sm", + } + case SizeLarge: + return templ.Attributes{ + "class": "text-lg", + } + } + return templ.Attributes{ + "class": "text-md", + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/blocks/tabs.templ b/pkg/nebula/blocks/tabs.templ new file mode 100644 index 000000000..31390a89b --- /dev/null +++ b/pkg/nebula/blocks/tabs.templ @@ -0,0 +1,109 @@ +package blocks + +templ Tabs() { +
    +
    + + + +
    +
    +
    +
    + @Table() +
    +
    + And, this is the content for Tab2 +
    +
    + Finally, this is the content for Tab3 +
    +
    +
    +} + +templ Table() { +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameAgeAddressAction
    Richard Hendricks30Pied Piper HQ, Palo Alto + Edit +
    Erlich Bachman405230 Penfield Ave, Woodland Hills + Edit +
    Monica Hall352030 Stewart Drive, Sunnyvale + Edit +
    Dinesh Chugtai28Pied Piper HQ, Palo Alto + Edit +
    Gilfoyle32Pied Piper HQ, Palo Alto + Edit +
    +
    +
    +
    +
    +} diff --git a/pkg/nebula/blocks/tabs_templ.go b/pkg/nebula/blocks/tabs_templ.go new file mode 100644 index 000000000..1966f74e9 --- /dev/null +++ b/pkg/nebula/blocks/tabs_templ.go @@ -0,0 +1,77 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package blocks + +//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 Tabs() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = Table().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    And, this is the content for Tab2
    Finally, this is the content for Tab3
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func Table() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    NameAgeAddressAction
    Richard Hendricks30Pied Piper HQ, Palo AltoEdit
    Erlich Bachman405230 Penfield Ave, Woodland HillsEdit
    Monica Hall352030 Stewart Drive, SunnyvaleEdit
    Dinesh Chugtai28Pied Piper HQ, Palo AltoEdit
    Gilfoyle32Pied Piper HQ, Palo AltoEdit
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/islands/forms.go b/pkg/nebula/islands/forms.go new file mode 100644 index 000000000..5c75ae942 --- /dev/null +++ b/pkg/nebula/islands/forms.go @@ -0,0 +1,41 @@ +package islands + +import ( + "bytes" + + "github.com/a-h/templ" + "github.com/labstack/echo/v4" +) + +func echoFormResponse(c echo.Context, cmp templ.Component, state FormState) error { + // Create a buffer to store the rendered HTML + buf := &bytes.Buffer{} + // Render the component to the buffer + err := cmp.Render(c.Request().Context(), buf) + if err != nil { + return err + } + + // Set the content type + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + c.Response().Header().Set("X-Status", string(state)) + + // Write the buffered content to the response + _, err = c.Response().Write(buf.Bytes()) + return err +} + +type FormState string + +const ( + InitialForm FormState = "initial" + ErrorForm FormState = "error" + SuccessForm FormState = "success" + WarningForm FormState = "warning" +) + +type Form struct { + State FormState + Title string + Description string +} diff --git a/pkg/nebula/islands/register.templ b/pkg/nebula/islands/register.templ new file mode 100644 index 000000000..953ea0dc3 --- /dev/null +++ b/pkg/nebula/islands/register.templ @@ -0,0 +1,25 @@ +package islands + +import "github.com/labstack/echo/v4" + +templ BasicInfo(c echo.Context, state FormState) { + switch (state) { + default: +
    +
    +

    Account

    +

    Make changes to your account here. Click save when you're done.

    +
    +
    +
    +
    +
    +
    + } +} + +templ CreateCredentials(c echo.Context, state FormState) { +} + +templ PrivacyTerms(c echo.Context, state FormState) { +} diff --git a/pkg/nebula/islands/register_templ.go b/pkg/nebula/islands/register_templ.go new file mode 100644 index 000000000..2f56be082 --- /dev/null +++ b/pkg/nebula/islands/register_templ.go @@ -0,0 +1,95 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package islands + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import "github.com/labstack/echo/v4" + +func BasicInfo(c echo.Context, state FormState) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + switch state { + default: + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    Account

    Make changes to your account here. Click save when you're done.

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + return templ_7745c5c3_Err + }) +} + +func CreateCredentials(c echo.Context, state FormState) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + return templ_7745c5c3_Err + }) +} + +func PrivacyTerms(c echo.Context, state FormState) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/pages/home.templ b/pkg/nebula/pages/home.templ new file mode 100644 index 000000000..f21586f07 --- /dev/null +++ b/pkg/nebula/pages/home.templ @@ -0,0 +1,23 @@ +package pages + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +templ Home(c echo.Context) { + @blocks.Card("home-view", blocks.SizeLarge) { + @blocks.H1("Sonr.ID") + @blocks.Text("A Decentralized Web Node Client for the Sonr Network.") + @blocks.Spacer() +
    + @blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()) { + @blocks.Text("Get Started") + } + @blocks.Button(blocks.GET("/login", "#home-view")) { + @blocks.Text("Login") + } +
    + @blocks.PoweredBySonr() + } +} diff --git a/pkg/nebula/pages/home_templ.go b/pkg/nebula/pages/home_templ.go new file mode 100644 index 000000000..75e611f56 --- /dev/null +++ b/pkg/nebula/pages/home_templ.go @@ -0,0 +1,135 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package pages + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func Home(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Text("A Decentralized Web Node Client for the Sonr Network.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Get Started").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Login").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/login", "#home-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.PoweredBySonr().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("home-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/pages/login.templ b/pkg/nebula/pages/login.templ new file mode 100644 index 000000000..3db82aed7 --- /dev/null +++ b/pkg/nebula/pages/login.templ @@ -0,0 +1,19 @@ +package pages + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +templ Login(c echo.Context) { + @blocks.Card("login-view", blocks.SizeLarge) { + @blocks.H1("Sonr.ID") + @blocks.Text("Neo-tree is a file manager for NeoFS.") + @blocks.Spacer() + @blocks.RadioGroup() + @blocks.Spacer() + @blocks.Button(blocks.GET("/", "#login-view")) { + @blocks.Text("Cancel") + } + } +} diff --git a/pkg/nebula/pages/login_templ.go b/pkg/nebula/pages/login_templ.go new file mode 100644 index 000000000..0c7bb0ce8 --- /dev/null +++ b/pkg/nebula/pages/login_templ.go @@ -0,0 +1,121 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package pages + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func Login(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Text("Neo-tree is a file manager for NeoFS.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.RadioGroup().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Cancel").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/", "#login-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("login-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/pages/openid.templ b/pkg/nebula/pages/openid.templ new file mode 100644 index 000000000..c0482ec52 --- /dev/null +++ b/pkg/nebula/pages/openid.templ @@ -0,0 +1,13 @@ +package pages + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +templ Authorize(c echo.Context) { + @blocks.Card("authorize-view", blocks.SizeMedium) { + @blocks.H1("Sonr.ID") + @blocks.Text("Neo-tree is a file manager for NeoFS.") + } +} diff --git a/pkg/nebula/pages/openid_templ.go b/pkg/nebula/pages/openid_templ.go new file mode 100644 index 000000000..c87093a10 --- /dev/null +++ b/pkg/nebula/pages/openid_templ.go @@ -0,0 +1,71 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package pages + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func Authorize(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Text("Neo-tree is a file manager for NeoFS.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("authorize-view", blocks.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/pages/profile.templ b/pkg/nebula/pages/profile.templ new file mode 100644 index 000000000..72fe1c6e5 --- /dev/null +++ b/pkg/nebula/pages/profile.templ @@ -0,0 +1,13 @@ +package pages + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +templ Profile(c echo.Context) { + @blocks.Card("profile-view", blocks.SizeLarge) { + @blocks.ProfileCard() + @blocks.Tabs() + } +} diff --git a/pkg/nebula/pages/profile_templ.go b/pkg/nebula/pages/profile_templ.go new file mode 100644 index 000000000..dc588d663 --- /dev/null +++ b/pkg/nebula/pages/profile_templ.go @@ -0,0 +1,71 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package pages + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func Profile(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.ProfileCard().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Tabs().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("profile-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/pages/register.templ b/pkg/nebula/pages/register.templ new file mode 100644 index 000000000..2b785a20d --- /dev/null +++ b/pkg/nebula/pages/register.templ @@ -0,0 +1,20 @@ +package pages + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" + "github.com/onsonr/sonr/pkg/nebula/islands" +) + +templ Register(c echo.Context) { + @blocks.Card("register-view", blocks.SizeMedium) { + @blocks.H2("Account Registration") + @blocks.Spacer() + @blocks.Breadcrumbs() + @islands.BasicInfo(c, islands.InitialForm) + @blocks.Spacer() + @blocks.Button(blocks.GET("/", "#register-view")) { + @blocks.Text("Cancel") + } + } +} diff --git a/pkg/nebula/pages/register_templ.go b/pkg/nebula/pages/register_templ.go new file mode 100644 index 000000000..ad23e673b --- /dev/null +++ b/pkg/nebula/pages/register_templ.go @@ -0,0 +1,122 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package pages + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" + "github.com/onsonr/sonr/pkg/nebula/islands" +) + +func Register(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H2("Account Registration").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Breadcrumbs().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = islands.BasicInfo(c, islands.InitialForm).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Cancel").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/", "#register-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("register-view", blocks.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/router.go b/pkg/nebula/router.go new file mode 100644 index 000000000..86e63dd1c --- /dev/null +++ b/pkg/nebula/router.go @@ -0,0 +1,15 @@ +package nebula + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/routes" + "github.com/onsonr/sonr/pkg/nebula/view" +) + +func RouteViews(e *echo.Echo) { + e.GET("/home", view.Render(routes.HomeRoute)) + e.GET("/login", view.Render(routes.LoginRoute)) + e.GET("/register", view.Render(routes.RegisterRoute)) + e.GET("/profile", view.Render(routes.ProfileRoute)) + e.GET("/authorize", view.Render(routes.AuthorizeRoute)) +} diff --git a/pkg/nebula/routes/routes.go b/pkg/nebula/routes/routes.go new file mode 100644 index 000000000..c8908c650 --- /dev/null +++ b/pkg/nebula/routes/routes.go @@ -0,0 +1,37 @@ +package routes + +import ( + "github.com/a-h/templ" + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/pages" +) + +type Route string + +const ( + HomeRoute Route = "/home" + LoginRoute Route = "/login" + RegisterRoute Route = "/register" + ProfileRoute Route = "/profile" + AuthorizeRoute Route = "/authorize" +) + +func (r Route) Route() string { + return string(r) +} + +func (r Route) Component(c echo.Context) templ.Component { + switch r { + case HomeRoute: + return pages.Home(c) + case LoginRoute: + return pages.Login(c) + case RegisterRoute: + return pages.Register(c) + case ProfileRoute: + return pages.Profile(c) + case AuthorizeRoute: + return pages.Authorize(c) + } + return nil +} diff --git a/pkg/nebula/view/view.go b/pkg/nebula/view/view.go new file mode 100644 index 000000000..6dfeb3122 --- /dev/null +++ b/pkg/nebula/view/view.go @@ -0,0 +1,29 @@ +package view + +import ( + "bytes" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/routes" +) + +// render renders a templ.Component +func Render(r routes.Route) echo.HandlerFunc { + return func(c echo.Context) error { + // Create a buffer to store the rendered HTML + buf := bytes.NewBuffer(nil) + + // Render the component to the buffer + err := r.Component(c).Render(c.Request().Context(), buf) + if err != nil { + return err + } + + // Set the content type + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + + // Write the buffered content to the response + _, err = c.Response().Write(buf.Bytes()) + return err + } +} diff --git a/pkg/proxy/README.md b/pkg/proxy/README.md new file mode 100644 index 000000000..10ca30fcc --- /dev/null +++ b/pkg/proxy/README.md @@ -0,0 +1,18 @@ +# sonr.id + +A public decentralized web node client for the Sonr Network. + +## Development + +### Prerequisites + +- Bun +- Devbox +- Docker + +### Setup + +1. Install [Devbox](https://github.com/jetpack-io/devbox) +2. Install [Bun](https://bun.sh/docs/installation) +3. Install [Docker](https://docs.docker.com/get-docker/) +4. Run `devbox run dev` diff --git a/pkg/proxy/main.go b/pkg/proxy/main.go new file mode 100644 index 000000000..dacf6f1a3 --- /dev/null +++ b/pkg/proxy/main.go @@ -0,0 +1,25 @@ +//go:build wasm + +package main + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/proxy/routes" + "github.com/syumai/workers" +) + +// # Sonr.ID +// +// This App is used as an IPFS gateway proxy for exissting Sonr DWN nodes +func main() { + // TODO: Route from /ipfs/cid and /ipns/did to the gateway + // 1. Display Generic Homepage + e := echo.New() + // Configure the server + e.GET("/", routes.HomeView) + e.GET("/allocate", routes.AllocateView) + // 2. Present Terms Agreement and Checkbox to Accept + // 3. Collect UserAgent, Set-Cookie, and Client Headers + // 4. Redirect to DWN Node + workers.Serve(e) +} diff --git a/pkg/proxy/routes/allocate.templ b/pkg/proxy/routes/allocate.templ new file mode 100644 index 000000000..71ccecbdf --- /dev/null +++ b/pkg/proxy/routes/allocate.templ @@ -0,0 +1,18 @@ +package routes + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func AllocateView(c echo.Context) error { + return echoComponentResponse(c, renderAuthorizeView()) +} + +templ renderAuthorizeView() { + @blocks.Card("authorize-view", blocks.SizeMedium) { + @blocks.H1("Sonr.ID") + @blocks.Text("Neo-tree is a file manager for NeoFS.") + } +} + diff --git a/pkg/proxy/routes/allocate_templ.go b/pkg/proxy/routes/allocate_templ.go new file mode 100644 index 000000000..66e703de1 --- /dev/null +++ b/pkg/proxy/routes/allocate_templ.go @@ -0,0 +1,75 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package routes + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func AllocateView(c echo.Context) error { + return echoComponentResponse(c, renderAuthorizeView()) +} + +func renderAuthorizeView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Text("Neo-tree is a file manager for NeoFS.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("authorize-view", blocks.SizeMedium).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/proxy/routes/home.templ b/pkg/proxy/routes/home.templ new file mode 100644 index 000000000..c9c927bff --- /dev/null +++ b/pkg/proxy/routes/home.templ @@ -0,0 +1,28 @@ +package routes + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func HomeView(c echo.Context) error { + return echoComponentResponse(c, renderHomeView()) +} + +templ renderHomeView() { + @blocks.Card("home-view", blocks.SizeLarge) { + @blocks.H1("Sonr.ID") + @blocks.Text("A Decentralized Web Node Client for the Sonr Network.") + @blocks.Spacer() +
    + @blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()) { + @blocks.Text("Get Started") + } + @blocks.Button(blocks.GET("/login", "#home-view")) { + @blocks.Text("Login") + } +
    + @blocks.PoweredBySonr() + } +} + diff --git a/pkg/proxy/routes/home_templ.go b/pkg/proxy/routes/home_templ.go new file mode 100644 index 000000000..deeb75b60 --- /dev/null +++ b/pkg/proxy/routes/home_templ.go @@ -0,0 +1,139 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package routes + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/nebula/blocks" +) + +func HomeView(c echo.Context) error { + return echoComponentResponse(c, renderHomeView()) +} + +func renderHomeView() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.H1("Sonr.ID").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Text("A Decentralized Web Node Client for the Sonr Network.").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.Spacer().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Get Started").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/register", "#home-view"), blocks.PrimaryButtonStyle()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Err = blocks.Text("Login").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Button(blocks.GET("/login", "#home-view")).Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = blocks.PoweredBySonr().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = blocks.Card("home-view", blocks.SizeLarge).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/proxy/routes/pages.go b/pkg/proxy/routes/pages.go new file mode 100644 index 000000000..49aeacfce --- /dev/null +++ b/pkg/proxy/routes/pages.go @@ -0,0 +1,27 @@ +package routes + +import ( + "bytes" + + "github.com/a-h/templ" + "github.com/labstack/echo/v4" +) + +// render renders a templ.Component +func echoComponentResponse(c echo.Context, cmp templ.Component) error { + // Create a buffer to store the rendered HTML + buf := &bytes.Buffer{} + + // Render the component to the buffer + err := cmp.Render(c.Request().Context(), buf) + if err != nil { + return err + } + + // Set the content type + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + + // Write the buffered content to the response + _, err = c.Response().Write(buf.Bytes()) + return err +} diff --git a/pkg/proxy/wrangler.toml b/pkg/proxy/wrangler.toml new file mode 100644 index 000000000..10bce7926 --- /dev/null +++ b/pkg/proxy/wrangler.toml @@ -0,0 +1,10 @@ +name = "sonr-id" +main = "./build/worker.mjs" +compatibility_date = "2024-07-26" + +[dev] +ip = "localhost" +port = 4202 + +[build] +command = "devbox run build:motr" diff --git a/pkg/vault/app.wasm b/pkg/vault/app.wasm new file mode 100755 index 000000000..4be43299b Binary files /dev/null and b/pkg/vault/app.wasm differ diff --git a/pkg/vault/embed.go b/pkg/vault/embed.go new file mode 100644 index 000000000..ebc58e3fe --- /dev/null +++ b/pkg/vault/embed.go @@ -0,0 +1,113 @@ +package vault + +import ( + "bytes" + "context" + _ "embed" + "encoding/json" + + "github.com/a-h/templ" + "github.com/ipfs/boxo/files" + "github.com/onsonr/sonr/config/dwn" +) + +//go:embed app.wasm +var dwnWasmData []byte + +//go:embed motr.mjs +var motrMJSData []byte + +//go:embed sw.js +var swJSData []byte + +var ( + dwnWasmFile = files.NewBytesFile(dwnWasmData) + motrMJSFile = files.NewBytesFile(motrMJSData) + swJSFile = files.NewBytesFile(swJSData) +) + +// NewConfig uses the config template to generate the dwn config file +func NewConfig(keyshareJSON string, adddress string, chainID string, schema *dwn.Schema) *dwn.Config { + dwnCfg := &dwn.Config{ + Motr: createMotrConfig(keyshareJSON, adddress, "sonr.id"), + Ipfs: defaultIPFSConfig(), + Sonr: defaultSonrConfig(chainID), + Schema: schema, + } + return dwnCfg +} + +// NewVaultDirectory creates a new directory with the default files +func NewVaultDirectory(cnfg *dwn.Config) (files.Node, error) { + dwnJSON, err := json.Marshal(cnfg) + if err != nil { + return nil, err + } + + dwnStr, err := templ.JSONString(cnfg) + if err != nil { + return nil, err + } + w := bytes.NewBuffer(nil) + err = indexFile(dwnStr).Render(context.Background(), w) + if err != nil { + return nil, err + } + fileMap := map[string]files.Node{ + "config.json": files.NewBytesFile(dwnJSON), + "motr.mjs": motrMJSFile, + "sw.js": swJSFile, + "app.wasm": dwnWasmFile, + "index.html": files.NewBytesFile(w.Bytes()), + } + return files.NewMapDirectory(fileMap), nil +} + +// Use IndexHTML template to generate the index file +func IndexHTMLFile(c *dwn.Config) (files.Node, error) { + str, err := templ.JSONString(c) + if err != nil { + return nil, err + } + w := bytes.NewBuffer(nil) + err = indexFile(str).Render(context.Background(), w) + if err != nil { + return nil, err + } + indexData := w.Bytes() + return files.NewBytesFile(indexData), nil +} + +// MarshalConfigFile uses the config template to generate the dwn config file +func MarshalConfigFile(c *dwn.Config) (files.Node, error) { + dwnConfigData, err := json.Marshal(c) + if err != nil { + return nil, err + } + return files.NewBytesFile(dwnConfigData), nil +} + +func createMotrConfig(keyshareJSON string, adddress string, origin string) *dwn.Motr { + return &dwn.Motr{ + Keyshare: keyshareJSON, + Address: adddress, + Origin: origin, + } +} + +func defaultIPFSConfig() *dwn.IPFS { + return &dwn.IPFS{ + ApiUrl: "https://api.sonr-ipfs.land", + GatewayUrl: "https://ipfs.sonr.land", + } +} + +func defaultSonrConfig(chainID string) *dwn.Sonr { + return &dwn.Sonr{ + ApiUrl: "https://api.sonr.land", + GrpcUrl: "https://grpc.sonr.land", + RpcUrl: "https://rpc.sonr.land", + WebSocketUrl: "wss://rpc.sonr.land/ws", + ChainId: chainID, + } +} diff --git a/pkg/vault/index.templ b/pkg/vault/index.templ new file mode 100644 index 000000000..d74d059c9 --- /dev/null +++ b/pkg/vault/index.templ @@ -0,0 +1,111 @@ +package vault + + +var motrHandle = templ.NewOnceHandle() + +templ importScripts() { + + + +} + +templ indexFile(cfg string) { + + + + + + + + @importScripts() + + Sonr DWN + + + +
    +
    Loading...
    +
    + @motrHandle.Once() { + + @initializeMotr(cfg) + } + + +} + +templ serviceWorker() { + +} + +script initializeMotr(config string) { + const motr = new Motr(JSON.parse(config)); + + async function demo() { + try { + // Insert a new account + const accountId = await motr.insertAccount({ + name: 'John Doe', + address: '0x1234567890123456789012345678901234567890', + publicKey: 'sample_public_key', + chainCode: 'SONR', + index: 0, + controller: 'sample_controller', + createdAt: new Date() + }); + + console.log('Inserted account with ID:', accountId); + + // Retrieve the account + const account = await motr.getAccount(accountId); + console.log('Retrieved account:', account); + + // Insert a new credential + const credentialId = await motr.insertCredential({ + subject: 'john@example.com', + label: 'John\'s Device', + controller: 'sample_controller', + attestationType: 'platform', + origin: 'https://app.sonr.io' + }); + + console.log('Inserted credential with ID:', credentialId); + + // Retrieve the credential + const credential = await motr.getCredential(credentialId); + console.log('Retrieved credential:', credential); + + document.getElementById('output').innerHTML = ` +

    Demo Results:

    +

    Inserted account ID: ${accountId}

    +

    Retrieved account name: ${account.name}

    +

    Inserted credential ID: ${credentialId}

    +

    Retrieved credential subject: ${credential.subject}

    + `; + } catch (error) { + console.error('Error in demo:', error); + document.getElementById('output').innerHTML = `

    Error: ${error.message}

    `; + } + } + // Run the demo when the page loads + window.onload = demo; +} + diff --git a/pkg/vault/index_templ.go b/pkg/vault/index_templ.go new file mode 100644 index 000000000..85766f49b --- /dev/null +++ b/pkg/vault/index_templ.go @@ -0,0 +1,197 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package vault + +//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" + +var motrHandle = templ.NewOnceHandle() + +func importScripts() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func indexFile(cfg string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = importScripts().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Sonr DWN
    Loading...
    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = initializeMotr(cfg).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = motrHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func serviceWorker() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func initializeMotr(config string) templ.ComponentScript { + return templ.ComponentScript{ + Name: `__templ_initializeMotr_d70f`, + Function: `function __templ_initializeMotr_d70f(config){const motr = new Motr(JSON.parse(config)); + + async function demo() { + try { + // Insert a new account + const accountId = await motr.insertAccount({ + name: 'John Doe', + address: '0x1234567890123456789012345678901234567890', + publicKey: 'sample_public_key', + chainCode: 'SONR', + index: 0, + controller: 'sample_controller', + createdAt: new Date() + }); + + console.log('Inserted account with ID:', accountId); + + // Retrieve the account + const account = await motr.getAccount(accountId); + console.log('Retrieved account:', account); + + // Insert a new credential + const credentialId = await motr.insertCredential({ + subject: 'john@example.com', + label: 'John\'s Device', + controller: 'sample_controller', + attestationType: 'platform', + origin: 'https://app.sonr.io' + }); + + console.log('Inserted credential with ID:', credentialId); + + // Retrieve the credential + const credential = await motr.getCredential(credentialId); + console.log('Retrieved credential:', credential); + + document.getElementById('output').innerHTML = ` + "`" + ` +

    Demo Results:

    +

    Inserted account ID: ${accountId}

    +

    Retrieved account name: ${account.name}

    +

    Inserted credential ID: ${credentialId}

    +

    Retrieved credential subject: ${credential.subject}

    + ` + "`" + `; + } catch (error) { + console.error('Error in demo:', error); + document.getElementById('output').innerHTML = ` + "`" + `

    Error: ${error.message}

    ` + "`" + `; + } + } + // Run the demo when the page loads + window.onload = demo; +}`, + Call: templ.SafeScript(`__templ_initializeMotr_d70f`, config), + CallInline: templ.SafeScriptInline(`__templ_initializeMotr_d70f`, config), + } +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/vault/motr.mjs b/pkg/vault/motr.mjs new file mode 100644 index 000000000..cde5b7a68 --- /dev/null +++ b/pkg/vault/motr.mjs @@ -0,0 +1,253 @@ +// motr.mjs + +import Dexie from "dexie"; + +export class Motr { + constructor(config) { + this.config = config; + this.vault = null; + this.initializeVault(); + } + + initializeVault() { + const { schema } = this.config; + this.vault = new Dexie("Vault"); + this.vault.version(schema.version).stores(schema); + } + + // Account methods + async insertAccount(accountData) { + return this.vault.account.add(accountData); + } + + async getAccount(id) { + return this.vault.account.get(id); + } + + async updateAccount(id, accountData) { + return this.vault.account.update(id, accountData); + } + + async deleteAccount(id) { + return this.vault.account.delete(id); + } + + // Asset methods + async insertAsset(assetData) { + return this.vault.asset.add(assetData); + } + + async getAsset(id) { + return this.vault.asset.get(id); + } + + async updateAsset(id, assetData) { + return this.vault.asset.update(id, assetData); + } + + async deleteAsset(id) { + return this.vault.asset.delete(id); + } + + // Chain methods + async insertChain(chainData) { + return this.vault.chain.add(chainData); + } + + async getChain(id) { + return this.vault.chain.get(id); + } + + async updateChain(id, chainData) { + return this.vault.chain.update(id, chainData); + } + + async deleteChain(id) { + return this.vault.chain.delete(id); + } + + // Credential methods + async insertCredential(credentialData) { + const publicKey = await this.createPublicKeyCredential(credentialData); + credentialData.credentialId = publicKey.id; + credentialData.publicKey = publicKey.publicKey; + return this.vault.credential.add(credentialData); + } + + async getCredential(id) { + return this.vault.credential.get(id); + } + + async updateCredential(id, credentialData) { + return this.vault.credential.update(id, credentialData); + } + + async deleteCredential(id) { + return this.vault.credential.delete(id); + } + + // JWK methods + async insertJwk(jwkData) { + return this.vault.jwk.add(jwkData); + } + + async getJwk(id) { + return this.vault.jwk.get(id); + } + + async updateJwk(id, jwkData) { + return this.vault.jwk.update(id, jwkData); + } + + async deleteJwk(id) { + return this.vault.jwk.delete(id); + } + + // Grant methods + async insertGrant(grantData) { + return this.vault.grant.add(grantData); + } + + async getGrant(id) { + return this.vault.grant.get(id); + } + + async updateGrant(id, grantData) { + return this.vault.grant.update(id, grantData); + } + + async deleteGrant(id) { + return this.vault.grant.delete(id); + } + + // Keyshare methods + async insertKeyshare(keyshareData) { + return this.vault.keyshare.add(keyshareData); + } + + async getKeyshare(id) { + return this.vault.keyshare.get(id); + } + + async updateKeyshare(id, keyshareData) { + return this.vault.keyshare.update(id, keyshareData); + } + + async deleteKeyshare(id) { + return this.vault.keyshare.delete(id); + } + + // PublicKey methods + async insertPublicKey(publicKeyData) { + return this.vault.publicKey.add(publicKeyData); + } + + async getPublicKey(id) { + return this.vault.publicKey.get(id); + } + + async updatePublicKey(id, publicKeyData) { + return this.vault.publicKey.update(id, publicKeyData); + } + + async deletePublicKey(id) { + return this.vault.publicKey.delete(id); + } + + // Profile methods + async insertProfile(profileData) { + return this.vault.profile.add(profileData); + } + + async getProfile(id) { + return this.vault.profile.get(id); + } + + async updateProfile(id, profileData) { + return this.vault.profile.update(id, profileData); + } + + async deleteProfile(id) { + return this.vault.profile.delete(id); + } + + // WebAuthn methods + async createPublicKeyCredential(options) { + const publicKeyCredentialCreationOptions = { + challenge: new Uint8Array(32), + rp: { + name: this.config.motr.origin, + id: new URL(this.config.motr.origin).hostname, + }, + user: { + id: new TextEncoder().encode(options.subject), + name: options.subject, + displayName: options.label, + }, + pubKeyCredParams: [ + { alg: -7, type: "public-key" }, + { alg: -257, type: "public-key" }, + ], + authenticatorSelection: { + authenticatorAttachment: "platform", + userVerification: "required", + }, + timeout: 60000, + attestation: "direct", + }; + + try { + const credential = await navigator.credentials.create({ + publicKey: publicKeyCredentialCreationOptions, + }); + + const publicKeyJwk = await crypto.subtle.exportKey( + "jwk", + credential.response.getPublicKey(), + ); + + return { + id: credential.id, + publicKey: publicKeyJwk, + type: credential.type, + transports: credential.response.getTransports(), + }; + } catch (error) { + console.error("Error creating credential:", error); + throw error; + } + } + + async getPublicKeyCredential(options) { + const publicKeyCredentialRequestOptions = { + challenge: new Uint8Array(32), + rpId: new URL(this.config.motr.origin).hostname, + allowCredentials: options.allowCredentials || [], + userVerification: "required", + timeout: 60000, + }; + + try { + const assertion = await navigator.credentials.get({ + publicKey: publicKeyCredentialRequestOptions, + }); + + return { + id: assertion.id, + type: assertion.type, + rawId: new Uint8Array(assertion.rawId), + response: { + authenticatorData: new Uint8Array( + assertion.response.authenticatorData, + ), + clientDataJSON: new Uint8Array(assertion.response.clientDataJSON), + signature: new Uint8Array(assertion.response.signature), + userHandle: new Uint8Array(assertion.response.userHandle), + }, + }; + } catch (error) { + console.error("Error getting credential:", error); + throw error; + } + } +} diff --git a/pkg/vault/sw.js b/pkg/vault/sw.js new file mode 100644 index 000000000..2bd825859 --- /dev/null +++ b/pkg/vault/sw.js @@ -0,0 +1,16 @@ +importScripts( + "https://cdn.jsdelivr.net/gh/golang/go@go1.22.5/misc/wasm/wasm_exec.js", + "https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js", +); + +registerWasmHTTPListener("/app.wasm"); + +// Skip installed stage and jump to activating stage +self.addEventListener("install", (event) => { + event.waitUntil(skipWaiting()); +}); + +// Start controlling clients as soon as the SW is activated +self.addEventListener("activate", (event) => { + event.waitUntil(clients.claim()); +}); diff --git a/pkg/vault/vault.go b/pkg/vault/vault.go new file mode 100644 index 000000000..1260bd682 --- /dev/null +++ b/pkg/vault/vault.go @@ -0,0 +1,61 @@ +package vault + +import ( + "github.com/cosmos/cosmos-sdk/types/bech32" + "github.com/ipfs/boxo/files" + "github.com/onsonr/crypto/mpc" + "github.com/onsonr/sonr/config/dwn" +) + +type SchemaVersion = int + +var CurrentSchemaVersion SchemaVersion = 1 + +type Vault struct { + FS files.Node + ValKs mpc.Share +} + +func New(subject string, origin string, chainID string) (*Vault, error) { + shares, err := mpc.GenerateKeyshares() + var ( + valKs = shares[0] + usrKs = shares[1] + ) + usrKsJSON, err := usrKs.Marshal() + if err != nil { + return nil, err + } + + sonrAddr, err := bech32.ConvertAndEncode("idx", valKs.GetPublicKey()) + if err != nil { + return nil, err + } + + cnfg := NewConfig(usrKsJSON, sonrAddr, chainID, DefaultSchema()) + + fileMap, err := NewVaultDirectory(cnfg) + if err != nil { + return nil, err + } + + return &Vault{ + FS: fileMap, + ValKs: valKs, + }, nil +} + +func DefaultSchema() *dwn.Schema { + return &dwn.Schema{ + Version: CurrentSchemaVersion, + Account: "++, id, name, address, publicKey, chainCode, index, controller, createdAt", + Asset: "++, id, name, symbol, decimals, chainCode, createdAt", + Chain: "++, id, name, networkId, chainCode, createdAt", + Credential: "++, id, subject, controller, attestationType, origin, label, deviceId, credentialId, publicKey, transport, signCount, userPresent, userVerified, backupEligible, backupState, cloneWarning, createdAt, updatedAt", + Jwk: "++, kty, crv, x, y, n, e", + Grant: "++, subject, controller, origin, token, scopes, createdAt, updatedAt", + Keyshare: "++, id, data, role, createdAt, lastRefreshed", + PublicKey: "++, role, algorithm, encoding, curve, key_type, raw, jwk", + Profile: "++, id, subject, controller, originUri, publicMetadata, privateMetadata, createdAt, updatedAt", + } +} diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto deleted file mode 100644 index f189a6a7b..000000000 --- a/proto/did/v1/accounts.proto +++ /dev/null @@ -1,4 +0,0 @@ -syntax = "proto3"; -package did.v1; - -option go_package = "github.com/onsonr/hway/x/did/types"; diff --git a/proto/did/v1/enums.proto b/proto/did/v1/enums.proto deleted file mode 100644 index d7a1bd08b..000000000 --- a/proto/did/v1/enums.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package did.v1; - -import "gogoproto/gogo.proto"; -import "amino/amino.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_PROFILE_NAME = 1; - PERMISSION_SCOPE_IDENTIFIERS_EMAIL = 2; - PERMISSION_SCOPE_IDENTIFIERS_PHONE = 3; - PERMISSION_SCOPE_TRANSACTIONS_READ = 4; - PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; - PERMISSION_SCOPE_WALLETS_READ = 6; - PERMISSION_SCOPE_WALLETS_CREATE = 7; - PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; - PERMISSION_SCOPE_WALLETS_UPDATE = 9; - PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; - PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; - PERMISSION_SCOPE_ADMIN_USER = 12; - PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; -} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 45e8cde45..03e7f69be 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -5,9 +5,6 @@ import "amino/amino.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -import "did/v1/types.proto"; - -option go_package = "github.com/onsonr/hway/x/did/types"; // GenesisState defines the module genesis state message GenesisState { @@ -63,7 +60,7 @@ message AssetInfo { string symbol = 3; // The coin name - AssetType asset_type = 4; + string asset_type = 4; // The name of the asset string name = 5; @@ -72,158 +69,54 @@ message AssetInfo { string icon_url = 6; } +// Document defines a DID document +message Document { + string id = 1; + string controller = 2; // The DID of the controller + repeated string authentication = 3; + repeated string assertion_method = 4; + repeated string capability_delegation = 5; + repeated string capability_invocation = 6; + repeated string service = 7; +} + // KeyInfo defines information for accepted PubKey types message KeyInfo { - 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" + string role = 1; + string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" + string encoding = 3; // e.g., "hex", "base64", "multibase" + string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1" + string type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" } -// ValidatorInfo defines information for accepted Validator nodes -message ValidatorInfo { - string moniker = 1; - repeated Endpoint grpc_endpoints = 2; - repeated Endpoint rest_endpoints = 3; - ExplorerInfo explorer = 4; - FeeInfo fee_info = 5; - IBCChannel ibc_channel = 6; +// PubKey defines a public key for a did +message PubKey { + string role = 1; + string algorithm = 2; + string encoding = 3; + string curve = 4; + string key_type = 5; + bytes raw = 6; + JWK jwk = 7; - // Endpoint defines an endpoint - message Endpoint { - string url = 1; - bool is_primary = 2; - } - - // ExplorerInfo defines the explorer info - message ExplorerInfo { - string name = 1; - string url = 2; - } - - // FeeInfo defines a fee info - message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; - } - - // IBCChannel defines the IBC channel info - message IBCChannel { - string id = 1; - string port = 2; + // JWK represents a JSON Web Key + message JWK { + string kty = 1; // Key Type + string crv = 2; // Curve (for EC and OKP keys) + string x = 3; // X coordinate (for EC and OKP keys) + string y = 4; // Y coordinate (for EC keys) + string n = 5; // Modulus (for RSA keys) + string e = 6; // Exponent (for RSA keys) } } -// -// [Constant Enumerations] -// - -// 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; +// Service defines a Decentralized Service on the Sonr Blockchain +message Service { + string id = 1; + string service_type = 2; + string authority = 3; + string origin = 4; + string description = 5; + map service_endpoints = 6; + map permissions = 7; } - -// 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_ECDSA = 6; // Fixed typo from EDCSA to ECDSA -} - -// KeyCurve defines the key curve -enum KeyCurve { - KEY_CURVE_UNSPECIFIED = 0; - KEY_CURVE_P256 = 1; // NIST P-256 - 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; - KEY_CURVE_BLS12381 = 9; - KEY_CURVE_KECCAK256 = 10; -} - -// KeyEncoding defines the key encoding -enum KeyEncoding { - KEY_ENCODING_UNSPECIFIED = 0; - KEY_ENCODING_RAW = 1; - KEY_ENCODING_HEX = 2; - KEY_ENCODING_MULTIBASE = 3; -} - -// KeyRole defines the kind of key -enum KeyRole { - KEY_ROLE_UNSPECIFIED = 0; - 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; - KEY_TYPE_MPC = 6; - KEY_TYPE_ZK = 7; - KEY_TYPE_WEBAUTHN = 8; - KEY_TYPE_BIP32 = 9; -} - -enum KeyshareRole { - KEYSHARE_ROLE_UNSPECIFIED = 0; - KEYSHARE_ROLE_USER = 1; - KEYSHARE_ROLE_VALIDATOR = 2; -} - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_BASIC_INFO = 1; - PERMISSION_SCOPE_PERMISSIONS_READ = 2; - PERMISSION_SCOPE_PERMISSIONS_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 deleted file mode 100644 index 798784e36..000000000 --- a/proto/did/v1/models.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package did.v1; - -import "did/v1/genesis.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/onsonr/sonr/x/did/types"; - -// Alias defines a subject/origin pair -message Alias { - string subject = 1; - string origin = 2; - string controller = 3; -} - -message Credential { - string subject = 1; - string attestation_type = 2; - string origin = 3; - bytes credential_id = 4; - bytes public_key = 5; - repeated string transport = 6; - uint32 sign_count = 7; - bool user_present = 8; - bool user_verified = 9; - bool backup_eligible = 10; - bool backup_state = 11; - bool clone_warning = 12; -} - -// Document defines a DID document -message Document { - string id = 1; - string controller = 2; // The DID of the controller - repeated string authentication = 3; - repeated string assertion_method = 4; - repeated string capability_delegation = 5; - repeated string capability_invocation = 6; - repeated string service = 7; -} - -// Keyshare defines a keyshare from the MPC protocol -message Keyshare { - map metadata = 1; - map payloads = 2; - string protocol = 3; - bytes public_key = 4; - uint32 version = 5; - int32 role = 6; // 0 =none, 1 = validator, 2 = user -} - -// Permissions contains a list of grants and access control rules for -// a Service. -message Permissions { - repeated DIDNamespace grants = 1; - repeated PermissionScope scopes = 2; -} - -// PubKey defines a public key for a did -message PubKey { - KeyRole role = 1; - KeyAlgorithm algorithm = 2; - KeyEncoding encoding = 3; - KeyCurve curve = 4; - KeyType key_type = 5; - bytes raw = 6; - JWK jwk = 7; - - // JWK represents a JSON Web Key - message JWK { - string kty = 1; // Key Type - string crv = 2; // Curve (for EC and OKP keys) - string x = 3; // X coordinate (for EC and OKP keys) - string y = 4; // Y coordinate (for EC keys) - string n = 5; // Modulus (for RSA keys) - string e = 6; // Exponent (for RSA keys) - } -} - -// Service defines a Decentralized Service on the Sonr Blockchain -message Service { - string id = 1; - string service_type = 2; - string authority = 3; - string origin = 4; - string description = 5; - map service_endpoints = 6; - Permissions permissions = 7; -} - -// ServicceInfo defines a Decentralized Service on the Sonr Blockchain -message ServiceInfo { - bool exists = 1; - string origin = 2; - string fingerprint = 3; - Service service = 4; -} - -// FirstPartyCaveat defines a first party caveat -message FirstPartyCaveat { - Permissions scope = 1; - int64 exp = 2; - string cnf = 3; - string aud = 4; -} - -// ThirdPartyCaveat defines a third party caveat -message ThirdPartyCaveat { - Permissions scope = 1; - int64 exp = 2; - string cnf = 3; - string aud = 4; -} diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 4daf8ecd0..b7a743b3e 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -2,9 +2,7 @@ syntax = "proto3"; package did.v1; import "did/v1/genesis.proto"; -import "did/v1/models.proto"; import "google/api/annotations.proto"; -import "did/v1/types.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; @@ -15,41 +13,14 @@ service Query { option (google.api.http).get = "/params"; } - // ParamsAssets queries all parameters of the module. - rpc ParamsAssets(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/assets"; - } - - // Params queries all parameters of the module. - rpc ParamsByAsset(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/assets/{asset}"; - } - - // ParamsKeys queries all parameters of the module. - rpc ParamsKeys(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/keys"; - } - - // Params queries all parameters of the module. - rpc ParamsByKey(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/keys/{key}"; - } - - // Params queries all parameters of the module. - rpc RegistrationOptionsByKey(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/params/keys/{key}/registration"; - } - // Resolve queries the DID document by its id. - rpc Resolve(QueryRequest) returns (QueryResponse) { + rpc Resolve(QueryRequest) returns (QueryResolveResponse) { option (google.api.http).get = "/did/{did}"; } - // Service returns associated ServiceInfo for a given Origin - // if the servie is not found, a fingerprint is generated to be used - // as a TXT record in DNS. v=sonr, o=origin, p=protocol - rpc Service(QueryRequest) returns (QueryResponse) { - option (google.api.http).get = "/service/{origin}"; + // Sync queries the DID document by its id. And returns the required PKL information + rpc Sync(SyncRequest) returns (SyncResponse) { + option (google.api.http).post = "/sync"; } } @@ -66,118 +37,27 @@ message QueryResponse { bool success = 1; string query = 2; Document document = 3; - ServiceInfo service = 4; Params params = 5; } -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - Params params = 1; -} - -message QueryParamsAssetsResponse { - repeated AssetInfo assets = 1; - // Accounts returns associated wallet accounts with the DID. - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/did/{did}/accounts"; - } - - // Credentials returns associated credentials with the DID and Service Origin. - rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) { - option (google.api.http).get = "/did/{did}/{origin}/credentials"; - } - - // Identities returns associated identity with the DID. - rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) { - option (google.api.http).get = "/did/{did}/identities"; - } - - // Resolve queries the DID document by its id. - rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) { - option (google.api.http).get = "/did/resolve/{did}"; - } - - // Service returns associated ServiceInfo for a given Origin - rpc Service(QueryServiceRequest) returns (QueryServiceResponse) { - option (google.api.http).get = "/did/service/{origin}"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; } -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -message QueryAccountsRequest { - string did = 1; -} - -// QueryAccountsResponse is the response type for the Query/Exists RPC method. -message QueryAccountsResponse { - bool exists = 1; -} - -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -message QueryCredentialsRequest { - string did = 1; - string origin = 2; -} - -// QueryCredentialsResponse is the response type for the Query/Exists RPC method. -message QueryCredentialsResponse { - map credentials = 1; -} - -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -message QueryIdentitiesRequest { - string did = 1; -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -message QueryIdentitiesResponse { - bool exists = 1; - repeated VerificationMethod verificationMethod = 2; -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -message QueryResolveRequest { - string did = 1; -} - // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResolveResponse { - // document is the DID document - Document document = 1; + // document is the DID document + Document document = 1; } -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -message QueryServiceRequest { - string origin = 1; +// SyncRequest is the request type for the Sync RPC method. +message SyncRequest { + string did = 1; } -// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -message QueryServiceResponse { - // options is the PublicKeyCredentialAttestationOptions - string options = 1; -} - -message QueryParamsKeysResponse { - map keys = 1; -} - -message QueryParamsByKeyResponse { - KeyInfo key = 1; -} - -message QueryParamsByAssetResponse { - AssetInfo asset = 1; -} - -message QueryRegistrationOptionsByKeyResponse { - repeated string registration_options = 1; +// SyncResponse is the response type for the Sync RPC method. +message SyncResponse { + bool success = 1; } diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 08b340e4d..4c40b7627 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -4,80 +4,29 @@ package did.v1; import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; -import "did/v1/models.proto"; -import "did/v1/enums.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -// Account represents a wallet account associated with a DID Controller -message Account { +// Alias represents a DID alias +message Alias { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "id"} index: { id: 1 - fields: "controller,label" + fields: "subject,origin" unique: true } - index: { - id: 2 - fields: "controller,address" - unique: true - } - index: { - id: 3 - fields: "controller,chain_code,index" - unique: true - } - index: { id: 1, fields: "subject", unique: true } - }; + }; // The unique identifier of the alias string id = 1; - // Origin is the Alias provider - string origin = 2; + // The alias of the DID + string subject = 2; - // Subject is the user defined alias - string subject = 3; - - // Controller of the alias - string controller = 4; - - // Expiration of the alias - uint64 expiration = 5; -} - -// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) -message Assertion { - option (cosmos.orm.v1.table) = { - id: 2 - primary_key: {fields: "id"} - }; - - // The unique identifier of the account - string id = 1; - - // The controller of the account - string controller = 2; - - // The value of the linked identifier - PubKey public_key = 3; - - // The address of the account - string address = 4; - - // The label of the account - string label = 5; - - // The bip32 chain code - uint32 chain_code = 6; - - // The index of the account - uint32 index = 7; - - // The supported chains of the account - repeated string chains = 8; + // Origin of the alias + string origin = 3; } // Controller represents a Sonr DWN Vault @@ -87,113 +36,77 @@ message Controller { primary_key: {fields: "id"} index: { id: 1 - fields: "address" + fields: "sonr_address" unique: true } index: { id: 2 + fields: "eth_address" + unique: true + } + index: { + id: 3 + fields: "btc_address" + unique: true + } + index: { + id: 4 fields: "vault_cid" unique: true } + index: { + id: 5 + fields: "status,vault_cid" + unique: true + } }; // The unique identifier of the controller string id = 1; // The DID of the controller - string address = 2; + string sonr_address = 2; + + // The DID of the controller + string eth_address = 3; + + // The DID of the controller + string btc_address = 4; // Aliases of the controller - repeated Alias aliases = 3; + repeated string aliases = 5; // PubKey is the verification method - PubKey public_key = 4; + PubKey public_key = 6; // The vault address or identifier - string vault_cid = 5; + string vault_cid = 7; // The Authentications of the controller - repeated Credential authentication = 6; + repeated string authentication = 8; + + // The Status of the claims for the controller + string status = 9; } -// Proof represents a verifiable credential -message Proof { +// Verification reprsents a method of verifying membership in a DID +message Verification { option (cosmos.orm.v1.table) = { id: 4 primary_key: {fields: "id"} index: { id: 1 - fields: "controller,issuer,property" - unique: true - } - }; - - // The unique identifier of the proof - string id = 1; - - // The controller of the proof - string controller = 2; - - // The value of the linked identifier - string issuer = 3; - - // The property of the proof - string property = 4; - - // The accumulator of the proof - bytes accumulator = 5; - - // The secret key of the proof - bytes key = 6; -} - -// ServiceRecord represents a decentralized service in a DID Document -message ServiceRecord { - option (cosmos.orm.v1.table) = { - id: 3 - primary_key: {fields: "id"} - index: { - id: 1 - fields: "origin" + fields: "issuer,subject" unique: true } index: { id: 2 - fields: "authority,origin" + fields: "controller,did_method,issuer" unique: true } - }; - - // The ID of the service - string id = 1; - - // The type of the service - string service_type = 2; - - // The authority DID of the service - string authority = 3; - - // The domain name of the service - string origin = 4; - - // The description of the service - string description = 5; - - // The service endpoint - map service_endpoints = 6; - - // Scopes is the Authorization Grants of the service - Permissions permissions = 7; -} - -// Verification reprsents a method of verifying membership in a DID -message VerificationMethod { - option (cosmos.orm.v1.table) = { - id: 5 - primary_key: {fields: "id"} index: { - id: 1 - fields: "controller,method,issuer,subject" + id: 3 + fields: "verification_type,subject,issuer" unique: true } }; @@ -205,7 +118,7 @@ message VerificationMethod { string controller = 2; // The DIDNamespace of the verification - DIDNamespace method = 3; + string did_method = 3; // The value of the linked identifier string issuer = 4; @@ -215,15 +128,7 @@ message VerificationMethod { // The public key of the verification PubKey public_key = 6; - // The controller DID of the service - string controller_did = 3; - // The domain name of the service - string origin_uri = 4; - - // The service endpoint - map service_endpoints = 5; - - // Scopes is the Authorization Grants of the service - repeated PermissionScope scopes = 6; + // The Verification Type (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation) + string verification_type = 7; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index 4a6084d57..7e620dfad 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,12 +3,8 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; -import "did/v1/enums.proto"; -import "did/v1/genesis.proto"; -import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "did/v1/genesis.proto"; -import "did/v1/models.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; @@ -28,52 +24,13 @@ service Msg { // this operation is called by services initiating a controller registration. rpc AllocateVault(MsgAllocateVault) returns (MsgAllocateVaultResponse); - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - rpc SyncController(MsgSyncController) returns (MsgSyncControllerResponse); - // 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); - // Authenticate asserts the given controller is the owner of the given address. - rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse); - - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - rpc ProveWitness(MsgProveWitness) returns (MsgProveWitnessResponse); - - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse); - - // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); - - // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. - rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); } -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the parameters to update. - Params params = 2 [(gogoproto.nullable) = false]; - - // token is the macron token to authenticate the operation. - string token = 3; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} - // MsgAllocateVault is the message type for the AllocateVault RPC. message MsgAllocateVault { option (cosmos.msg.v1.signer) = "authority"; @@ -97,121 +54,27 @@ message MsgAllocateVaultResponse { int64 expiry_block = 2; // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn - string registration_options = 3; + string token = 3; // IsLocalhost is a flag to indicate if the vault is localhost bool localhost = 4; } -// MsgProveWitness is the message type for the ProveWitness RPC. -message MsgProveWitness { - option (cosmos.msg.v1.signer) = "authority"; -// MsgAuthenticate is the message type for the Authenticate RPC. -message MsgAuthenticate { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // property is key to prove. - string property = 2; - - // Witness Value is the bytes of the witness. - bytes witness = 3; - - // token is the macron token to authenticate the operation. - string token = 4; -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -message MsgProveWitnessResponse { - bool success = 1; - string property = 2; -} - -// MsgSyncController is the message type for the SyncController RPC. -message MsgSyncController { - option (cosmos.msg.v1.signer) = "controller"; - - // controller is the address of the controller to sync. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Token is the public token to authenticate the operation. - string token = 3; -} - -// MsgSyncControllerResponse is the response type for the SyncController RPC. -message MsgSyncControllerResponse { - bool success = 1; -} - // MsgRegisterController is the message type for the InitializeController RPC. message MsgRegisterController { -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -message MsgAuthenticateResponse {} - -// MsgProveWitness is the message type for the ProveWitness RPC. -message MsgProveWitness { option (cosmos.msg.v1.signer) = "authority"; // 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; + repeated bytes assertions = 2; - // Origin is the origin of the request in wildcard form. - string origin = 3; + // Keyshares is the list of keyshares to initialize the controller with. + repeated bytes keyshares = 3; - // Credential is the list of keyshares to initialize the controller with. - string credential_creation_response = 4; - // property is key to prove. - string property = 2; - - // Witness Value is the bytes of the witness. - bytes witness = 3; -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -message MsgProveWitnessResponse { - bool success = 1; - string property = 2; -} - -// MsgSyncVault is the message type for the SyncVault RPC. -message MsgSyncVault { - option (cosmos.msg.v1.signer) = "controller"; - - // controller is the address of the controller to sync. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // cid is the IPFS content identifier. - string cid = 2; - - // Macroon is the public token to authenticate the operation. - bytes macron = 3; -} - -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -message MsgSyncVaultResponse { - bool success = 1; -} - -// MsgRegisterController is the message type for the InitializeController RPC. -message MsgRegisterController { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Assertions is the list of assertions to initialize the controller with. - repeated bytes assertions = 2; - - // Keyshares is the list of keyshares to initialize the controller with. - repeated bytes keyshares = 3; - - // Verifications is the list of verifications to initialize the controller with. - repeated bytes verifications = 4; + // Verifications is the list of verifications to initialize the controller with. + repeated bytes verifications = 4; } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. @@ -237,7 +100,7 @@ message MsgAuthorizeService { string origin = 2; // Permissions is the scope of the service. - Permissions scopes = 3; + map permissions = 3; // token is the macron token to authenticate the operation. string token = 4; @@ -247,11 +110,6 @@ message MsgAuthorizeService { message MsgAuthorizeServiceResponse { bool success = 1; string token = 2; - // Controller is the address of the initialized controller. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Accounts are a Address Map and Supported coin Denoms for the controller - map accounts = 2; } // MsgRegisterService is the message type for the RegisterService RPC. @@ -263,19 +121,6 @@ message MsgRegisterService { // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. Service service = 2; - - // token is the macron token to authenticate the operation. - string token = 3; - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // origin is the origin of the request in wildcard form. - string origin_uri = 2; - - // PermissionScope is the scope of the service. - repeated PermissionScope scopes = 3; } // MsgRegisterServiceResponse is the response type for the RegisterService RPC. @@ -283,3 +128,25 @@ message MsgRegisterServiceResponse { bool success = 1; string did = 2; } + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the parameters to update. + Params params = 2 [(gogoproto.nullable) = false]; + + // token is the macron token to authenticate the operation. + string token = 3; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/did/v1/types.proto b/proto/did/v1/types.proto deleted file mode 100644 index 1e7b87cfb..000000000 --- a/proto/did/v1/types.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package did.v1; - -import "cosmos/msg/v1/msg.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/onsonr/hway/x/did/types"; - -// AssetInfo defines the asset info -message AssetInfo { - string id = 1; - string denom = 2; - string symbol = 3; - string asset_type = 4; - string origin_chain = 5; - string origin_denom = 6; - int32 decimals = 7; - string description = 8; - string image_url = 9; - string coingecko_id = 10; - bool is_enabled = 11; - string ibc_path = 12; - string ibc_channel = 13; - string ibc_port = 14; -} - -// ChainInfo defines the chain info -message ChainInfo { - string id = 1; - string chain_id = 2; - string name = 3; - string symbol = 4; - string bech32_prefix = 5; - string genesis_time = 6; - repeated Endpoint grpc_endpoints = 7; - repeated Endpoint rest_endpoints = 8; - ExplorerInfo explorer = 9; - FeeInfo fee_info = 10; -} - -// Credential defines a WebAuthn credential -message Credential { - string id = 1; - string credential_type = 2; - bytes credential_id = 3; - repeated string transport = 4; - string attestation_type = 5; - string display_name = 6; - string controller = 7; -} - -// Document defines a DID document -message Document { - string id = 1; - repeated VerificationMethod verification_methods = 2; - repeated string authentication = 4; - repeated string assertion_method = 5; - repeated string capability_delegation = 7; - repeated string capability_invocation = 8; -} - -// Endpoint defines an endpoint -message Endpoint { - string url = 1; - bool is_primary = 2; -} - -// ExplorerInfo defines the explorer info -message ExplorerInfo { - string name = 1; - string url = 2; -} - -// FeeInfo defines a fee info -message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; -} - -// Identity defines an associated profile for a did subject -message Identity { - string id = 1; - string subject = 2; - string controller = 3; - repeated Credential credentials = 4; - repeated VerificationMethod verification_methods = 5; -} - -// PubKey defines a public key for a did -message PubKey { - string id = 1; - bytes key = 2; - string key_type = 3; - string controller = 4; -} - -// VerificationMethod defines a verification method -message VerificationMethod { - string id = 1; - string controller = 2; - - // The delegation proof or verification method - string public_key_multibase = 3; - - // Public Key JWKS is a map of the associated public keys - map public_key_jwks = 4; -} - - diff --git a/x/did/keeper/context.go b/x/did/keeper/context.go index 07bc22f72..bae765c07 100644 --- a/x/did/keeper/context.go +++ b/x/did/keeper/context.go @@ -2,31 +2,67 @@ package keeper import ( "context" + "crypto/sha256" + "fmt" + "time" + nftkeeper "cosmossdk.io/x/nft/keeper" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/onsonr/sonr/x/did/builder" + "github.com/ipfs/boxo/path" + "github.com/ipfs/kubo/client/rpc" + "github.com/ipfs/kubo/core/coreiface/options" + "github.com/onsonr/sonr/pkg/vault" "github.com/onsonr/sonr/x/did/types" "google.golang.org/grpc/peer" + "gopkg.in/macaroon.v2" ) -type Context struct { - SDKCtx sdk.Context - Keeper Keeper - Peer *peer.Peer -} - -func (k Keeper) CurrentCtx(goCtx context.Context) Context { +func (k Keeper) UnwrapCtx(goCtx context.Context) Context { ctx := sdk.UnwrapSDKContext(goCtx) peer, _ := peer.FromContext(goCtx) return Context{SDKCtx: ctx, Peer: peer, Keeper: k} } -func (c Context) Params() *types.Params { - return c.Keeper.GetParams(c.SDK()) +type Context struct { + SDKCtx sdk.Context + Keeper Keeper + Peer *peer.Peer + NFTKeeper nftkeeper.Keeper } -func (c Context) SDK() sdk.Context { - return c.SDKCtx +// AssembleVault assembles the initial vault +func (k Keeper) AssembleVault(ctx Context, subject string, origin string) (string, int64, error) { + v, err := vault.New(subject, origin, "sonr-testnet") + if err != nil { + return "", 0, err + } + cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS) + if err != nil { + return "", 0, err + } + return cid.String(), ctx.CalculateExpiration(time.Second * 15), nil +} + +// AverageBlockTime returns the average block time in seconds +func (c Context) AverageBlockTime() float64 { + return float64(c.SDK().BlockTime().Sub(c.SDK().BlockTime()).Seconds()) +} + +// GetExpirationBlockHeight returns the block height at which the given duration will have passed +func (c Context) CalculateExpiration(duration time.Duration) int64 { + return c.SDKCtx.BlockHeight() + int64(duration.Seconds()/c.AverageBlockTime()) +} + +// IPFSConnected returns true if the IPFS client is initialized +func (c Context) IPFSConnected() bool { + if c.Keeper.ipfsClient == nil { + ipfsClient, err := rpc.NewLocalApi() + if err != nil { + return false + } + c.Keeper.ipfsClient = ipfsClient + } + return c.Keeper.ipfsClient != nil } func (c Context) IsAnonymous() bool { @@ -36,6 +72,35 @@ func (c Context) IsAnonymous() bool { return c.Peer.Addr == nil } +// IssueMacaroon creates a macaroon with the specified parameters. +func (c Context) IssueMacaroon(sharedMPCPubKey, location, id string, blockExpiry uint64) (*macaroon.Macaroon, error) { + // Derive the root key by hashing the shared MPC public key + rootKey := sha256.Sum256([]byte(sharedMPCPubKey)) + // Create the macaroon + m, err := macaroon.New(rootKey[:], []byte(id), location, macaroon.LatestVersion) + if err != nil { + return nil, err + } + + // Add the block expiry caveat + caveat := fmt.Sprintf("block-expiry=%d", blockExpiry) + err = m.AddFirstPartyCaveat([]byte(caveat)) + if err != nil { + return nil, err + } + + return m, nil +} + +func (c Context) Params() *types.Params { + p, err := c.Keeper.Params.Get(c.SDK()) + if err != nil { + p = types.DefaultParams() + } + params := p.ActiveParams(c.IPFSConnected()) + return ¶ms +} + func (c Context) PeerID() string { if c.Peer == nil { return "" @@ -43,18 +108,58 @@ func (c Context) PeerID() string { return c.Peer.Addr.String() } -func (c Context) GetService(origin string) (*types.Service, error) { - rec, err := c.Keeper.OrmDB.ServiceRecordTable().GetByOrigin(c.SDK(), origin) +// PinVaultController pins the initial vault to the local IPFS node +func (k Keeper) PinVaultController(_ sdk.Context, cid string, address string) (bool, error) { + // Resolve the path + path, err := path.NewPath(cid) if err != nil { - return nil, err + return false, err } - return builder.ModuleFormatAPIServiceRecord(rec), nil + + // 1. Initialize vault.db sqlite database in local IPFS with Mount + + // 2. Insert the InitialWalletAccounts + + // 3. Publish the path to the IPNS + _, err = k.ipfsClient.Name().Publish(context.Background(), path, options.Name.Key(address)) + if err != nil { + return false, err + } + + // 4. Insert the accounts into x/auth + + // 5. Insert the controller into state + return true, nil } -func (c Context) GetServiceInfo(origin string) *types.ServiceInfo { - rec, _ := c.GetService(origin) - if rec == nil { - return &types.ServiceInfo{Exists: false, Origin: origin, Fingerprint: types.ComputeOriginTXTRecord(origin)} - } - return &types.ServiceInfo{Exists: true, Origin: origin, Fingerprint: types.ComputeOriginTXTRecord(origin), Service: rec} +func (c Context) SDK() sdk.Context { + return c.SDKCtx +} + +// ValidateOrigin checks if a service origin is valid +func (c Context) ValidateOrigin(origin string) error { + if origin == "localhost" { + return nil + } + return types.ErrInvalidServiceOrigin +} + +// VerifyMinimumStake checks if a validator has a minimum stake +func (c Context) VerifyMinimumStake(addr string) bool { + address, err := sdk.AccAddressFromBech32(addr) + if err != nil { + return false + } + addval, err := sdk.ValAddressFromBech32(addr) + if err != nil { + return false + } + del, err := c.Keeper.StakingKeeper.GetDelegation(c.SDK(), address, addval) + if err != nil { + return false + } + if del.Shares.IsZero() { + return false + } + return del.Shares.IsPositive() } diff --git a/x/did/keeper/genesis.go b/x/did/keeper/genesis.go index 381f971e5..c1ff8a62a 100644 --- a/x/did/keeper/genesis.go +++ b/x/did/keeper/genesis.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/log" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ipfs/boxo/path" "github.com/onsonr/sonr/x/did/types" ) @@ -21,7 +22,6 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) erro if err := data.Params.Validate(); err != nil { return err } - return k.Params.Set(ctx, data.Params) } @@ -55,22 +55,19 @@ func (k Keeper) CheckValidatorExists(ctx sdk.Context, addr string) bool { return false } -// GetAverageBlockTime returns the average block time in seconds -func (k Keeper) GetAverageBlockTime(ctx sdk.Context) float64 { - return float64(ctx.BlockTime().Sub(ctx.BlockTime()).Seconds()) -} - -// GetParams returns the module parameters. -func (k Keeper) GetParams(ctx sdk.Context) *types.Params { - p, err := k.Params.Get(ctx) +// HasPathInIPFS checks if a file is in the local IPFS node +func (k Keeper) HasPathInIPFS(ctx sdk.Context, cid string) (bool, error) { + path, err := path.NewPath(cid) if err != nil { - p = types.DefaultParams() + return false, err + } + v, err := k.ipfsClient.Unixfs().Get(ctx, path) + if err != nil { + return false, err } - params := p.ActiveParams(k.HasIPFSConnection()) - return ¶ms -} -// GetExpirationBlockHeight returns the block height at which the given duration will have passed -func (k Keeper) GetExpirationBlockHeight(ctx sdk.Context, duration time.Duration) int64 { - return ctx.BlockHeight() + int64(duration.Seconds()/k.GetAverageBlockTime(ctx)) + if v == nil { + return false, nil + } + return true, nil } diff --git a/x/did/keeper/keeper.go b/x/did/keeper/keeper.go index 8ca420cb8..20a10ea34 100644 --- a/x/did/keeper/keeper.go +++ b/x/did/keeper/keeper.go @@ -92,44 +92,6 @@ func NewKeeper( return k } -// IsClaimedServiceOrigin checks if a service origin is unclaimed -func (k Keeper) IsUnclaimedServiceOrigin(ctx sdk.Context, origin string) bool { - rec, _ := k.OrmDB.ServiceRecordTable().GetByOrigin(ctx, origin) - return rec == nil -} - -// IsValidServiceOrigin checks if a service origin is valid -func (k Keeper) IsValidServiceOrigin(ctx sdk.Context, origin string) bool { - rec, err := k.OrmDB.ServiceRecordTable().GetByOrigin(ctx, origin) - if err != nil { - return false - } - if rec == nil { - return false - } - return true -} - -// VerifyMinimumStake checks if a validator has a minimum stake -func (k Keeper) VerifyMinimumStake(ctx sdk.Context, addr string) bool { - address, err := sdk.AccAddressFromBech32(addr) - if err != nil { - return false - } - addval, err := sdk.ValAddressFromBech32(addr) - if err != nil { - return false - } - del, err := k.StakingKeeper.GetDelegation(ctx, address, addval) - if err != nil { - return false - } - if del.Shares.IsZero() { - return false - } - return del.Shares.IsPositive() -} - // VerifyServicePermissions checks if a service has permission func (k Keeper) VerifyServicePermissions( ctx sdk.Context, diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 243910c13..d95f04018 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -21,87 +21,21 @@ func (k Querier) Params( goCtx context.Context, req *types.QueryRequest, ) (*types.QueryParamsResponse, error) { - ctx := k.CurrentCtx(goCtx) - return &types.QueryParamsResponse{Params: k.GetParams(ctx.SDK())}, nil + ctx := k.UnwrapCtx(goCtx) + return &types.QueryParamsResponse{Params: ctx.Params()}, nil } // Resolve implements types.QueryServer. func (k Querier) Resolve( goCtx context.Context, req *types.QueryRequest, -) (*types.QueryResponse, error) { - ctx := k.CurrentCtx(goCtx) - return &types.QueryResponse{Params: k.GetParams(ctx.SDK())}, nil -} - -// Service implements types.QueryServer. -func (k Querier) Service( - goCtx context.Context, - req *types.QueryRequest, -) (*types.QueryResponse, error) { - ctx := k.CurrentCtx(goCtx) - return &types.QueryResponse{Service: ctx.GetServiceInfo(req.GetOrigin()), Params: ctx.Params()}, nil -} - -// ParamsAssets implements types.QueryServer. -func (k Querier) ParamsAssets(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("ParamsAssets is unimplemented") - return &types.QueryResponse{}, nil -} - -// ParamsByAsset implements types.QueryServer. -func (k Querier) ParamsByAsset(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("ParamsByAsset is unimplemented") - return &types.QueryResponse{}, nil -} - -// ParamsKeys implements types.QueryServer. -func (k Querier) ParamsKeys(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("ParamsKeys is unimplemented") - return &types.QueryResponse{}, nil -} - -// ParamsByKey implements types.QueryServer. -func (k Querier) ParamsByKey(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("ParamsByKey is unimplemented") - return &types.QueryResponse{}, nil -} - -// RegistrationOptionsByKey implements types.QueryServer. -func (k Querier) RegistrationOptionsByKey(goCtx context.Context, req *types.QueryRequest) (*types.QueryResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("RegistrationOptionsByKey is unimplemented") - return &types.QueryResponse{}, nil -// Accounts implements types.QueryServer. -func (k Querier) Accounts(goCtx context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryAccountsResponse{}, nil -} - -// Credentials implements types.QueryServer. -func (k Querier) Credentials(goCtx context.Context, req *types.QueryCredentialsRequest) (*types.QueryCredentialsResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryCredentialsResponse{}, nil -} - -// Identities implements types.QueryServer. -func (k Querier) Identities(goCtx context.Context, req *types.QueryIdentitiesRequest) (*types.QueryIdentitiesResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryIdentitiesResponse{}, nil -} - -// Resolve implements types.QueryServer. -func (k Querier) Resolve(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) +) (*types.QueryResolveResponse, error) { + _ = k.UnwrapCtx(goCtx) return &types.QueryResolveResponse{}, nil } -// Service implements types.QueryServer. -func (k Querier) Service(goCtx context.Context, req *types.QueryServiceRequest) (*types.QueryServiceResponse, error) { +// Sync implements types.QueryServer. +func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryServiceResponse{}, nil + return &types.SyncResponse{}, nil } diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index 7d5e70b36..79025fde6 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -11,12 +11,11 @@ import ( "github.com/onsonr/sonr/x/did/builder" "github.com/onsonr/sonr/x/did/types" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "cosmossdk.io/errors" - didv1 "github.com/onsonr/hway/api/did/v1" - "github.com/onsonr/hway/x/did/types" + "github.com/onsonr/sonr/x/did/types" ) type msgServer struct { @@ -30,21 +29,6 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{k: keeper} } -// # AuthorizeService -// -// AuthorizeService implements types.MsgServer. -func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) { - if ms.k.authority != msg.Controller { - return nil, errors.Wrapf( - govtypes.ErrInvalidSigner, - "invalid authority; expected %s, got %s", - ms.k.authority, - msg.Controller, - ) - } - return &types.MsgAuthorizeServiceResponse{}, nil -} - // # AllocateVault // // AllocateVault implements types.MsgServer. @@ -52,32 +36,22 @@ func (ms msgServer) AllocateVault( goCtx context.Context, msg *types.MsgAllocateVault, ) (*types.MsgAllocateVaultResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) // 1.Check if the service origin is valid - if ms.k.IsValidServiceOrigin(ctx, msg.Origin) { - return nil, types.ErrInvalidServiceOrigin + ctx := ms.k.UnwrapCtx(goCtx) + if err := ctx.ValidateOrigin(msg.Origin); err != nil { + return nil, err } - cid, expiryBlock, err := ms.k.assembleInitialVault(ctx) - if err != nil { - return nil, err - } - - regOpts, err := builder.GetPublicKeyCredentialCreationOptions(msg.Origin, msg.Subject, cid, ms.k.GetParams(ctx)) - if err != nil { - return nil, err - } - - // Convert to string - regOptsJSON, err := json.Marshal(regOpts) + // 2.Allocate the vault + cid, expiryBlock, err := ms.k.AssembleVault(ctx, msg.GetSubject(), msg.GetOrigin()) if err != nil { return nil, err } + // 3.Return the response return &types.MsgAllocateVaultResponse{ - ExpiryBlock: expiryBlock, - Cid: cid, - RegistrationOptions: string(regOptsJSON), + ExpiryBlock: expiryBlock, + Cid: cid, }, nil } @@ -99,21 +73,28 @@ func (ms msgServer) RegisterService( goCtx context.Context, msg *types.MsgRegisterService, ) (*types.MsgRegisterServiceResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) + // ctx := sdk.UnwrapSDKContext(goCtx) // 1.Check if the service origin is valid - if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) { - return nil, types.ErrInvalidServiceOrigin - } - return ms.k.insertService(ctx, msg.Service) + // if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) { + // return nil, types.ErrInvalidServiceOrigin + // } + return nil, errors.Wrapf(types.ErrInvalidServiceOrigin, "invalid service origin") } -// # SyncController +// # AuthorizeService // -// SyncController implements types.MsgServer. -func (ms msgServer) SyncController(ctx context.Context, msg *types.MsgSyncController) (*types.MsgSyncControllerResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgSyncControllerResponse{}, nil +// AuthorizeService implements types.MsgServer. +func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) { + if ms.k.authority != msg.Controller { + return nil, errors.Wrapf( + govtypes.ErrInvalidSigner, + "invalid authority; expected %s, got %s", + ms.k.authority, + msg.Controller, + ) + } + return &types.MsgAuthorizeServiceResponse{}, nil } // # UpdateParams @@ -133,49 +114,3 @@ func (ms msgServer) UpdateParams( } return nil, ms.k.Params.Set(ctx, msg.Params) } - -// Authenticate implements types.MsgServer. -func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, error) { - if ms.k.authority != msg.Authority { - return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) - } - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgAuthenticateResponse{}, nil -} - -// RegisterController implements types.MsgServer. -func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, error) { - if ms.k.authority != msg.Authority { - return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) - } - return &types.MsgRegisterControllerResponse{}, nil -} - -// RegisterService implements types.MsgServer. -func (ms msgServer) RegisterService(goCtx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) { - if ms.k.authority != msg.Authority { - return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) - } - - ctx := sdk.UnwrapSDKContext(goCtx) - svc := didv1.Service{ - ControllerDid: msg.Authority, - } - err := ms.k.OrmDB.ServiceTable().Insert(ctx, &svc) - if err != nil { - return nil, err - } - return &types.MsgRegisterServiceResponse{}, nil -} - -// ProveWitness implements types.MsgServer. -func (ms msgServer) ProveWitness(ctx context.Context, msg *types.MsgProveWitness) (*types.MsgProveWitnessResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgProveWitnessResponse{}, nil -} - -// SyncVault implements types.MsgServer. -func (ms msgServer) SyncVault(ctx context.Context, msg *types.MsgSyncVault) (*types.MsgSyncVaultResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgSyncVaultResponse{}, nil -} diff --git a/x/did/module.go b/x/did/module.go index 8592126a1..606c2b5b1 100644 --- a/x/did/module.go +++ b/x/did/module.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/client/v2/autocli" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/x/nft" nftkeeper "cosmossdk.io/x/nft/keeper" "github.com/cosmos/cosmos-sdk/client" diff --git a/x/did/types/address.go b/x/did/types/address.go new file mode 100644 index 000000000..ab1254f4c --- /dev/null +++ b/x/did/types/address.go @@ -0,0 +1 @@ +package types diff --git a/x/did/types/codec.go b/x/did/types/codec.go index b985400f8..c883ac6aa 100644 --- a/x/did/types/codec.go +++ b/x/did/types/codec.go @@ -2,16 +2,11 @@ package types import ( "crypto/ecdsa" - "crypto/sha256" - "encoding/hex" "strings" - fmt "fmt" - ethcrypto "github.com/ethereum/go-ethereum/crypto" "golang.org/x/crypto/sha3" - "github.com/cosmos/btcutil/bech32" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -37,12 +32,15 @@ func init() { // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgRegisterController{}, ModuleName+"/MsgRegisterController", nil) + cdc.RegisterConcrete(&MsgRegisterService{}, ModuleName+"/MsgRegisterService", nil) + cdc.RegisterConcrete(&MsgAllocateVault{}, ModuleName+"/MsgAllocateVault", nil) } func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*cryptotypes.PubKey)(nil), - &PubKey{}, + // &PubKey{}, ) registry.RegisterImplementations( @@ -55,160 +53,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } -type ChainCode uint32 - -const ( - ChainCodeBTC ChainCode = 0 - ChainCodeETH ChainCode = 60 - ChainCodeIBC ChainCode = 118 - ChainCodeSNR ChainCode = 703 -) - -var InitialChainCodes = map[DIDNamespace]ChainCode{ - DIDNamespace_DID_NAMESPACE_BITCOIN: ChainCodeBTC, - DIDNamespace_DID_NAMESPACE_IBC: ChainCodeIBC, - DIDNamespace_DID_NAMESPACE_ETHEREUM: ChainCodeETH, - DIDNamespace_DID_NAMESPACE_SONR: ChainCodeSNR, -} - -func (c ChainCode) FormatAddress(pubKey *PubKey) (string, error) { - switch c { - case ChainCodeBTC: - return bech32.Encode("bc", pubKey.Bytes()) - - case ChainCodeETH: - epk, err := pubKey.ECDSA() - if err != nil { - return "", err - } - return ComputeEthAddress(*epk), nil - - case ChainCodeSNR: - return bech32.Encode("idx", pubKey.Bytes()) - - case ChainCodeIBC: - return bech32.Encode("cosmos", pubKey.Bytes()) - - } - return "", ErrUnsopportedChainCode -} - -func (n DIDNamespace) ChainCode() (uint32, error) { - switch n { - case DIDNamespace_DID_NAMESPACE_BITCOIN: - return 0, nil - case DIDNamespace_DID_NAMESPACE_ETHEREUM: - return 64, nil - case DIDNamespace_DID_NAMESPACE_IBC: - return 118, nil - case DIDNamespace_DID_NAMESPACE_SONR: - return 703, nil - default: - return 0, fmt.Errorf("unsupported chain") - } -} - -func (n DIDNamespace) DIDMethod() string { - switch n { - case DIDNamespace_DID_NAMESPACE_IPFS: - return "ipfs" - case DIDNamespace_DID_NAMESPACE_SONR: - return "sonr" - case DIDNamespace_DID_NAMESPACE_BITCOIN: - return "btcr" - case DIDNamespace_DID_NAMESPACE_ETHEREUM: - return "ethr" - case DIDNamespace_DID_NAMESPACE_IBC: - return "ibcr" - case DIDNamespace_DID_NAMESPACE_WEBAUTHN: - return "webauthn" - case DIDNamespace_DID_NAMESPACE_DWN: - return "motr" - case DIDNamespace_DID_NAMESPACE_SERVICE: - return "web" - default: - return "n/a" - } -} - -func (n DIDNamespace) FormatDID(subject string) string { - return fmt.Sprintf("%s:%s", n.DIDMethod(), subject) -} - -type EncodedKey []byte - -func (e KeyEncoding) EncodeRaw(data []byte) (EncodedKey, error) { - switch e { - case KeyEncoding_KEY_ENCODING_RAW: - return data, nil - case KeyEncoding_KEY_ENCODING_HEX: - return []byte(hex.EncodeToString(data)), nil - case KeyEncoding_KEY_ENCODING_MULTIBASE: - return []byte(base58.Encode(data)), nil - default: - return nil, nil - } -} - -func (e KeyEncoding) DecodeRaw(data EncodedKey) ([]byte, error) { - switch e { - case KeyEncoding_KEY_ENCODING_RAW: - return data, nil - case KeyEncoding_KEY_ENCODING_HEX: - return hex.DecodeString(string(data)) - case KeyEncoding_KEY_ENCODING_MULTIBASE: - return base58.Decode(string(data)) - default: - return nil, nil - } -} - -type COSEAlgorithmIdentifier int - -func (k KeyAlgorithm) CoseIdentifier() COSEAlgorithmIdentifier { - switch k { - case KeyAlgorithm_KEY_ALGORITHM_ES256: - return COSEAlgorithmIdentifier(-7) - case KeyAlgorithm_KEY_ALGORITHM_ES384: - return COSEAlgorithmIdentifier(-35) - case KeyAlgorithm_KEY_ALGORITHM_ES512: - return COSEAlgorithmIdentifier(-36) - case KeyAlgorithm_KEY_ALGORITHM_EDDSA: - return COSEAlgorithmIdentifier(-8) - case KeyAlgorithm_KEY_ALGORITHM_ES256K: - return COSEAlgorithmIdentifier(-10) - default: - return COSEAlgorithmIdentifier(0) - } -} - -func (k KeyCurve) ComputePublicKey(data []byte) (*PubKey, error) { - return nil, ErrUnsupportedKeyCurve -} - -func (k *Keyshare) Equals(o crypto.MPCShare) bool { - opk := o.GetPublicKey() - if opk != nil && k.PublicKey == nil { - return false - } - return k.GetRole() == o.GetRole() -} - -func (k *Keyshare) IsUser() bool { - return k.Role == 2 -} - -func (k *Keyshare) IsValidator() bool { - return k.Role == 1 -} - -// ComputeOriginTXTRecord generates a fingerprint for a given origin -func ComputeOriginTXTRecord(origin string) string { - h := sha256.New() - h.Write([]byte(origin)) - return fmt.Sprintf("v=sonr,o=%s,p=%x", origin, h.Sum(nil)) -} - func ComputeEthAddress(pk ecdsa.PublicKey) string { // Generate Ethereum address address := ethcrypto.PubkeyToAddress(pk) 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/genesis.go b/x/did/types/genesis.go index 826dd9d4d..34da6e029 100644 --- a/x/did/types/genesis.go +++ b/x/did/types/genesis.go @@ -6,7 +6,12 @@ import ( ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1" "cosmossdk.io/collections" - "cosmossdk.io/x/nft" + "github.com/onsonr/sonr/internal/orm/assettype" + "github.com/onsonr/sonr/internal/orm/keyalgorithm" + "github.com/onsonr/sonr/internal/orm/keycurve" + "github.com/onsonr/sonr/internal/orm/keyencoding" + "github.com/onsonr/sonr/internal/orm/keyrole" + "github.com/onsonr/sonr/internal/orm/keytype" ) // ParamsKey saves the current module params. @@ -51,14 +56,15 @@ func (gs GenesisState) Validate() error { return gs.Params.Validate() } -// DefaultNFTClasses configures the Initial DIDNamespace NFT classes -func DefaultNFTClasses(nftGenesis *nft.GenesisState) error { - for _, n := range DIDNamespace_value { - nftGenesis.Classes = append(nftGenesis.Classes, DIDNamespace(n).GetNFTClass()) - } - return nil -} - +// // DefaultNFTClasses configures the Initial DIDNamespace NFT classes +// +// func DefaultNFTClasses(nftGenesis *nft.GenesisState) error { +// for _, n := range DIDNamespace_value { +// nftGenesis.Classes = append(nftGenesis.Classes, DIDNamespace(n).GetNFTClass()) +// } +// return nil +// } +// // DefaultParams returns default module parameters. func DefaultParams() Params { return Params{ @@ -70,16 +76,6 @@ func DefaultParams() Params { } } -// DefaultGlobalIntegrity returns the default global integrity proof -func DefaultGlobalIntegrity() *GlobalIntegrity { - return &GlobalIntegrity{ - Controller: "did:sonr:0x0", - Seed: DefaultSeedMessage(), - Accumulator: []byte{}, - Count: 0, - } -} - // DefaultSeedMessage returns the default seed message func DefaultSeedMessage() string { l1 := "The Sonr Network shall make no protocol that respects the establishment of centralized authority," @@ -97,7 +93,7 @@ func DefaultAssets() []*AssetInfo { Symbol: "BTC", Hrp: "bc", Index: 0, - AssetType: AssetType_ASSET_TYPE_NATIVE, + AssetType: assettype.Native.String(), IconUrl: "https://cdn.sonr.land/BTC.svg", }, { @@ -105,7 +101,7 @@ func DefaultAssets() []*AssetInfo { Symbol: "ETH", Hrp: "eth", Index: 64, - AssetType: AssetType_ASSET_TYPE_NATIVE, + AssetType: assettype.Native.String(), IconUrl: "https://cdn.sonr.land/ETH.svg", }, { @@ -113,76 +109,75 @@ func DefaultAssets() []*AssetInfo { Symbol: "SNR", Hrp: "idx", Index: 703, - AssetType: AssetType_ASSET_TYPE_NATIVE, + AssetType: assettype.Native.String(), IconUrl: "https://cdn.sonr.land/SNR.svg", }, } } -// DefaultKeyInfos returns the default key infos: secp256k1, ed25519, keccak256, and bls12381. func DefaultKeyInfos() map[string]*KeyInfo { return map[string]*KeyInfo{ // Identity Key Info // Sonr Controller Key Info - From MPC "auth.dwn": { - Role: KeyRole_KEY_ROLE_INVOCATION, - Curve: KeyCurve_KEY_CURVE_P256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_MPC, + Role: keyrole.Invocation.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + Type: keytype.Mpc.String(), }, // Sonr Vault Shared Key Info - From Registration "auth.zk": { - Role: KeyRole_KEY_ROLE_ASSERTION, - Curve: KeyCurve_KEY_CURVE_BLS12381, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED, - Encoding: KeyEncoding_KEY_ENCODING_MULTIBASE, - Type: KeyType_KEY_TYPE_ZK, + Role: keyrole.Assertion.String(), + Curve: keycurve.Bls12381.String(), + Algorithm: keyalgorithm.Es256k.String(), + Encoding: keyencoding.Multibase.String(), + Type: keytype.Zk.String(), }, // Blockchain Key Info // Ethereum Key Info "auth.ethereum": { - Role: KeyRole_KEY_ROLE_DELEGATION, - Curve: KeyCurve_KEY_CURVE_KECCAK256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_BIP32, + Role: keyrole.Delegation.String(), + Curve: keycurve.Keccak256.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + Type: keytype.Bip32.String(), }, // Bitcoin/IBC Key Info "auth.bitcoin": { - Role: KeyRole_KEY_ROLE_DELEGATION, - Curve: KeyCurve_KEY_CURVE_SECP256K1, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ECDSA, - Encoding: KeyEncoding_KEY_ENCODING_HEX, - Type: KeyType_KEY_TYPE_BIP32, + Role: keyrole.Delegation.String(), + Curve: keycurve.Secp256k1.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + Type: keytype.Bip32.String(), }, // Authentication Key Info // Browser based WebAuthn "webauthn.browser": { - Role: KeyRole_KEY_ROLE_AUTHENTICATION, - Curve: KeyCurve_KEY_CURVE_P256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256, - Encoding: KeyEncoding_KEY_ENCODING_RAW, - Type: KeyType_KEY_TYPE_WEBAUTHN, + Role: keyrole.Authentication.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Es256.String(), + Encoding: keyencoding.Raw.String(), + Type: keytype.Webauthn.String(), }, // FIDO U2F "webauthn.fido": { - Role: KeyRole_KEY_ROLE_AUTHENTICATION, - Curve: KeyCurve_KEY_CURVE_P256, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256, - Encoding: KeyEncoding_KEY_ENCODING_RAW, - Type: KeyType_KEY_TYPE_WEBAUTHN, + Role: keyrole.Authentication.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Es256.String(), + Encoding: keyencoding.Raw.String(), + Type: keytype.Webauthn.String(), }, // Cross-Platform Passkeys "webauthn.passkey": { - Role: KeyRole_KEY_ROLE_AUTHENTICATION, - Curve: KeyCurve_KEY_CURVE_ED25519, - Algorithm: KeyAlgorithm_KEY_ALGORITHM_EDDSA, - Encoding: KeyEncoding_KEY_ENCODING_RAW, - Type: KeyType_KEY_TYPE_WEBAUTHN, + Role: keyrole.Authentication.String(), + Curve: keycurve.Ed25519.String(), + Algorithm: keyalgorithm.Eddsa.String(), + Encoding: keyencoding.Raw.String(), + Type: keytype.Webauthn.String(), }, } } @@ -227,11 +222,3 @@ func (k *KeyInfo) Equal(b *KeyInfo) bool { } 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 -} diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index 83c8c78ca..e518eccc6 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -24,395 +24,6 @@ var _ = math.Inf // 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_fda181cae44f7c00, []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_fda181cae44f7c00, []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_ECDSA KeyAlgorithm = 6 -) - -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_ECDSA", -} - -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_ECDSA": 6, -} - -func (x KeyAlgorithm) String() string { - return proto.EnumName(KeyAlgorithm_name, int32(x)) -} - -func (KeyAlgorithm) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []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 - KeyCurve_KEY_CURVE_BLS12381 KeyCurve = 9 - KeyCurve_KEY_CURVE_KECCAK256 KeyCurve = 10 -) - -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", - 9: "KEY_CURVE_BLS12381", - 10: "KEY_CURVE_KECCAK256", -} - -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, - "KEY_CURVE_BLS12381": 9, - "KEY_CURVE_KECCAK256": 10, -} - -func (x KeyCurve) String() string { - return proto.EnumName(KeyCurve_name, int32(x)) -} - -func (KeyCurve) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []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 -) - -var KeyEncoding_name = map[int32]string{ - 0: "KEY_ENCODING_UNSPECIFIED", - 1: "KEY_ENCODING_RAW", - 2: "KEY_ENCODING_HEX", - 3: "KEY_ENCODING_MULTIBASE", -} - -var KeyEncoding_value = map[string]int32{ - "KEY_ENCODING_UNSPECIFIED": 0, - "KEY_ENCODING_RAW": 1, - "KEY_ENCODING_HEX": 2, - "KEY_ENCODING_MULTIBASE": 3, -} - -func (x KeyEncoding) String() string { - return proto.EnumName(KeyEncoding_name, int32(x)) -} - -func (KeyEncoding) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{4} -} - -// KeyRole defines the kind of key -type KeyRole int32 - -const ( - KeyRole_KEY_ROLE_UNSPECIFIED KeyRole = 0 - 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_fda181cae44f7c00, []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 - KeyType_KEY_TYPE_MPC KeyType = 6 - KeyType_KEY_TYPE_ZK KeyType = 7 - KeyType_KEY_TYPE_WEBAUTHN KeyType = 8 - KeyType_KEY_TYPE_BIP32 KeyType = 9 -) - -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", - 6: "KEY_TYPE_MPC", - 7: "KEY_TYPE_ZK", - 8: "KEY_TYPE_WEBAUTHN", - 9: "KEY_TYPE_BIP32", -} - -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, - "KEY_TYPE_MPC": 6, - "KEY_TYPE_ZK": 7, - "KEY_TYPE_WEBAUTHN": 8, - "KEY_TYPE_BIP32": 9, -} - -func (x KeyType) String() string { - return proto.EnumName(KeyType_name, int32(x)) -} - -func (KeyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{6} -} - -type KeyshareRole int32 - -const ( - KeyshareRole_KEYSHARE_ROLE_UNSPECIFIED KeyshareRole = 0 - KeyshareRole_KEYSHARE_ROLE_USER KeyshareRole = 1 - KeyshareRole_KEYSHARE_ROLE_VALIDATOR KeyshareRole = 2 -) - -var KeyshareRole_name = map[int32]string{ - 0: "KEYSHARE_ROLE_UNSPECIFIED", - 1: "KEYSHARE_ROLE_USER", - 2: "KEYSHARE_ROLE_VALIDATOR", -} - -var KeyshareRole_value = map[string]int32{ - "KEYSHARE_ROLE_UNSPECIFIED": 0, - "KEYSHARE_ROLE_USER": 1, - "KEYSHARE_ROLE_VALIDATOR": 2, -} - -func (x KeyshareRole) String() string { - return proto.EnumName(KeyshareRole_name, int32(x)) -} - -func (KeyshareRole) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{7} -} - -// 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_PERMISSIONS_READ PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_PERMISSIONS_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_PERMISSIONS_READ", - 3: "PERMISSION_SCOPE_PERMISSIONS_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_PERMISSIONS_READ": 2, - "PERMISSION_SCOPE_PERMISSIONS_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{8} -} - // GenesisState defines the module genesis state type GenesisState struct { // Params defines all the parameters of the module. @@ -636,7 +247,7 @@ type AssetInfo struct { // 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"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` // The name of the asset Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // The icon url @@ -697,11 +308,11 @@ func (m *AssetInfo) GetSymbol() string { return "" } -func (m *AssetInfo) GetAssetType() AssetType { +func (m *AssetInfo) GetAssetType() string { if m != nil { return m.AssetType } - return AssetType_ASSET_TYPE_UNSPECIFIED + return "" } func (m *AssetInfo) GetName() string { @@ -718,20 +329,113 @@ func (m *AssetInfo) GetIconUrl() string { return "" } +// Document defines a DID document +type Document 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"` + Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,7,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_fda181cae44f7c00, []int{4} +} +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) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +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 +} + +func (m *Document) GetService() []string { + if m != nil { + return m.Service + } + return nil +} + // KeyInfo defines information for accepted PubKey types type KeyInfo struct { - 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"` + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` } func (m *KeyInfo) Reset() { *m = KeyInfo{} } func (m *KeyInfo) String() string { return proto.CompactTextString(m) } func (*KeyInfo) ProtoMessage() {} func (*KeyInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{4} + return fileDescriptor_fda181cae44f7c00, []int{5} } func (m *KeyInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -760,63 +464,64 @@ func (m *KeyInfo) XXX_DiscardUnknown() { var xxx_messageInfo_KeyInfo proto.InternalMessageInfo -func (m *KeyInfo) GetRole() KeyRole { +func (m *KeyInfo) GetRole() string { if m != nil { return m.Role } - return KeyRole_KEY_ROLE_UNSPECIFIED + return "" } -func (m *KeyInfo) GetAlgorithm() KeyAlgorithm { +func (m *KeyInfo) GetAlgorithm() string { if m != nil { return m.Algorithm } - return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED + return "" } -func (m *KeyInfo) GetEncoding() KeyEncoding { +func (m *KeyInfo) GetEncoding() string { if m != nil { return m.Encoding } - return KeyEncoding_KEY_ENCODING_UNSPECIFIED + return "" } -func (m *KeyInfo) GetCurve() KeyCurve { +func (m *KeyInfo) GetCurve() string { if m != nil { return m.Curve } - return KeyCurve_KEY_CURVE_UNSPECIFIED + return "" } -func (m *KeyInfo) GetType() KeyType { +func (m *KeyInfo) GetType() string { if m != nil { return m.Type } - return KeyType_KEY_TYPE_UNSPECIFIED + return "" } -// 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"` +// PubKey defines a public key for a did +type PubKey struct { + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` + KeyType string `protobuf:"bytes,5,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"` + Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,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{5} +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_fda181cae44f7c00, []int{6} } -func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error { +func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ValidatorInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -826,78 +531,89 @@ func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *ValidatorInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfo.Merge(m, src) +func (m *PubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey.Merge(m, src) } -func (m *ValidatorInfo) XXX_Size() int { +func (m *PubKey) XXX_Size() int { return m.Size() } -func (m *ValidatorInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfo.DiscardUnknown(m) +func (m *PubKey) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey.DiscardUnknown(m) } -var xxx_messageInfo_ValidatorInfo proto.InternalMessageInfo +var xxx_messageInfo_PubKey proto.InternalMessageInfo -func (m *ValidatorInfo) GetMoniker() string { +func (m *PubKey) GetRole() string { if m != nil { - return m.Moniker + return m.Role } return "" } -func (m *ValidatorInfo) GetGrpcEndpoints() []*ValidatorInfo_Endpoint { +func (m *PubKey) GetAlgorithm() string { if m != nil { - return m.GrpcEndpoints + return m.Algorithm + } + return "" +} + +func (m *PubKey) GetEncoding() string { + if m != nil { + return m.Encoding + } + return "" +} + +func (m *PubKey) GetCurve() string { + if m != nil { + return m.Curve + } + return "" +} + +func (m *PubKey) GetKeyType() string { + if m != nil { + return m.KeyType + } + return "" +} + +func (m *PubKey) GetRaw() []byte { + if m != nil { + return m.Raw } return nil } -func (m *ValidatorInfo) GetRestEndpoints() []*ValidatorInfo_Endpoint { +func (m *PubKey) GetJwk() *PubKey_JWK { if m != nil { - return m.RestEndpoints + return m.Jwk } return nil } -func (m *ValidatorInfo) GetExplorer() *ValidatorInfo_ExplorerInfo { - if m != nil { - return m.Explorer - } - return nil +// JWK represents a JSON Web Key +type PubKey_JWK struct { + Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` + Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` + X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` + Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` + N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` + E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` } -func (m *ValidatorInfo) GetFeeInfo() *ValidatorInfo_FeeInfo { - if m != nil { - return m.FeeInfo - } - return nil +func (m *PubKey_JWK) Reset() { *m = PubKey_JWK{} } +func (m *PubKey_JWK) String() string { return proto.CompactTextString(m) } +func (*PubKey_JWK) ProtoMessage() {} +func (*PubKey_JWK) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6, 0} } - -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{5, 0} -} -func (m *ValidatorInfo_Endpoint) XXX_Unmarshal(b []byte) error { +func (m *PubKey_JWK) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ValidatorInfo_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PubKey_JWK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ValidatorInfo_Endpoint.Marshal(b, m, deterministic) + return xxx_messageInfo_PubKey_JWK.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -907,50 +623,83 @@ func (m *ValidatorInfo_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *ValidatorInfo_Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfo_Endpoint.Merge(m, src) +func (m *PubKey_JWK) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey_JWK.Merge(m, src) } -func (m *ValidatorInfo_Endpoint) XXX_Size() int { +func (m *PubKey_JWK) XXX_Size() int { return m.Size() } -func (m *ValidatorInfo_Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfo_Endpoint.DiscardUnknown(m) +func (m *PubKey_JWK) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey_JWK.DiscardUnknown(m) } -var xxx_messageInfo_ValidatorInfo_Endpoint proto.InternalMessageInfo +var xxx_messageInfo_PubKey_JWK proto.InternalMessageInfo -func (m *ValidatorInfo_Endpoint) GetUrl() string { +func (m *PubKey_JWK) GetKty() string { if m != nil { - return m.Url + return m.Kty } return "" } -func (m *ValidatorInfo_Endpoint) GetIsPrimary() bool { +func (m *PubKey_JWK) GetCrv() string { if m != nil { - return m.IsPrimary + return m.Crv } - return false + return "" } -// 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 *PubKey_JWK) GetX() string { + if m != nil { + return m.X + } + return "" } -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{5, 1} +func (m *PubKey_JWK) GetY() string { + if m != nil { + return m.Y + } + return "" } -func (m *ValidatorInfo_ExplorerInfo) XXX_Unmarshal(b []byte) error { + +func (m *PubKey_JWK) GetN() string { + if m != nil { + return m.N + } + return "" +} + +func (m *PubKey_JWK) GetE() string { + if m != nil { + return m.E + } + return "" +} + +// Service defines a Decentralized Service on the Sonr Blockchain +type Service struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + 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"` + Permissions map[string]string `protobuf:"bytes,7,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +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_fda181cae44f7c00, []int{7} +} +func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ValidatorInfo_ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ValidatorInfo_ExplorerInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_Service.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -960,326 +709,153 @@ func (m *ValidatorInfo_ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *ValidatorInfo_ExplorerInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfo_ExplorerInfo.Merge(m, src) +func (m *Service) XXX_Merge(src proto.Message) { + xxx_messageInfo_Service.Merge(m, src) } -func (m *ValidatorInfo_ExplorerInfo) XXX_Size() int { +func (m *Service) XXX_Size() int { return m.Size() } -func (m *ValidatorInfo_ExplorerInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfo_ExplorerInfo.DiscardUnknown(m) +func (m *Service) XXX_DiscardUnknown() { + xxx_messageInfo_Service.DiscardUnknown(m) } -var xxx_messageInfo_ValidatorInfo_ExplorerInfo proto.InternalMessageInfo +var xxx_messageInfo_Service 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{5, 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{5, 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 { +func (m *Service) GetId() string { if m != nil { return m.Id } return "" } -func (m *ValidatorInfo_IBCChannel) GetPort() string { +func (m *Service) GetServiceType() string { if m != nil { - return m.Port + return m.ServiceType } return "" } +func (m *Service) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *Service) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Service) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Service) GetServiceEndpoints() map[string]string { + if m != nil { + return m.ServiceEndpoints + } + return nil +} + +func (m *Service) GetPermissions() map[string]string { + if m != nil { + return m.Permissions + } + return nil +} + 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.KeyshareRole", KeyshareRole_name, KeyshareRole_value) - proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*GlobalIntegrity)(nil), "did.v1.GlobalIntegrity") proto.RegisterType((*Params)(nil), "did.v1.Params") proto.RegisterMapType((map[string]*KeyInfo)(nil), "did.v1.Params.AllowedPublicKeysEntry") proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") + proto.RegisterType((*Document)(nil), "did.v1.Document") proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo") - 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") + proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") + proto.RegisterType((*PubKey_JWK)(nil), "did.v1.PubKey.JWK") + proto.RegisterType((*Service)(nil), "did.v1.Service") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.PermissionsEntry") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 1869 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x4d, 0x6f, 0xdb, 0xc8, - 0x19, 0x36, 0xf5, 0x65, 0xe9, 0x95, 0x63, 0x8f, 0x27, 0xde, 0x44, 0x71, 0x12, 0xdb, 0x71, 0x92, - 0x5d, 0xc3, 0x2d, 0xec, 0x58, 0x49, 0x8a, 0x74, 0x5b, 0x14, 0xa5, 0xa8, 0xb1, 0x4d, 0x58, 0x5f, - 0x18, 0xd2, 0xf6, 0x66, 0x2f, 0x04, 0x45, 0x8d, 0x65, 0x22, 0x14, 0x29, 0x90, 0xb4, 0x37, 0x3a, - 0x14, 0x68, 0xaf, 0x7b, 0xea, 0xb1, 0xc7, 0xbd, 0xf5, 0xd2, 0x43, 0xfb, 0x1f, 0x7a, 0xd8, 0x4b, - 0x81, 0x3d, 0xb6, 0x97, 0xc5, 0x22, 0x39, 0xb4, 0x7f, 0xa1, 0xb7, 0x62, 0x86, 0xa4, 0x44, 0xc9, - 0x8a, 0xd1, 0x8b, 0x31, 0xf3, 0x3c, 0xcf, 0xfb, 0xce, 0xfb, 0x35, 0x43, 0x0b, 0xd6, 0x7a, 0x76, - 0x6f, 0xff, 0xfa, 0x60, 0xbf, 0xcf, 0x5c, 0x16, 0xd8, 0xc1, 0xde, 0xd0, 0xf7, 0x42, 0x0f, 0x17, - 0x7a, 0x76, 0x6f, 0xef, 0xfa, 0x60, 0x7d, 0xd5, 0x1c, 0xd8, 0xae, 0xb7, 0x2f, 0xfe, 0x46, 0xd4, - 0xfa, 0x5a, 0xdf, 0xeb, 0x7b, 0x62, 0xb9, 0xcf, 0x57, 0x11, 0xba, 0xfd, 0x7b, 0x09, 0x96, 0x8e, - 0x22, 0x17, 0x5a, 0x68, 0x86, 0x0c, 0xff, 0x1c, 0x0a, 0x43, 0xd3, 0x37, 0x07, 0x41, 0x45, 0xda, - 0x92, 0x76, 0xca, 0xd5, 0xe5, 0xbd, 0xc8, 0xe5, 0x5e, 0x47, 0xa0, 0xb5, 0xdc, 0xf7, 0x3f, 0x6e, - 0x2e, 0xd0, 0x58, 0x83, 0x6b, 0x80, 0xfa, 0x8e, 0xd7, 0x35, 0x1d, 0xc3, 0x76, 0x43, 0xd6, 0xf7, - 0xed, 0x70, 0x54, 0xc9, 0x08, 0xbb, 0xfb, 0x89, 0xdd, 0x91, 0xe0, 0xd5, 0x84, 0xa6, 0x2b, 0xfd, - 0x69, 0x60, 0xfb, 0x77, 0xb0, 0x32, 0xa3, 0xc1, 0x1b, 0x00, 0x96, 0xe7, 0x86, 0xbe, 0xe7, 0x38, - 0xcc, 0x17, 0x81, 0x94, 0x68, 0x0a, 0xc1, 0x18, 0x72, 0x01, 0x63, 0x3d, 0x71, 0x54, 0x89, 0x8a, - 0x35, 0xde, 0x82, 0xb2, 0x69, 0x59, 0x57, 0x83, 0x2b, 0xc7, 0x0c, 0x3d, 0xbf, 0x92, 0xdd, 0x92, - 0x76, 0x96, 0x68, 0x1a, 0xc2, 0x6b, 0x90, 0xb7, 0xbc, 0x2b, 0x37, 0xac, 0xe4, 0xb6, 0xa4, 0x9d, - 0x1c, 0x8d, 0x36, 0xdb, 0x3f, 0x66, 0xa1, 0x10, 0xe5, 0x86, 0x7f, 0x0b, 0xf8, 0x9b, 0x4b, 0x3b, - 0x64, 0x8e, 0x1d, 0x84, 0xac, 0x67, 0x98, 0x41, 0xc0, 0x42, 0x5e, 0x87, 0xec, 0x4e, 0xb9, 0xba, - 0x9a, 0xe4, 0x23, 0x73, 0x54, 0x75, 0x2f, 0x3c, 0xba, 0x9a, 0x12, 0x0b, 0x34, 0xc0, 0xa7, 0x70, - 0xd7, 0x74, 0x1c, 0xef, 0x1b, 0xd6, 0x33, 0x86, 0x57, 0x5d, 0xc7, 0xb6, 0x8c, 0x77, 0x6c, 0x14, - 0x54, 0x32, 0xc2, 0xc5, 0xf3, 0xe9, 0x52, 0xee, 0xc9, 0x91, 0xb2, 0x23, 0x84, 0x27, 0x6c, 0x14, - 0x10, 0x37, 0xf4, 0x47, 0x74, 0xd5, 0x9c, 0xc5, 0xf1, 0x26, 0x94, 0xed, 0xe1, 0x45, 0x60, 0x98, - 0x56, 0x68, 0x5f, 0x33, 0x91, 0x5b, 0x91, 0x02, 0x87, 0x64, 0x81, 0xe0, 0x3a, 0x6c, 0x38, 0x9e, - 0x65, 0x3a, 0x97, 0x5e, 0x10, 0x1a, 0x3e, 0xeb, 0xdb, 0x41, 0xe8, 0x9b, 0xa1, 0xed, 0xb9, 0x06, - 0x73, 0xcd, 0xae, 0xc3, 0x7a, 0x22, 0xe7, 0x22, 0x7d, 0x34, 0x56, 0xd1, 0x94, 0x88, 0x44, 0x1a, - 0xfc, 0x12, 0x3e, 0xb3, 0x3c, 0xf7, 0x9a, 0x8d, 0x4c, 0xd7, 0x62, 0xc6, 0xd0, 0x67, 0x17, 0xcc, - 0x67, 0xae, 0xc5, 0x2a, 0x79, 0x51, 0xe7, 0xb5, 0x09, 0xd9, 0x19, 0x73, 0x78, 0x1f, 0xee, 0x9a, - 0x61, 0xc8, 0x82, 0x30, 0x3a, 0xef, 0xc2, 0xf3, 0x07, 0x66, 0x18, 0x54, 0x0a, 0x5b, 0xd9, 0x9d, - 0x12, 0xc5, 0x29, 0xea, 0x30, 0x62, 0xd6, 0x4f, 0xe1, 0xde, 0xfc, 0xcc, 0x31, 0x82, 0xec, 0x3b, - 0x36, 0x8a, 0xfb, 0xcd, 0x97, 0xf8, 0x39, 0xe4, 0xaf, 0x4d, 0xe7, 0x8a, 0xc5, 0x43, 0xb5, 0x92, - 0x54, 0xf0, 0x84, 0x8d, 0x44, 0x0b, 0x22, 0xf6, 0xcb, 0xcc, 0x1b, 0xe9, 0xcb, 0xfb, 0x7f, 0xfa, - 0x6e, 0x73, 0xe1, 0x3f, 0xdf, 0x6d, 0x4a, 0xdf, 0xfe, 0xfb, 0xaf, 0xbb, 0xc0, 0x6f, 0x47, 0x34, - 0xa3, 0xdb, 0x7f, 0x91, 0xa0, 0x34, 0x6e, 0x1a, 0x1f, 0x02, 0xdb, 0xed, 0xb1, 0xf7, 0xe2, 0x94, - 0x2c, 0x8d, 0x36, 0xfc, 0xe4, 0x4b, 0x7f, 0x18, 0xcf, 0x13, 0x5f, 0xe2, 0x7b, 0x50, 0x08, 0x46, - 0x83, 0xae, 0xe7, 0x88, 0x6a, 0x97, 0x68, 0xbc, 0xc3, 0x2f, 0x00, 0xc4, 0x5c, 0x18, 0xe1, 0x68, - 0xc8, 0x44, 0x55, 0x97, 0x67, 0x66, 0x43, 0x1f, 0x0d, 0x19, 0x2d, 0x99, 0xc9, 0x92, 0x0f, 0xab, - 0x6b, 0x0e, 0x92, 0x22, 0x8a, 0x35, 0x7e, 0x00, 0x45, 0xdb, 0xf2, 0x5c, 0xe3, 0xca, 0x77, 0x2a, - 0x05, 0x81, 0x2f, 0xf2, 0xfd, 0xa9, 0xef, 0x6c, 0xff, 0x24, 0xc1, 0x62, 0x9c, 0x1e, 0x7e, 0x0a, - 0x39, 0xdf, 0x73, 0x98, 0x88, 0x75, 0x79, 0x2a, 0x7b, 0xea, 0x39, 0x8c, 0x0a, 0x12, 0x57, 0xa1, - 0x64, 0x3a, 0x7d, 0xcf, 0xb7, 0xc3, 0xcb, 0x81, 0xc8, 0x60, 0xb9, 0xba, 0x96, 0x52, 0xca, 0x09, - 0x47, 0x27, 0x32, 0xbc, 0x0f, 0x45, 0xe6, 0x5a, 0x5e, 0xcf, 0x76, 0xfb, 0x22, 0xbf, 0xe5, 0xea, - 0xdd, 0x94, 0x09, 0x89, 0x29, 0x3a, 0x16, 0xe1, 0xcf, 0x21, 0x6f, 0x5d, 0xf9, 0xd7, 0x49, 0xc6, - 0x28, 0xa5, 0x56, 0x38, 0x4e, 0x23, 0x9a, 0x47, 0x2c, 0x0a, 0x93, 0xbf, 0x11, 0xb1, 0x28, 0x8b, - 0x20, 0xb7, 0xff, 0x91, 0x87, 0x3b, 0x67, 0xa6, 0x63, 0xf7, 0xf8, 0xb5, 0x14, 0x89, 0x56, 0x60, - 0x71, 0xe0, 0xb9, 0xf6, 0xbb, 0xf1, 0x6d, 0x4f, 0xb6, 0x98, 0xc0, 0x72, 0xdf, 0x1f, 0x5a, 0x06, - 0x73, 0x7b, 0x43, 0xcf, 0x76, 0xc3, 0xe4, 0x32, 0x6d, 0x24, 0xae, 0xa7, 0x1c, 0xed, 0x91, 0x58, - 0x46, 0xef, 0x70, 0xab, 0x64, 0x17, 0x70, 0x37, 0x3e, 0x0b, 0xc2, 0x94, 0x9b, 0xec, 0xff, 0xe7, - 0x86, 0x5b, 0x4d, 0xdc, 0xfc, 0x06, 0x8a, 0xec, 0xfd, 0xd0, 0xf1, 0x7c, 0xe6, 0x8b, 0x4a, 0x94, - 0xab, 0xdb, 0x9f, 0x70, 0x10, 0xab, 0xc4, 0x94, 0x8e, 0x6d, 0xf0, 0x1b, 0x28, 0x5e, 0x30, 0x66, - 0xd8, 0xee, 0x85, 0x27, 0x4a, 0x54, 0xae, 0x3e, 0x9e, 0x6f, 0x7f, 0xc8, 0x98, 0x30, 0x5d, 0xbc, - 0x88, 0x16, 0x58, 0x86, 0xb2, 0xdd, 0xb5, 0x0c, 0xeb, 0xd2, 0x74, 0x5d, 0x16, 0x0d, 0x4d, 0xb9, - 0xba, 0x35, 0xdf, 0x58, 0xad, 0x29, 0x4a, 0xa4, 0xa3, 0x60, 0x77, 0xad, 0x78, 0xbd, 0xfe, 0x2b, - 0x28, 0x26, 0x99, 0xf0, 0x81, 0xe7, 0xb3, 0x17, 0x5f, 0xb5, 0x2b, 0xdf, 0xc1, 0x8f, 0x01, 0xec, - 0xc0, 0x18, 0xfa, 0xf6, 0xc0, 0xf4, 0xa3, 0x47, 0xbc, 0x48, 0x4b, 0x76, 0xd0, 0x89, 0x80, 0xf5, - 0x57, 0xb0, 0x94, 0xce, 0x69, 0x3c, 0xd5, 0x52, 0x6a, 0xaa, 0x63, 0xa7, 0x99, 0xb1, 0xd3, 0xf5, - 0xbf, 0x49, 0xb0, 0x18, 0xa7, 0xc2, 0x0f, 0xe8, 0x9a, 0x01, 0x33, 0x7a, 0xcc, 0xf5, 0x06, 0xb1, - 0x5d, 0x89, 0x23, 0x75, 0x0e, 0xe0, 0x87, 0x50, 0xe2, 0xa5, 0xf1, 0xcd, 0x90, 0x45, 0x3d, 0x2e, - 0x51, 0x5e, 0x2b, 0xca, 0xf7, 0xf8, 0x19, 0x2c, 0xdb, 0xae, 0x1d, 0x1a, 0x7d, 0x33, 0x30, 0x1c, - 0x7b, 0x60, 0x87, 0x62, 0x6a, 0xf3, 0x74, 0x89, 0xa3, 0x47, 0x66, 0xd0, 0xe0, 0x18, 0x7e, 0x02, - 0x4b, 0x76, 0x60, 0x04, 0x36, 0x7f, 0xf0, 0xbb, 0x0e, 0x8b, 0xdf, 0xbc, 0xb2, 0x1d, 0x68, 0x09, - 0xc4, 0x25, 0xdc, 0xc7, 0xe0, 0xca, 0x09, 0xed, 0xa1, 0x33, 0x12, 0x4d, 0x90, 0x68, 0xb9, 0x6f, - 0x06, 0xcd, 0x18, 0x5a, 0x7f, 0x01, 0x30, 0x29, 0x20, 0x5e, 0x86, 0x8c, 0xdd, 0x8b, 0xa3, 0xcd, - 0xd8, 0x3d, 0x9e, 0xf7, 0xd0, 0xf3, 0xc3, 0xe4, 0xd3, 0xc3, 0xd7, 0xbb, 0xe3, 0x17, 0x46, 0xdc, - 0xf7, 0x75, 0xb8, 0x27, 0x6b, 0x1a, 0xd1, 0x0d, 0xfd, 0x6d, 0x87, 0x18, 0xa7, 0x2d, 0xad, 0x43, - 0x14, 0xf5, 0x50, 0x25, 0x75, 0xb4, 0x80, 0x3f, 0x83, 0xd5, 0x14, 0xd7, 0x92, 0x75, 0xf5, 0x8c, - 0x20, 0x09, 0xdf, 0x03, 0x9c, 0x82, 0xcf, 0xa9, 0xdc, 0xe9, 0x90, 0x3a, 0xca, 0xcc, 0xe0, 0x9a, - 0x2e, 0x9f, 0xa8, 0xad, 0x23, 0x94, 0xc5, 0x77, 0x61, 0x25, 0x85, 0x77, 0xda, 0xed, 0x06, 0xca, - 0x61, 0x0c, 0xcb, 0x29, 0x50, 0xad, 0x29, 0x28, 0x3f, 0x23, 0x54, 0xce, 0xab, 0x2f, 0x50, 0x61, - 0xf7, 0xbf, 0x12, 0x2c, 0xd5, 0xd5, 0x7a, 0xcb, 0x1c, 0xb0, 0x60, 0x68, 0x5a, 0x0c, 0x3f, 0x86, - 0x07, 0x75, 0xb5, 0x6e, 0xb4, 0xe4, 0x26, 0xd1, 0x3a, 0xb2, 0x32, 0x1b, 0xf4, 0x3d, 0xc0, 0xd3, - 0xb4, 0xda, 0x39, 0xd4, 0xa2, 0xa8, 0xa7, 0x71, 0xad, 0xdd, 0xa2, 0x28, 0x83, 0x1f, 0xc0, 0x67, - 0xd3, 0x78, 0x4d, 0xd5, 0x95, 0xb6, 0xda, 0x42, 0x59, 0x5e, 0x9b, 0x69, 0x8a, 0xe8, 0xc7, 0x84, - 0x92, 0xd3, 0x26, 0xca, 0xf1, 0xda, 0xcc, 0x1c, 0x23, 0x52, 0xb8, 0x61, 0x72, 0x4e, 0x6a, 0xf2, - 0xa9, 0x7e, 0xdc, 0x42, 0x85, 0x9b, 0x26, 0xf5, 0xf3, 0x16, 0x5a, 0xbc, 0x19, 0x80, 0x46, 0xe8, - 0x99, 0xaa, 0x10, 0x54, 0xdc, 0xfd, 0xbb, 0x04, 0x4b, 0xe9, 0x47, 0x91, 0xe7, 0x7e, 0x42, 0xde, - 0x1a, 0x72, 0xe3, 0xa8, 0x4d, 0x55, 0xfd, 0xb8, 0x39, 0x93, 0xfb, 0x7d, 0xb8, 0x3b, 0x4d, 0x13, - 0xad, 0xfa, 0xfa, 0x17, 0x48, 0x9a, 0x47, 0xbc, 0x7c, 0xf3, 0x0a, 0x65, 0xe6, 0x11, 0xaf, 0x0f, - 0xaa, 0x28, 0x3b, 0x87, 0xa8, 0xd7, 0x35, 0x19, 0xe5, 0x70, 0x05, 0xd6, 0xe6, 0x9c, 0x71, 0x82, - 0xf2, 0x73, 0x4c, 0x14, 0x6e, 0x52, 0xd8, 0xfd, 0x43, 0x06, 0x8a, 0xc9, 0xd3, 0xcb, 0xd3, 0xe5, - 0x2a, 0xe5, 0x94, 0x9e, 0xcd, 0xb6, 0x0e, 0xc3, 0xf2, 0x84, 0xea, 0x44, 0x91, 0x4f, 0x63, 0x51, - 0xd0, 0xd3, 0xd8, 0xeb, 0xea, 0x01, 0xca, 0xe2, 0x35, 0x40, 0x13, 0xec, 0xab, 0xea, 0xeb, 0xd7, - 0x07, 0xbf, 0x8c, 0xa6, 0x2c, 0x85, 0xbe, 0x7a, 0xf5, 0x06, 0xe5, 0x79, 0x1b, 0x26, 0x18, 0xa9, - 0x47, 0xd2, 0x02, 0x1f, 0xbe, 0x34, 0xcc, 0xb5, 0x8b, 0x49, 0x4a, 0x11, 0xa8, 0x11, 0x85, 0x07, - 0x75, 0x72, 0x80, 0x8a, 0x7c, 0x9a, 0x26, 0x44, 0xad, 0xa1, 0x1d, 0x54, 0x5f, 0xbe, 0x39, 0x40, - 0xa5, 0x69, 0x83, 0x13, 0xa2, 0x28, 0xf2, 0x09, 0xcf, 0x03, 0x76, 0x03, 0x28, 0xa7, 0xbe, 0x55, - 0xf8, 0x11, 0x54, 0xb8, 0x8e, 0xb4, 0x94, 0x76, 0x5d, 0x6d, 0x1d, 0xcd, 0x14, 0x22, 0x4e, 0x66, - 0xcc, 0x52, 0xf9, 0x1c, 0x49, 0x37, 0xd0, 0x63, 0xf2, 0x15, 0xca, 0xf0, 0x89, 0x9b, 0x42, 0x9b, - 0xa7, 0x0d, 0x5d, 0xad, 0xc9, 0x1a, 0x41, 0xd9, 0xdd, 0x6f, 0xa3, 0xaf, 0x33, 0xff, 0xfc, 0x26, - 0x7d, 0xa3, 0xed, 0xc6, 0x6c, 0xd9, 0x1f, 0xc2, 0xfd, 0x31, 0xc3, 0x67, 0x95, 0xb4, 0x74, 0x55, - 0x91, 0x75, 0xb5, 0xdd, 0x8a, 0xae, 0xcd, 0x84, 0xd4, 0x34, 0x42, 0x05, 0x3e, 0x1e, 0x1c, 0x81, - 0xd7, 0x49, 0x83, 0x1c, 0x45, 0x06, 0xd9, 0x29, 0x42, 0x6d, 0x9d, 0xb5, 0x63, 0x4f, 0xb9, 0xdd, - 0x7f, 0x45, 0xc1, 0x88, 0x57, 0x27, 0x0e, 0x66, 0xce, 0x9b, 0x13, 0x77, 0x4c, 0x30, 0x6d, 0x45, - 0x27, 0x3a, 0x92, 0x92, 0x8e, 0x09, 0x8c, 0x34, 0x1a, 0x6a, 0x47, 0x57, 0x15, 0x94, 0xc1, 0x08, - 0x96, 0xc6, 0x30, 0xd5, 0x64, 0x94, 0x4d, 0x82, 0x8d, 0xde, 0x9f, 0xb7, 0xcd, 0x26, 0xd1, 0xa9, - 0xaa, 0xa0, 0x1c, 0x5e, 0x85, 0x3b, 0x63, 0xfc, 0xb8, 0x29, 0xf3, 0x8b, 0x9a, 0x36, 0x6e, 0x76, - 0x14, 0x54, 0xc0, 0x2b, 0x50, 0x1e, 0x23, 0x5f, 0x9f, 0xa0, 0xc5, 0xa9, 0x63, 0xc7, 0xd7, 0xb8, - 0x38, 0x15, 0x61, 0x4d, 0xed, 0xbc, 0xac, 0xa2, 0xd2, 0x6e, 0x57, 0xdc, 0xd3, 0xe0, 0xd2, 0xf4, - 0x99, 0x28, 0x76, 0x74, 0x4f, 0xb5, 0x63, 0x99, 0x92, 0x79, 0x15, 0x8f, 0xe2, 0x4c, 0xd3, 0x1a, - 0xa1, 0x48, 0x8a, 0x3b, 0x91, 0xc2, 0xcf, 0xe4, 0x86, 0x5a, 0x97, 0xf5, 0x36, 0x45, 0x99, 0xdd, - 0x3f, 0xe7, 0x60, 0xa5, 0xc3, 0xfc, 0x81, 0x1d, 0x04, 0xb6, 0xe7, 0x6a, 0x96, 0x37, 0x64, 0x78, - 0x0b, 0x1e, 0x75, 0x08, 0x6d, 0xaa, 0x9a, 0xa6, 0xb6, 0x5b, 0x86, 0xa6, 0xb4, 0x6f, 0xd4, 0x73, - 0x13, 0x1e, 0xde, 0x50, 0xd4, 0x64, 0x4d, 0x55, 0x0c, 0xb5, 0x75, 0xd8, 0x46, 0x12, 0x7e, 0x0e, - 0x4f, 0x6e, 0x08, 0x26, 0x80, 0x66, 0x50, 0x22, 0xf3, 0xc7, 0xfd, 0x73, 0xd8, 0xbe, 0x55, 0x76, - 0x4e, 0x55, 0x9d, 0xa0, 0xec, 0x5c, 0x9d, 0x4e, 0xe5, 0x96, 0x26, 0x2b, 0xfa, 0xc4, 0x5f, 0x0e, - 0x7f, 0x01, 0x4f, 0x6f, 0xd7, 0x45, 0x0e, 0xf3, 0xf8, 0x09, 0x3c, 0xbe, 0x21, 0x3c, 0x97, 0x1b, - 0x0d, 0xa2, 0xc7, 0xbe, 0x0a, 0xf8, 0x29, 0x6c, 0x7e, 0x52, 0xa2, 0x50, 0x22, 0xeb, 0x04, 0x2d, - 0xce, 0x0d, 0x2c, 0x11, 0x69, 0xa7, 0x35, 0x4d, 0xa1, 0x6a, 0x8d, 0xa0, 0xe2, 0xad, 0xce, 0x4e, - 0x3b, 0x75, 0xee, 0xac, 0x84, 0x77, 0xe0, 0xd9, 0xed, 0xd1, 0x9f, 0x11, 0xaa, 0x1e, 0xbe, 0x45, - 0x80, 0x7f, 0x06, 0x5f, 0xdc, 0xae, 0xac, 0xd1, 0xb6, 0x5c, 0x57, 0x64, 0x4d, 0x47, 0xe5, 0xb9, - 0xcd, 0x92, 0xeb, 0x4d, 0xb5, 0x15, 0x0d, 0xc8, 0x12, 0x7e, 0x06, 0x5b, 0x9f, 0x10, 0x4c, 0x26, - 0xe5, 0x4e, 0xed, 0xd7, 0xdf, 0x7f, 0xd8, 0x90, 0x7e, 0xf8, 0xb0, 0x21, 0xfd, 0xf4, 0x61, 0x43, - 0xfa, 0xe3, 0xc7, 0x8d, 0x85, 0x1f, 0x3e, 0x6e, 0x2c, 0xfc, 0xf3, 0xe3, 0xc6, 0xc2, 0xd7, 0xdb, - 0x7d, 0x3b, 0xbc, 0xbc, 0xea, 0xee, 0x59, 0xde, 0x60, 0xdf, 0x73, 0x03, 0xcf, 0xf5, 0xf7, 0xc5, - 0x9f, 0xf7, 0xfb, 0xfc, 0x27, 0x08, 0xff, 0x77, 0x37, 0xe8, 0x16, 0xc4, 0x6f, 0xed, 0x97, 0xff, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xef, 0xb3, 0x35, 0xb4, 0x0f, 0x00, 0x00, - // 289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0xc9, 0x4c, 0xd1, - 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, - 0xe9, 0x83, 0x58, 0x10, 0x59, 0x29, 0xc1, 0xc4, 0xdc, 0xcc, 0xbc, 0x7c, 0x7d, 0x30, 0x09, 0x15, - 0x12, 0x82, 0x1a, 0x53, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x44, 0xc9, 0x86, 0x8b, 0xc7, 0x1d, 0x62, - 0x6a, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x0e, 0x17, 0x5b, 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1, - 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x11, 0x9f, 0x1e, 0xc4, 0x16, 0xbd, 0x00, 0xb0, 0xa8, 0x13, - 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x50, 0x35, 0x4a, 0x4b, 0x19, 0xb9, 0xd8, 0x20, 0x12, 0x42, - 0x0e, 0x5c, 0x42, 0xe5, 0x19, 0x99, 0x25, 0xa9, 0x39, 0x99, 0xc5, 0x25, 0xa9, 0x29, 0xf1, 0x89, - 0xc5, 0xc5, 0xa9, 0x25, 0x20, 0x43, 0x98, 0x35, 0xb8, 0x8d, 0x04, 0x61, 0x86, 0x38, 0x82, 0x44, - 0x3d, 0xf3, 0xd2, 0xf2, 0x83, 0x04, 0x91, 0x14, 0x83, 0x45, 0x31, 0x4c, 0x48, 0xce, 0x48, 0xcc, - 0xcc, 0x2b, 0x96, 0x60, 0x42, 0x35, 0xc1, 0x19, 0x24, 0x8a, 0x61, 0x02, 0x58, 0xb4, 0xd8, 0x4a, - 0x7c, 0xc6, 0x02, 0x79, 0x86, 0x17, 0x0b, 0xe4, 0x19, 0xbb, 0x9e, 0x6f, 0xd0, 0xe2, 0x02, 0xf9, - 0x16, 0xe2, 0x4e, 0x27, 0x9b, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, - 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, - 0x2b, 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x07, 0x69, 0x07, 0x87, 0x54, 0x12, 0x1b, - 0x38, 0xa8, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0x5b, 0x51, 0x23, 0x87, 0x01, 0x00, - 0x00, + // 1067 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xc1, 0x6e, 0xdb, 0x46, + 0x13, 0x36, 0x45, 0x5b, 0xb2, 0x46, 0x46, 0x6c, 0x6f, 0x94, 0x84, 0x11, 0xf2, 0xcb, 0xfa, 0x85, + 0xa6, 0x70, 0x8b, 0x42, 0x42, 0x92, 0x4b, 0x11, 0x14, 0x45, 0xe3, 0x26, 0x0d, 0x12, 0xa3, 0x80, + 0xc1, 0x34, 0x08, 0xd0, 0x0b, 0xb1, 0x22, 0xc7, 0xd4, 0xd6, 0xd4, 0x2e, 0xb1, 0xbb, 0x94, 0xcd, + 0x43, 0x81, 0xf6, 0xda, 0x53, 0x7b, 0x6b, 0x6f, 0x41, 0x9f, 0xa0, 0x7d, 0x8b, 0x1c, 0x73, 0xec, + 0x29, 0x28, 0x92, 0x43, 0xfb, 0x18, 0xc5, 0x2e, 0x97, 0xb2, 0xa2, 0xf8, 0xd2, 0x4b, 0x2f, 0xf4, + 0xcc, 0x37, 0xb3, 0x3b, 0xb3, 0x33, 0xdf, 0x8c, 0x05, 0xdd, 0x84, 0x25, 0xe3, 0xf9, 0xad, 0x71, + 0x8a, 0x1c, 0x15, 0x53, 0xa3, 0x5c, 0x0a, 0x2d, 0x48, 0x33, 0x61, 0xc9, 0x68, 0x7e, 0xab, 0xb7, + 0x4b, 0x67, 0x8c, 0x8b, 0xb1, 0xfd, 0x56, 0xa6, 0x5e, 0x37, 0x15, 0xa9, 0xb0, 0xe2, 0xd8, 0x48, + 0x15, 0x3a, 0xfc, 0xce, 0x83, 0xad, 0x87, 0xd5, 0x15, 0x4f, 0x34, 0xd5, 0x48, 0x3e, 0x82, 0x66, + 0x4e, 0x25, 0x9d, 0xa9, 0xc0, 0x1b, 0x78, 0xfb, 0x9d, 0xdb, 0x97, 0x46, 0xd5, 0x95, 0xa3, 0x23, + 0x8b, 0x1e, 0xac, 0xbf, 0x78, 0xb5, 0xb7, 0x16, 0x3a, 0x1f, 0x72, 0x00, 0x3b, 0x69, 0x26, 0x26, + 0x34, 0x8b, 0x18, 0xd7, 0x98, 0x4a, 0xa6, 0xcb, 0xa0, 0x61, 0xcf, 0x5d, 0xab, 0xcf, 0x3d, 0xb4, + 0xf6, 0x47, 0xb5, 0x39, 0xdc, 0x4e, 0xdf, 0x06, 0x86, 0xdf, 0xc2, 0xf6, 0x8a, 0x0f, 0xe9, 0x03, + 0xc4, 0x82, 0x6b, 0x29, 0xb2, 0x0c, 0xa5, 0x4d, 0xa4, 0x1d, 0x2e, 0x21, 0x84, 0xc0, 0xba, 0x42, + 0x4c, 0x6c, 0xa8, 0x76, 0x68, 0x65, 0x32, 0x80, 0x0e, 0x8d, 0xe3, 0x62, 0x56, 0x64, 0x54, 0x0b, + 0x19, 0xf8, 0x03, 0x6f, 0x7f, 0x2b, 0x5c, 0x86, 0x48, 0x17, 0x36, 0x62, 0x51, 0x70, 0x1d, 0xac, + 0x0f, 0xbc, 0xfd, 0xf5, 0xb0, 0x52, 0x86, 0xaf, 0x7c, 0x68, 0x56, 0x6f, 0x23, 0x9f, 0x01, 0x39, + 0x9d, 0x32, 0x8d, 0x19, 0x53, 0x1a, 0x93, 0x88, 0x2a, 0x85, 0xda, 0xd4, 0xc1, 0xdf, 0xef, 0xdc, + 0xde, 0xad, 0xdf, 0x73, 0xcf, 0xa0, 0x8f, 0xf8, 0xb1, 0x08, 0x77, 0x97, 0x9c, 0x2d, 0xaa, 0xc8, + 0x53, 0xb8, 0x4c, 0xb3, 0x4c, 0x9c, 0x62, 0x12, 0xe5, 0xc5, 0x24, 0x63, 0x71, 0x74, 0x82, 0xa5, + 0x0a, 0x1a, 0xf6, 0x8a, 0x9b, 0x6f, 0x97, 0x72, 0x74, 0xaf, 0xf2, 0x3c, 0xb2, 0x8e, 0x87, 0x58, + 0xaa, 0x07, 0x5c, 0xcb, 0x32, 0xdc, 0xa5, 0xab, 0x38, 0xd9, 0x83, 0x0e, 0xcb, 0x8f, 0x55, 0x44, + 0x63, 0xcd, 0xe6, 0x68, 0xdf, 0xb6, 0x19, 0x82, 0x81, 0xee, 0x59, 0x84, 0xdc, 0x87, 0x7e, 0x26, + 0x62, 0x9a, 0x4d, 0x85, 0xd2, 0x91, 0xc4, 0x94, 0x29, 0x2d, 0xa9, 0x66, 0x82, 0x47, 0xc8, 0xe9, + 0x24, 0xc3, 0xc4, 0xbe, 0x79, 0x33, 0xbc, 0xb1, 0xf0, 0x0a, 0x97, 0x9c, 0x1e, 0x54, 0x3e, 0xe4, + 0x0e, 0x5c, 0x89, 0x05, 0x9f, 0x63, 0x49, 0x79, 0x8c, 0x51, 0x2e, 0xf1, 0x18, 0x25, 0xf2, 0x18, + 0x83, 0x0d, 0x5b, 0xe7, 0xee, 0xb9, 0xf1, 0x68, 0x61, 0x23, 0x63, 0xb8, 0x4c, 0xb5, 0x46, 0xa5, + 0xab, 0x78, 0xc7, 0x42, 0xce, 0xa8, 0x56, 0x41, 0x73, 0xe0, 0xef, 0xb7, 0x43, 0xb2, 0x64, 0xfa, + 0xa2, 0xb2, 0xf4, 0x9e, 0xc2, 0xd5, 0x8b, 0x5f, 0x4e, 0x76, 0xc0, 0x3f, 0xc1, 0xd2, 0xf5, 0xdb, + 0x88, 0xe4, 0x26, 0x6c, 0xcc, 0x69, 0x56, 0xa0, 0x23, 0xd5, 0x76, 0x5d, 0xc1, 0x43, 0x2c, 0x6d, + 0x0b, 0x2a, 0xeb, 0xdd, 0xc6, 0xc7, 0xde, 0xdd, 0x6b, 0x3f, 0x3f, 0xdf, 0x5b, 0xfb, 0xfb, 0xf9, + 0x9e, 0xf7, 0xc3, 0x5f, 0xbf, 0x7d, 0x08, 0x66, 0x3a, 0x2a, 0x8e, 0x0e, 0x7f, 0xf1, 0xa0, 0xbd, + 0x68, 0x9a, 0x21, 0x01, 0xe3, 0x09, 0x9e, 0xd9, 0x28, 0x7e, 0x58, 0x29, 0x26, 0xf2, 0x54, 0xe6, + 0x8e, 0x4f, 0x46, 0x24, 0x57, 0xa1, 0xa9, 0xca, 0xd9, 0x44, 0x64, 0xb6, 0xda, 0xed, 0xd0, 0x69, + 0xe4, 0x7f, 0x00, 0x96, 0x17, 0x91, 0x2e, 0x73, 0xb4, 0x55, 0x6d, 0x87, 0x6d, 0x8b, 0x7c, 0x55, + 0xe6, 0x68, 0x98, 0xc9, 0xe9, 0xac, 0xae, 0x98, 0x95, 0xc9, 0x75, 0xd8, 0x64, 0xb1, 0xe0, 0x51, + 0x21, 0xb3, 0xa0, 0x69, 0xf1, 0x96, 0xd1, 0x9f, 0xca, 0x6c, 0xf8, 0x53, 0x03, 0x36, 0xef, 0x8b, + 0xb8, 0x98, 0x21, 0xd7, 0xe4, 0x12, 0x34, 0x58, 0xe2, 0x5e, 0xdf, 0x60, 0xc9, 0xca, 0x14, 0x34, + 0xde, 0x99, 0x82, 0xf7, 0xe1, 0x12, 0x2d, 0xf4, 0x14, 0xb9, 0x66, 0xb1, 0xad, 0x70, 0xe0, 0xdb, + 0xa2, 0xaf, 0xa0, 0xe4, 0x03, 0xd8, 0x31, 0x09, 0x4a, 0xdb, 0x9f, 0x19, 0xea, 0xa9, 0x30, 0x74, + 0x30, 0x9e, 0xdb, 0x0b, 0xfc, 0x4b, 0x0b, 0x5b, 0x06, 0xd0, 0x9c, 0x4e, 0x58, 0xc6, 0x74, 0x19, + 0x25, 0x98, 0x61, 0x5a, 0xdd, 0xbc, 0x61, 0xfd, 0xbb, 0xe7, 0xc6, 0xfb, 0x0b, 0xdb, 0xca, 0x21, + 0xc6, 0xe7, 0xc2, 0xa5, 0xd3, 0x5c, 0x3d, 0xf4, 0x68, 0x61, 0x23, 0x01, 0xb4, 0x14, 0xca, 0x39, + 0x8b, 0x31, 0x68, 0x59, 0xb7, 0x5a, 0x1d, 0x7e, 0xef, 0x41, 0xcb, 0xf5, 0xd7, 0x94, 0x53, 0x8a, + 0x0c, 0x5d, 0x51, 0xac, 0x4c, 0x6e, 0x40, 0x9b, 0x66, 0xa9, 0x90, 0x4c, 0x4f, 0x67, 0xae, 0x2a, + 0xe7, 0x00, 0xe9, 0xc1, 0x26, 0xf2, 0x58, 0x24, 0x8c, 0xa7, 0xae, 0x73, 0x0b, 0xdd, 0x2e, 0x80, + 0x42, 0xce, 0xeb, 0xb6, 0x55, 0x8a, 0x89, 0x61, 0x7b, 0xe9, 0x5a, 0x66, 0xe4, 0xe1, 0xaf, 0x0d, + 0x68, 0x1e, 0x15, 0x93, 0x43, 0x2c, 0xff, 0x93, 0x14, 0xae, 0xc3, 0xe6, 0x09, 0x96, 0xd1, 0x52, + 0x1a, 0xad, 0x13, 0x2c, 0x2d, 0xa1, 0x76, 0xc0, 0x97, 0xf4, 0xd4, 0xf2, 0x66, 0x2b, 0x34, 0x22, + 0x79, 0x0f, 0xfc, 0x6f, 0x4e, 0x4f, 0x82, 0x96, 0x9d, 0x08, 0xb2, 0xd8, 0x29, 0x36, 0xdb, 0xd1, + 0xe3, 0x67, 0x87, 0xa1, 0x31, 0xf7, 0x28, 0xf8, 0x8f, 0x9f, 0x1d, 0xda, 0x91, 0xd2, 0xe7, 0x23, + 0xa5, 0xed, 0x90, 0xc5, 0x72, 0x5e, 0x53, 0x3d, 0x96, 0x73, 0xb2, 0x05, 0xde, 0x99, 0x4b, 0xd4, + 0x3b, 0x33, 0x5a, 0xe9, 0xb2, 0xf3, 0x4a, 0xa3, 0x71, 0x97, 0x92, 0xc7, 0x8d, 0x86, 0x8e, 0xc2, + 0x1e, 0x0e, 0x7f, 0xf7, 0xa1, 0xf5, 0xa4, 0x6a, 0xda, 0x3b, 0xdc, 0xfd, 0x3f, 0x6c, 0xb9, 0x7e, + 0x56, 0xaf, 0xaa, 0xc2, 0x75, 0x1c, 0x66, 0x5f, 0x66, 0x8a, 0x58, 0xe8, 0xa9, 0xb0, 0xff, 0x34, + 0x7c, 0x57, 0xc4, 0x1a, 0x30, 0xf3, 0x27, 0x24, 0x4b, 0x19, 0x77, 0xb9, 0x38, 0xcd, 0xac, 0xf9, + 0x04, 0x55, 0x2c, 0x59, 0xee, 0x78, 0x69, 0xef, 0x5d, 0x82, 0x48, 0x08, 0xbb, 0x75, 0x68, 0xe4, + 0x49, 0x2e, 0x18, 0x77, 0xeb, 0x68, 0x69, 0x03, 0xbb, 0xb4, 0xeb, 0xbf, 0x0f, 0x6a, 0xbf, 0x6a, + 0x03, 0xef, 0xa8, 0x15, 0x98, 0x1c, 0x40, 0x27, 0x47, 0x39, 0x63, 0x4a, 0x31, 0xc1, 0x95, 0x65, + 0x6c, 0xe7, 0xf6, 0x60, 0xf5, 0xb6, 0xa3, 0x73, 0x97, 0xea, 0xa2, 0xe5, 0x43, 0xbd, 0xcf, 0xe1, + 0xca, 0x85, 0xe1, 0x2e, 0x58, 0x7b, 0xdd, 0xe5, 0xb5, 0xd7, 0x5e, 0xda, 0x72, 0xbd, 0x4f, 0x61, + 0x67, 0x35, 0xca, 0xbf, 0x39, 0x7f, 0xf0, 0xc9, 0x8b, 0xd7, 0x7d, 0xef, 0xe5, 0xeb, 0xbe, 0xf7, + 0xe7, 0xeb, 0xbe, 0xf7, 0xe3, 0x9b, 0xfe, 0xda, 0xcb, 0x37, 0xfd, 0xb5, 0x3f, 0xde, 0xf4, 0xd7, + 0xbe, 0x1e, 0xa6, 0x4c, 0x4f, 0x8b, 0xc9, 0x28, 0x16, 0xb3, 0xb1, 0xe0, 0x4a, 0x70, 0x39, 0xb6, + 0x9f, 0xb3, 0xb1, 0xd9, 0xa5, 0xa6, 0x89, 0x6a, 0xd2, 0xb4, 0x3f, 0x1a, 0xee, 0xfc, 0x13, 0x00, + 0x00, 0xff, 0xff, 0xd7, 0x58, 0x69, 0x63, 0x7d, 0x08, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1563,10 +1139,12 @@ func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.AssetType != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.AssetType)) + if len(m.AssetType) > 0 { + i -= len(m.AssetType) + copy(dAtA[i:], m.AssetType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AssetType))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } if len(m.Symbol) > 0 { i -= len(m.Symbol) @@ -1590,6 +1168,88 @@ func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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.Service) > 0 { + for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Service[iNdEx]) + copy(dAtA[i:], m.Service[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Service[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + 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 = encodeVarintGenesis(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + 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 = encodeVarintGenesis(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + 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 = encodeVarintGenesis(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + 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 = encodeVarintGenesis(dAtA, i, uint64(len(m.Authentication[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintGenesis(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 = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *KeyInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1610,81 +1270,67 @@ func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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 *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)) - } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x2a } - if m.Explorer != nil { + 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] = 0x22 + } + 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] = 0x1a + } + if len(m.Algorithm) > 0 { + i -= len(m.Algorithm) + copy(dAtA[i:], m.Algorithm) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Algorithm))) + i-- + dAtA[i] = 0x12 + } + if len(m.Role) > 0 { + i -= len(m.Role) + copy(dAtA[i:], m.Role) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Role))) + 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 m.Jwk != nil { { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Jwk.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1692,124 +1338,54 @@ func (m *ValidatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x3a + } + if len(m.Raw) > 0 { + i -= len(m.Raw) + copy(dAtA[i:], m.Raw) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Raw))) + i-- + dAtA[i] = 0x32 + } + if len(m.KeyType) > 0 { + i -= len(m.KeyType) + copy(dAtA[i:], m.KeyType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.KeyType))) + i-- + dAtA[i] = 0x2a + } + 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] = 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))) + 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] = 0xa + dAtA[i] = 0x1a } - 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 - _ = l - if m.IsPrimary { - i-- - if m.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorInfo_ExplorerInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorInfo_ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorInfo_ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Url))) + if len(m.Algorithm) > 0 { + i -= len(m.Algorithm) + copy(dAtA[i:], m.Algorithm) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Algorithm))) i-- dAtA[i] = 0x12 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Name))) + if len(m.Role) > 0 { + i -= len(m.Role) + copy(dAtA[i:], m.Role) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Role))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ValidatorInfo_FeeInfo) Marshal() (dAtA []byte, err error) { +func (m *PubKey_JWK) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1819,80 +1395,144 @@ func (m *ValidatorInfo_FeeInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatorInfo_FeeInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *PubKey_JWK) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatorInfo_FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PubKey_JWK) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.GasMultiply != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) + if len(m.E) > 0 { + i -= len(m.E) + copy(dAtA[i:], m.E) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.E))) i-- - dAtA[i] = 0x29 + dAtA[i] = 0x32 } - if m.IsSimulable { + if len(m.N) > 0 { + i -= len(m.N) + copy(dAtA[i:], m.N) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.N))) i-- - if m.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 + dAtA[i] = 0x2a } - if m.InitGasLimit != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.InitGasLimit)) + if len(m.Y) > 0 { + i -= len(m.Y) + copy(dAtA[i:], m.Y) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Y))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x22 } - if len(m.FeeRates) > 0 { - for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FeeRates[iNdEx]) - copy(dAtA[i:], m.FeeRates[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) + if len(m.X) > 0 { + i -= len(m.X) + copy(dAtA[i:], m.X) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.X))) + i-- + dAtA[i] = 0x1a + } + if len(m.Crv) > 0 { + i -= len(m.Crv) + copy(dAtA[i:], m.Crv) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Crv))) + i-- + dAtA[i] = 0x12 + } + if len(m.Kty) > 0 { + i -= len(m.Kty) + copy(dAtA[i:], m.Kty) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Kty))) + i-- + dAtA[i] = 0xa + } + 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 len(m.Permissions) > 0 { + for k := range m.Permissions { + v := m.Permissions[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenesis(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3a } } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BaseDenom))) + if len(m.ServiceEndpoints) > 0 { + for k := range m.ServiceEndpoints { + v := m.ServiceEndpoints[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenesis(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + 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] = 0xa + dAtA[i] = 0x2a } - return len(dAtA) - i, nil -} - -func (m *ValidatorInfo_IBCChannel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x22 } - return dAtA[:n], nil -} - -func (m *ValidatorInfo_IBCChannel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorInfo_IBCChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Port) > 0 { - i -= len(m.Port) - copy(dAtA[i:], m.Port) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Port))) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x1a + } + if len(m.ServiceType) > 0 { + i -= len(m.ServiceType) + copy(dAtA[i:], m.ServiceType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ServiceType))) i-- dAtA[i] = 0x12 } @@ -2017,8 +1657,9 @@ func (m *AssetInfo) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if m.AssetType != 0 { - n += 1 + sovGenesis(uint64(m.AssetType)) + l = len(m.AssetType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) } l = len(m.Name) if l > 0 { @@ -2031,131 +1672,7 @@ func (m *AssetInfo) Size() (n int) { 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 *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)) - } - if len(m.GrpcEndpoints) > 0 { - for _, e := range m.GrpcEndpoints { - if len(m.WhitelistedChains) > 0 { - for _, e := range m.WhitelistedChains { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.RestEndpoints) > 0 { - for _, e := range m.RestEndpoints { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.Explorer != nil { - l = m.Explorer.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.FeeInfo != nil { - 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 *ValidatorInfo_Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Url) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.IsPrimary { - n += 2 - } - return n -} - -func (m *ValidatorInfo_ExplorerInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func (m *ValidatorInfo_FeeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.FeeRates) > 0 { - for _, s := range m.FeeRates { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.InitGasLimit != 0 { - n += 1 + sovGenesis(uint64(m.InitGasLimit)) - } - if m.IsSimulable { - n += 2 - } - if m.GasMultiply != 0 { - n += 9 - } - return n -} - -func (m *ValidatorInfo_IBCChannel) Size() (n int) { +func (m *Document) Size() (n int) { if m == nil { return 0 } @@ -2165,10 +1682,184 @@ func (m *ValidatorInfo_IBCChannel) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.Port) + l = len(m.Controller) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } + if len(m.Authentication) > 0 { + for _, s := range m.Authentication { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.AssertionMethod) > 0 { + for _, s := range m.AssertionMethod { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.CapabilityDelegation) > 0 { + for _, s := range m.CapabilityDelegation { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.CapabilityInvocation) > 0 { + for _, s := range m.CapabilityInvocation { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Service) > 0 { + for _, s := range m.Service { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *KeyInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Role) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Algorithm) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Encoding) + 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.Type) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Role) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Algorithm) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Encoding) + 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.KeyType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Raw) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Jwk != nil { + l = m.Jwk.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *PubKey_JWK) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Crv) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.X) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Y) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.N) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.E) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + 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 + sovGenesis(uint64(l)) + } + l = len(m.ServiceType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.ServiceEndpoints) > 0 { + for k, v := range m.ServiceEndpoints { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + 1 + len(v) + sovGenesis(uint64(len(v))) + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } + if len(m.Permissions) > 0 { + for k, v := range m.Permissions { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + 1 + len(v) + sovGenesis(uint64(len(v))) + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } return n } @@ -2894,10 +2585,10 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) } - m.AssetType = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2907,11 +2598,24 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AssetType |= AssetType(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.AssetType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) @@ -2997,7 +2701,7 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *KeyInfo) Unmarshal(dAtA []byte) error { +func (m *Document) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3020,795 +2724,10 @@ 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: Document: 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 *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) - } - 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.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 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.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 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explorer == nil { - m.Explorer = &ValidatorInfo_ExplorerInfo{} - } - if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.FeeInfo == nil { - 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 { - m.WhitelistedChains = append(m.WhitelistedChains, &ChainInfo{}) - if err := m.WhitelistedChains[len(m.WhitelistedChains)-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 *ValidatorInfo_Endpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := 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_ExplorerInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Url = 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_FeeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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: FeeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) - } - m.InitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.GasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := 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_IBCChannel) 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: IBCChannel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IBCChannel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3845,7 +2764,7 @@ func (m *ValidatorInfo_IBCChannel) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3873,7 +2792,1363 @@ func (m *ValidatorInfo_IBCChannel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Port = string(dAtA[iNdEx:postIndex]) + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 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.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + 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 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.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + 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 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.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + 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 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.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + 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 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.Service = append(m.Service, 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 *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 != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", 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.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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]) + iNdEx = postIndex + case 4: + 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 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", 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.Type = 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 *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 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: 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 Role", 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.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", 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.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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]) + iNdEx = postIndex + case 4: + 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 5: + 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 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.KeyType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Jwk", 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.Jwk == nil { + m.Jwk = &PubKey_JWK{} + } + if err := m.Jwk.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 *PubKey_JWK) 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: JWK: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JWK: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kty", 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.Kty = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Crv", 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.Crv = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field X", 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.X = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Y", 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.Y = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field N", 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.N = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field E", 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.E = 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 *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 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: 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 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceType", 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.ServiceType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.Authority = 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 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.Origin = 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 ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + 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 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.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 ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 7: + 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 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.Permissions == nil { + m.Permissions = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Permissions[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/did/types/msgs.go b/x/did/types/msgs.go index 725651343..4901c802e 100644 --- a/x/did/types/msgs.go +++ b/x/did/types/msgs.go @@ -91,17 +91,13 @@ func (msg *MsgRegisterService) Validate() error { func NewMsgAllocateVault( sender sdk.Address, ) (*MsgAllocateVault, error) { - return &MsgAllocateVault{ -// [RegisterController] -// + return &MsgAllocateVault{}, nil +} -// NewMsgRegisterController creates a new instance of MsgRegisterController -func NewMsgRegisterController( - sender sdk.Address, -) (*MsgRegisterController, error) { - return &MsgRegisterController{ - Authority: sender.String(), - }, nil +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgAllocateVault) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} } // Route returns the name of the module @@ -112,22 +108,9 @@ func (msg MsgAllocateVault) Type() string { return "allocate_vault" } // GetSignBytes implements the LegacyMsg interface. func (msg MsgAllocateVault) GetSignBytes() []byte { -func (msg MsgRegisterController) Route() string { return ModuleName } - -// Type returns the the action -func (msg MsgRegisterController) Type() string { return "initialize_controller" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgRegisterController) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) } -// 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 @@ -167,38 +150,3 @@ func (msg *MsgRegisterController) GetSigners() []sdk.AccAddress { func (msg *MsgRegisterController) Validate() error { return nil } - -// -// [RegisterService] -// - -// NewMsgRegisterController creates a new instance of MsgRegisterController -func NewMsgRegisterService( - sender sdk.Address, -) (*MsgRegisterService, error) { - return &MsgRegisterService{ - Authority: sender.String(), - }, nil -} - -// Route returns the name of the module -func (msg MsgRegisterService) Route() string { return ModuleName } - -// Type returns the the action -func (msg MsgRegisterService) Type() string { return "initialize_controller" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgRegisterService) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) -} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg *MsgRegisterService) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} - -// ValidateBasic does a sanity check on the provided data. -func (msg *MsgRegisterService) Validate() error { - return nil -} diff --git a/x/did/types/perms.go b/x/did/types/perms.go deleted file mode 100644 index fdfb39d10..000000000 --- a/x/did/types/perms.go +++ /dev/null @@ -1,36 +0,0 @@ -package types - -var ( - PermissionScopeStrings = [...]string{ - "profile.name", - "identifiers.email", - "identifiers.phone", - "transactions.read", - "transactions.write", - "wallets.read", - "wallets.create", - "wallets.subscribe", - "wallets.update", - "transactions.verify", - "transactions.broadcast", - "admin.user", - "admin.validator", - } - - StringToPermissionScope = map[string]PermissionScope{ - "PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED, - "PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE, - "PERMISSION_SCOPE_TRANSACTIONS_READ": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE, - "PERMISSION_SCOPE_WALLETS_READ": PermissionScope_PERMISSION_SCOPE_WALLETS_READ, - "PERMISSION_SCOPE_WALLETS_CREATE": PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE, - "PERMISSION_SCOPE_WALLETS_UPDATE": PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST, - "PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR, - } -) diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index 1df81f82b..7f51d14fa 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -99,11 +99,10 @@ func (m *QueryRequest) GetAsset() string { // QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` - Service *ServiceInfo `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Document *Document `protobuf:"bytes,3,opt,name=document,proto3" json:"document,omitempty"` + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (m *QueryResponse) Reset() { *m = QueryResponse{} } @@ -160,13 +159,6 @@ func (m *QueryResponse) GetDocument() *Document { return nil } -func (m *QueryResponse) GetService() *ServiceInfo { - if m != nil { - return m.Service - } - return nil -} - func (m *QueryResponse) GetParams() *Params { if m != nil { return m.Params @@ -176,6 +168,7 @@ func (m *QueryResponse) GetParams() *Params { // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { + // params defines the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -219,387 +212,6 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } -type QueryParamsAssetsResponse struct { - Assets []*AssetInfo `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` -} - -func (m *QueryParamsAssetsResponse) Reset() { *m = QueryParamsAssetsResponse{} } -func (m *QueryParamsAssetsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsAssetsResponse) ProtoMessage() {} -func (*QueryParamsAssetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{3} -} -func (m *QueryParamsAssetsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsAssetsResponse.Marshal(b, m, deterministic) -// 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"` -} - -func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } -func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountsResponse) ProtoMessage() {} -func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{3} -} -func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountsResponse.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 *QueryParamsAssetsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsAssetsResponse.Merge(m, src) -} -func (m *QueryParamsAssetsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsAssetsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsAssetsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsAssetsResponse proto.InternalMessageInfo - -func (m *QueryParamsAssetsResponse) GetAssets() []*AssetInfo { -func (m *QueryAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountsResponse.Merge(m, src) -} -func (m *QueryAccountsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo - -func (m *QueryAccountsResponse) GetExists() bool { - if m != nil { - return m.Assets - } - return nil -} - -type QueryParamsKeysResponse struct { - Keys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *QueryParamsKeysResponse) Reset() { *m = QueryParamsKeysResponse{} } -func (m *QueryParamsKeysResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsKeysResponse) ProtoMessage() {} -func (*QueryParamsKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{4} -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -type QueryCredentialsRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (m *QueryCredentialsRequest) Reset() { *m = QueryCredentialsRequest{} } -func (m *QueryCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCredentialsRequest) ProtoMessage() {} -func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{4} -} -func (m *QueryCredentialsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCredentialsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCredentialsRequest.Merge(m, src) -} -func (m *QueryCredentialsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCredentialsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCredentialsRequest proto.InternalMessageInfo - -func (m *QueryCredentialsRequest) GetDid() string { - if m != nil { - return m.Did - } - return "" -} - -func (m *QueryCredentialsRequest) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -// QueryCredentialsResponse is the response type for the Query/Exists RPC method. -type QueryCredentialsResponse struct { - Credentials map[string][]byte `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *QueryCredentialsResponse) Reset() { *m = QueryCredentialsResponse{} } -func (m *QueryCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCredentialsResponse) ProtoMessage() {} -func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{5} -} -func (m *QueryCredentialsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCredentialsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCredentialsResponse.Merge(m, src) -} -func (m *QueryCredentialsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCredentialsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCredentialsResponse proto.InternalMessageInfo - -func (m *QueryCredentialsResponse) GetCredentials() map[string][]byte { - if m != nil { - return m.Credentials - } - return nil -} - -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -type QueryIdentitiesRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (m *QueryIdentitiesRequest) Reset() { *m = QueryIdentitiesRequest{} } -func (m *QueryIdentitiesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryIdentitiesRequest) ProtoMessage() {} -func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{6} -} -func (m *QueryIdentitiesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIdentitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIdentitiesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryIdentitiesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIdentitiesRequest.Merge(m, src) -} -func (m *QueryIdentitiesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryIdentitiesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIdentitiesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIdentitiesRequest proto.InternalMessageInfo - -func (m *QueryIdentitiesRequest) GetDid() string { - if m != nil { - return m.Did - } - return "" -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -type QueryIdentitiesResponse struct { - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` -} - -func (m *QueryIdentitiesResponse) Reset() { *m = QueryIdentitiesResponse{} } -func (m *QueryIdentitiesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryIdentitiesResponse) ProtoMessage() {} -func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{7} -} -func (m *QueryIdentitiesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIdentitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIdentitiesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryIdentitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIdentitiesResponse.Merge(m, src) -} -func (m *QueryIdentitiesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryIdentitiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIdentitiesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIdentitiesResponse proto.InternalMessageInfo - -func (m *QueryIdentitiesResponse) GetExists() bool { - if m != nil { - return m.Exists - } - return false -} - -func (m *QueryIdentitiesResponse) GetVerificationMethod() []*VerificationMethod { - if m != nil { - return m.VerificationMethod - } - return nil -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -type QueryResolveRequest struct { - 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 *QueryParamsKeysResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsKeysResponse.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 *QueryParamsKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsKeysResponse.Merge(m, src) -} -func (m *QueryParamsKeysResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsKeysResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsKeysResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsKeysResponse proto.InternalMessageInfo - -func (m *QueryParamsKeysResponse) GetKeys() map[string]*KeyInfo { - if m != nil { - return m.Keys -func (m *QueryResolveRequest) GetDid() string { - if m != nil { - return m.Did - } - return nil -} - -type QueryParamsByKeyResponse struct { - Key *KeyInfo `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *QueryParamsByKeyResponse) Reset() { *m = QueryParamsByKeyResponse{} } -func (m *QueryParamsByKeyResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsByKeyResponse) ProtoMessage() {} -func (*QueryParamsByKeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{5} // QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResolveResponse struct { // document is the DID document @@ -610,14 +222,14 @@ 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{3} } -func (m *QueryParamsByKeyResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsByKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryResolveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsByKeyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryResolveResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -627,59 +239,42 @@ func (m *QueryParamsByKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *QueryParamsByKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsByKeyResponse.Merge(m, src) +func (m *QueryResolveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResolveResponse.Merge(m, src) } -func (m *QueryParamsByKeyResponse) XXX_Size() int { +func (m *QueryResolveResponse) XXX_Size() int { return m.Size() } -func (m *QueryParamsByKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsByKeyResponse.DiscardUnknown(m) +func (m *QueryResolveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResolveResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsByKeyResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryResolveResponse proto.InternalMessageInfo -func (m *QueryParamsByKeyResponse) GetKey() *KeyInfo { func (m *QueryResolveResponse) GetDocument() *Document { if m != nil { - return m.Key + return m.Document } return nil } -type QueryParamsByAssetResponse struct { - Asset *AssetInfo `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` +// SyncRequest is the request type for the Sync RPC method. +type SyncRequest struct { + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (m *QueryParamsByAssetResponse) Reset() { *m = QueryParamsByAssetResponse{} } -func (m *QueryParamsByAssetResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsByAssetResponse) ProtoMessage() {} -func (*QueryParamsByAssetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{6} +func (m *SyncRequest) Reset() { *m = SyncRequest{} } +func (m *SyncRequest) String() string { return proto.CompactTextString(m) } +func (*SyncRequest) ProtoMessage() {} +func (*SyncRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{4} } -func (m *QueryParamsByAssetResponse) XXX_Unmarshal(b []byte) error { +func (m *SyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsByAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsByAssetResponse.Marshal(b, m, deterministic) -// 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) + return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -689,74 +284,42 @@ func (m *QueryServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsByAssetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsByAssetResponse.Merge(m, src) +func (m *SyncRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncRequest.Merge(m, src) } -func (m *QueryParamsByAssetResponse) XXX_Size() int { +func (m *SyncRequest) XXX_Size() int { return m.Size() } -func (m *QueryParamsByAssetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsByAssetResponse.DiscardUnknown(m) +func (m *SyncRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SyncRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsByAssetResponse proto.InternalMessageInfo +var xxx_messageInfo_SyncRequest proto.InternalMessageInfo -func (m *QueryParamsByAssetResponse) GetAsset() *AssetInfo { +func (m *SyncRequest) GetDid() string { if m != nil { - return m.Asset -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 m.Did } - return nil + return "" } -type QueryRegistrationOptionsByKeyResponse struct { - RegistrationOptions []string `protobuf:"bytes,1,rep,name=registration_options,json=registrationOptions,proto3" json:"registration_options,omitempty"` +// SyncResponse is the response type for the Sync RPC method. +type SyncResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } -func (m *QueryRegistrationOptionsByKeyResponse) Reset() { *m = QueryRegistrationOptionsByKeyResponse{} } -func (m *QueryRegistrationOptionsByKeyResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRegistrationOptionsByKeyResponse) ProtoMessage() {} -func (*QueryRegistrationOptionsByKeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{7} +func (m *SyncResponse) Reset() { *m = SyncResponse{} } +func (m *SyncResponse) String() string { return proto.CompactTextString(m) } +func (*SyncResponse) ProtoMessage() {} +func (*SyncResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{5} } -func (m *QueryRegistrationOptionsByKeyResponse) XXX_Unmarshal(b []byte) error { +func (m *SyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryRegistrationOptionsByKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryRegistrationOptionsByKeyResponse.Marshal(b, m, deterministic) -// 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"` -} - -func (m *QueryServiceResponse) Reset() { *m = QueryServiceResponse{} } -func (m *QueryServiceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryServiceResponse) ProtoMessage() {} -func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{11} -} -func (m *QueryServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryServiceResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_SyncResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -766,153 +329,66 @@ func (m *QueryServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueryRegistrationOptionsByKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRegistrationOptionsByKeyResponse.Merge(m, src) +func (m *SyncResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncResponse.Merge(m, src) } -func (m *QueryRegistrationOptionsByKeyResponse) XXX_Size() int { +func (m *SyncResponse) XXX_Size() int { return m.Size() } -func (m *QueryRegistrationOptionsByKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRegistrationOptionsByKeyResponse.DiscardUnknown(m) +func (m *SyncResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SyncResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryRegistrationOptionsByKeyResponse proto.InternalMessageInfo +var xxx_messageInfo_SyncResponse proto.InternalMessageInfo -func (m *QueryRegistrationOptionsByKeyResponse) GetRegistrationOptions() []string { -func (m *QueryServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryServiceResponse.Merge(m, src) -} -func (m *QueryServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryServiceResponse proto.InternalMessageInfo - -func (m *QueryServiceResponse) GetOptions() string { +func (m *SyncResponse) GetSuccess() bool { if m != nil { - return m.RegistrationOptions + return m.Success } - return nil + return false } func init() { proto.RegisterType((*QueryRequest)(nil), "did.v1.QueryRequest") proto.RegisterType((*QueryResponse)(nil), "did.v1.QueryResponse") proto.RegisterType((*QueryParamsResponse)(nil), "did.v1.QueryParamsResponse") - proto.RegisterType((*QueryParamsAssetsResponse)(nil), "did.v1.QueryParamsAssetsResponse") - proto.RegisterType((*QueryParamsKeysResponse)(nil), "did.v1.QueryParamsKeysResponse") - proto.RegisterMapType((map[string]*KeyInfo)(nil), "did.v1.QueryParamsKeysResponse.KeysEntry") - proto.RegisterType((*QueryParamsByKeyResponse)(nil), "did.v1.QueryParamsByKeyResponse") - proto.RegisterType((*QueryParamsByAssetResponse)(nil), "did.v1.QueryParamsByAssetResponse") - proto.RegisterType((*QueryRegistrationOptionsByKeyResponse)(nil), "did.v1.QueryRegistrationOptionsByKeyResponse") - 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((*SyncRequest)(nil), "did.v1.SyncRequest") + proto.RegisterType((*SyncResponse)(nil), "did.v1.SyncResponse") } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 708 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xdf, 0x4e, 0x13, 0x41, - 0x14, 0xc6, 0x59, 0xa0, 0x2d, 0x3d, 0x2d, 0xff, 0x4e, 0x2b, 0x2e, 0xd5, 0x54, 0xd9, 0x04, 0x81, - 0x44, 0x3b, 0xa1, 0xde, 0x18, 0x23, 0x17, 0x12, 0x31, 0x2a, 0x26, 0xc8, 0x92, 0x78, 0x41, 0x4c, - 0xb4, 0x74, 0xc7, 0xba, 0x69, 0xbb, 0x53, 0x76, 0xb6, 0x8d, 0x9b, 0xa6, 0x37, 0x3e, 0x81, 0x89, - 0x6f, 0xe0, 0xa3, 0x18, 0x2f, 0xbc, 0x24, 0xf1, 0xc6, 0x4b, 0x03, 0x3e, 0x88, 0xd9, 0xb3, 0x33, - 0x74, 0x2b, 0x60, 0xd2, 0x1b, 0xe8, 0x9c, 0xf9, 0xce, 0xef, 0x9c, 0x39, 0xf3, 0x75, 0x0a, 0xe8, - 0xb8, 0x0e, 0xeb, 0x6d, 0xb2, 0xe3, 0x2e, 0xf7, 0xc3, 0x4a, 0xc7, 0x17, 0x81, 0xc0, 0xb4, 0xe3, - 0x3a, 0x95, 0xde, 0x66, 0xa9, 0xa8, 0xf6, 0x1a, 0xdc, 0xe3, 0xd2, 0x95, 0xf1, 0x6e, 0xa9, 0xa0, - 0xa2, 0x6d, 0xe1, 0xf0, 0x96, 0x0e, 0xde, 0x6c, 0x08, 0xd1, 0x68, 0x71, 0x56, 0xeb, 0xb8, 0xac, - 0xe6, 0x79, 0x22, 0xa8, 0x05, 0xae, 0xf0, 0xd4, 0xae, 0xf5, 0x0e, 0xf2, 0xfb, 0x11, 0xdf, 0xe6, - 0xc7, 0x5d, 0x2e, 0x03, 0x5c, 0x80, 0x29, 0xc7, 0x75, 0x4c, 0xe3, 0xb6, 0xb1, 0x9e, 0xb5, 0xa3, - 0x8f, 0xb8, 0x04, 0x69, 0xe1, 0xbb, 0x0d, 0xd7, 0x33, 0x27, 0x29, 0xa8, 0x56, 0x91, 0xb2, 0xc9, - 0x43, 0x73, 0x2a, 0x56, 0x36, 0x79, 0x88, 0x45, 0x48, 0xd5, 0xa4, 0xe4, 0x81, 0x39, 0x4d, 0xb1, - 0x78, 0x61, 0x7d, 0x37, 0x60, 0x56, 0x95, 0x90, 0x1d, 0xe1, 0x49, 0x8e, 0x26, 0x64, 0x64, 0xb7, - 0x5e, 0xe7, 0x52, 0x52, 0x9d, 0x19, 0x5b, 0x2f, 0x23, 0x02, 0x9d, 0x56, 0x95, 0x8a, 0x17, 0x78, - 0x17, 0x66, 0x1c, 0x51, 0xef, 0xb6, 0xb9, 0x17, 0x50, 0xb9, 0x5c, 0x75, 0xa1, 0x12, 0xcf, 0xa1, - 0xf2, 0x44, 0xc5, 0xed, 0x73, 0x05, 0xde, 0x83, 0x8c, 0xe4, 0x7e, 0xcf, 0xad, 0x73, 0xea, 0x23, - 0x57, 0x2d, 0x68, 0xf1, 0x41, 0x1c, 0x7e, 0xee, 0xbd, 0x17, 0xb6, 0xd6, 0xe0, 0x1d, 0x48, 0x77, - 0x6a, 0x7e, 0xad, 0x2d, 0xcd, 0x14, 0xa9, 0xe7, 0xb4, 0xfa, 0x15, 0x45, 0x6d, 0xb5, 0x6b, 0x6d, - 0x41, 0x81, 0x4e, 0xa1, 0xc2, 0xfa, 0x2c, 0xc3, 0x74, 0xe3, 0xbf, 0xe9, 0x4f, 0x61, 0x39, 0x91, - 0xfe, 0x38, 0x9a, 0xcc, 0x10, 0xb2, 0x01, 0x69, 0x9a, 0x55, 0x04, 0x99, 0x5a, 0xcf, 0x55, 0x17, - 0x35, 0x84, 0x74, 0xd4, 0xaf, 0x12, 0x58, 0x5f, 0x0d, 0xb8, 0x9e, 0x00, 0xed, 0xf2, 0x70, 0x88, - 0xd9, 0x82, 0xe9, 0x26, 0x0f, 0x35, 0x64, 0x43, 0x43, 0xae, 0x90, 0x57, 0xa2, 0xc5, 0x8e, 0x17, - 0xf8, 0xa1, 0x4d, 0x69, 0xa5, 0x67, 0x90, 0x3d, 0x0f, 0xe9, 0xdb, 0x35, 0x86, 0xb7, 0xbb, 0x0a, - 0xa9, 0x5e, 0xad, 0xd5, 0xe5, 0x74, 0x37, 0xb9, 0xea, 0xbc, 0xc6, 0xef, 0xf2, 0x90, 0x3a, 0x8c, - 0x77, 0x1f, 0x4e, 0x3e, 0x30, 0xac, 0x2d, 0x30, 0x13, 0x45, 0xb7, 0xc3, 0x5d, 0x3e, 0xbc, 0xfc, - 0x95, 0x21, 0xf8, 0x12, 0x48, 0xb4, 0x67, 0xed, 0x40, 0x69, 0x24, 0x9d, 0xa6, 0x70, 0x0e, 0x58, - 0xd3, 0x2e, 0x8b, 0x11, 0x97, 0xcc, 0x4a, 0x19, 0xef, 0x10, 0x56, 0x95, 0xef, 0x1a, 0xae, 0x0c, - 0x7c, 0xb2, 0xfd, 0x5e, 0x87, 0xcc, 0x3f, 0xda, 0xd2, 0x26, 0x14, 0xfd, 0x84, 0xe6, 0xad, 0x88, - 0x45, 0x34, 0xc7, 0xac, 0x5d, 0xf0, 0x2f, 0xe6, 0x57, 0xbf, 0xa5, 0x20, 0x45, 0x70, 0x7c, 0x09, - 0xe9, 0xb8, 0x4f, 0x2c, 0x8e, 0x0c, 0x5c, 0x7d, 0xa1, 0x4a, 0x37, 0x2e, 0xb9, 0x06, 0x5d, 0xd9, - 0x9a, 0xff, 0xf4, 0xf3, 0xcf, 0x97, 0xc9, 0x2c, 0x66, 0x58, 0x6c, 0x13, 0x3c, 0x80, 0x7c, 0xd2, - 0x21, 0x57, 0x30, 0xaf, 0xfd, 0x13, 0x55, 0xb4, 0x25, 0xa2, 0x2d, 0xe0, 0x9c, 0xa2, 0xb1, 0xd8, - 0x33, 0xf8, 0x06, 0x66, 0x47, 0x46, 0x39, 0x1e, 0xb5, 0x4c, 0x54, 0x13, 0x97, 0x46, 0xa9, 0xac, - 0x4f, 0xff, 0x07, 0xb8, 0x07, 0x30, 0x34, 0xd7, 0x78, 0xe8, 0x22, 0xa1, 0xe7, 0x30, 0xaf, 0xd1, - 0x91, 0x0f, 0xf1, 0x35, 0xe4, 0x12, 0xc6, 0x19, 0x8f, 0x58, 0x22, 0x62, 0x11, 0x31, 0x49, 0x64, - 0xfd, 0x26, 0x0f, 0x07, 0xd8, 0x01, 0xf3, 0x2a, 0x2b, 0x8c, 0x57, 0x64, 0x8d, 0x8a, 0xac, 0xe0, - 0xad, 0x8b, 0x45, 0x58, 0xd2, 0x2c, 0xf8, 0x02, 0x32, 0x36, 0x97, 0xa2, 0xd5, 0xe3, 0xe3, 0x15, - 0x40, 0x2a, 0x90, 0x47, 0x60, 0xd1, 0x83, 0xde, 0x77, 0x5c, 0x67, 0x80, 0xfb, 0x90, 0x51, 0xef, - 0xd7, 0x78, 0xac, 0x65, 0x62, 0x15, 0x70, 0x91, 0xa9, 0x17, 0x8f, 0xf5, 0xe3, 0x07, 0x7c, 0xb0, - 0xfd, 0xe8, 0xc7, 0x69, 0xd9, 0x38, 0x39, 0x2d, 0x1b, 0xbf, 0x4f, 0xcb, 0xc6, 0xe7, 0xb3, 0xf2, - 0xc4, 0xc9, 0x59, 0x79, 0xe2, 0xd7, 0x59, 0x79, 0xe2, 0xd0, 0x6a, 0xb8, 0xc1, 0x87, 0xee, 0x51, - 0xa5, 0x2e, 0xda, 0x4c, 0x78, 0x52, 0x78, 0x3e, 0xa3, 0x3f, 0x1f, 0xa9, 0xa1, 0x20, 0xec, 0x70, - 0x79, 0x94, 0xa6, 0x1f, 0x90, 0xfb, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x71, 0x4f, 0x30, - 0xa7, 0x06, 0x00, 0x00, - // 665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4f, 0xd4, 0x4e, - 0x18, 0xc7, 0xe9, 0xf2, 0x63, 0xe1, 0xf7, 0xac, 0x1a, 0x32, 0x2c, 0xb0, 0x29, 0x50, 0x70, 0x0e, - 0x42, 0x8c, 0x6e, 0x05, 0x2f, 0xc6, 0xa8, 0x89, 0x82, 0x07, 0x4d, 0x4c, 0xb4, 0x24, 0x1c, 0x3c, - 0x59, 0x3a, 0xe3, 0x32, 0x61, 0x99, 0x29, 0xed, 0xb4, 0xd2, 0x10, 0x2e, 0xbe, 0x02, 0x13, 0x5f, - 0x88, 0x6f, 0xc3, 0x23, 0x89, 0x17, 0x8f, 0x06, 0x7c, 0x0b, 0xde, 0xcd, 0xce, 0x4c, 0x77, 0xdb, - 0xb2, 0xc5, 0x5b, 0xe7, 0xf9, 0xf3, 0xfd, 0x3c, 0x33, 0xf3, 0x9d, 0x02, 0x22, 0x8c, 0xb8, 0xe9, - 0xa6, 0x7b, 0x9c, 0xd0, 0x28, 0xeb, 0x86, 0x91, 0x90, 0x02, 0x35, 0x09, 0x23, 0xdd, 0x74, 0xd3, - 0x5e, 0xee, 0x09, 0xd1, 0xeb, 0x53, 0xd7, 0x0f, 0x99, 0xeb, 0x73, 0x2e, 0xa4, 0x2f, 0x99, 0xe0, - 0xb1, 0xae, 0xb2, 0xdb, 0xa6, 0xb3, 0x47, 0x39, 0x8d, 0x59, 0x1e, 0xcd, 0xf5, 0x64, 0x16, 0x52, - 0x13, 0xc3, 0x6d, 0x40, 0xef, 0x06, 0xf2, 0x6f, 0xfd, 0xc8, 0x3f, 0x8a, 0x3d, 0x7a, 0x9c, 0xd0, - 0x58, 0xe2, 0xa7, 0x30, 0x57, 0x8a, 0xc6, 0xa1, 0xe0, 0x31, 0x45, 0x77, 0xa0, 0x19, 0xaa, 0x48, - 0xc7, 0x5a, 0xb3, 0x36, 0x5a, 0x5b, 0xb7, 0xba, 0x7a, 0x9a, 0xae, 0xa9, 0x33, 0x59, 0xbc, 0x01, - 0x6d, 0xd5, 0xfe, 0x3c, 0x08, 0x44, 0xc2, 0x65, 0x2e, 0x8b, 0x66, 0x61, 0x92, 0x30, 0xa2, 0x9a, - 0xff, 0xf7, 0x06, 0x9f, 0xd8, 0x85, 0xf9, 0x4a, 0xa5, 0x41, 0x2d, 0x40, 0x93, 0x9e, 0xb0, 0x58, - 0x6a, 0xd4, 0x8c, 0x67, 0x56, 0x78, 0x1b, 0x16, 0x55, 0xc3, 0x76, 0x44, 0x09, 0xe5, 0x92, 0xf9, - 0xfd, 0x7a, 0xf5, 0x81, 0x88, 0x88, 0x58, 0x8f, 0xf1, 0x4e, 0x43, 0x05, 0xcd, 0x0a, 0x7f, 0xb3, - 0xa0, 0x73, 0x55, 0xc5, 0x90, 0x77, 0xa1, 0x15, 0x8c, 0xc2, 0x1d, 0x6b, 0x6d, 0x72, 0xa3, 0xb5, - 0xb5, 0x99, 0xef, 0xb4, 0xae, 0xad, 0x5b, 0x88, 0xbd, 0xe4, 0x32, 0xca, 0xbc, 0xa2, 0x8a, 0xfd, - 0x0c, 0x66, 0xab, 0x05, 0x83, 0x79, 0x0f, 0x69, 0x96, 0xcf, 0x7b, 0x48, 0x33, 0xd4, 0x86, 0xa9, - 0xd4, 0xef, 0x27, 0x54, 0x8d, 0x7b, 0xc3, 0xd3, 0x8b, 0xc7, 0x8d, 0x47, 0x16, 0xbe, 0x0b, 0x0b, - 0x8a, 0xfc, 0x4a, 0x49, 0x48, 0x46, 0xaf, 0x39, 0xd3, 0x33, 0x73, 0x44, 0xc5, 0xda, 0xeb, 0x4f, - 0x15, 0xbd, 0x06, 0x94, 0xd2, 0x88, 0x7d, 0x64, 0x81, 0xb2, 0xd1, 0x1b, 0x2a, 0x0f, 0x04, 0xe9, - 0x34, 0xd4, 0xd6, 0xed, 0x7c, 0xeb, 0x7b, 0x57, 0x2a, 0xbc, 0x31, 0x5d, 0x78, 0xdd, 0x78, 0xc7, - 0xa3, 0xb1, 0xe8, 0xa7, 0xb4, 0x7e, 0xce, 0x1d, 0xe3, 0x92, 0x61, 0xa1, 0x19, 0xf2, 0x1e, 0xcc, - 0x10, 0x11, 0x24, 0x47, 0x94, 0x4b, 0xe3, 0xb3, 0xd9, 0x7c, 0x84, 0x1d, 0x13, 0xf7, 0x86, 0x15, - 0xf8, 0xbe, 0xc1, 0xed, 0xd2, 0x28, 0x65, 0xc1, 0x10, 0x37, 0xba, 0x7a, 0xab, 0x74, 0xf5, 0x0f, - 0x0c, 0x74, 0x58, 0x6e, 0xa0, 0x1d, 0x98, 0x16, 0xa1, 0x7a, 0x42, 0xa6, 0x21, 0x5f, 0x6e, 0xfd, - 0xf9, 0x0f, 0xa6, 0x54, 0x0b, 0xda, 0x83, 0xa6, 0x36, 0x3a, 0xb2, 0x4b, 0x76, 0x28, 0xbd, 0x1d, - 0x7b, 0x69, 0x6c, 0x4e, 0x63, 0xf0, 0xdc, 0xe7, 0x1f, 0xbf, 0xbf, 0x36, 0x6e, 0xa2, 0x96, 0x3b, - 0x78, 0x8b, 0xfa, 0xb9, 0x20, 0x02, 0x33, 0xb9, 0xff, 0xd1, 0x72, 0xa9, 0xbb, 0xf2, 0x80, 0xec, - 0x95, 0x9a, 0xac, 0x51, 0x5f, 0x52, 0xea, 0xf3, 0x68, 0x4e, 0xa9, 0x9f, 0x12, 0x46, 0xce, 0x5c, - 0x3f, 0x57, 0xce, 0xa0, 0x55, 0xb0, 0x20, 0x5a, 0xad, 0x77, 0xb4, 0x66, 0xad, 0xfd, 0xcb, 0xf2, - 0x78, 0x5d, 0xe1, 0x6e, 0xa3, 0xd5, 0x02, 0xee, 0x54, 0x9f, 0xf3, 0x99, 0x5b, 0x70, 0x3f, 0xea, - 0x03, 0x8c, 0xcc, 0x88, 0x9c, 0x92, 0xf0, 0x15, 0x47, 0xdb, 0xab, 0xb5, 0x79, 0xc3, 0x5d, 0x51, - 0xdc, 0x45, 0x34, 0x5f, 0xe0, 0xb2, 0x91, 0xfe, 0x07, 0x98, 0x36, 0x96, 0x42, 0xe5, 0xbb, 0x28, - 0x3b, 0xd2, 0x5e, 0x1e, 0x9f, 0x34, 0x10, 0x5b, 0x41, 0xda, 0x08, 0x29, 0x48, 0xa4, 0xb3, 0x1a, - 0x86, 0x02, 0x98, 0x36, 0xfe, 0xa9, 0x10, 0xca, 0x26, 0xac, 0x10, 0x2a, 0x96, 0xab, 0x6c, 0x23, - 0xd6, 0xd9, 0xe1, 0x01, 0xbe, 0x78, 0xf2, 0xfd, 0xc2, 0xb1, 0xce, 0x2f, 0x1c, 0xeb, 0xd7, 0x85, - 0x63, 0x7d, 0xb9, 0x74, 0x26, 0xce, 0x2f, 0x9d, 0x89, 0x9f, 0x97, 0xce, 0xc4, 0x7b, 0xdc, 0x63, - 0xf2, 0x20, 0xd9, 0xef, 0x06, 0xe2, 0xc8, 0x15, 0x3c, 0x16, 0x3c, 0x72, 0x0f, 0x3e, 0xf9, 0x99, - 0x7b, 0xa2, 0x84, 0xd4, 0xdf, 0x7d, 0xbf, 0xa9, 0x7e, 0xef, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x70, 0x63, 0x8a, 0x47, 0x44, 0x06, 0x00, 0x00, + // 446 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4f, 0x6b, 0xd4, 0x40, + 0x14, 0xdf, 0x69, 0xbb, 0xd9, 0xf6, 0x75, 0xab, 0xe5, 0x35, 0x48, 0x58, 0x4b, 0x94, 0x39, 0x48, + 0x0f, 0x92, 0xa1, 0xf5, 0xaa, 0x20, 0xd2, 0xa3, 0x07, 0x1b, 0x6f, 0x9e, 0x4c, 0x33, 0x43, 0x1c, + 0xda, 0x9d, 0x49, 0x33, 0xc9, 0x62, 0x10, 0x2f, 0x7e, 0x02, 0x41, 0xfc, 0x4e, 0x1e, 0x0b, 0x5e, + 0x3c, 0xca, 0xae, 0x27, 0x3f, 0x85, 0x64, 0x66, 0x52, 0x77, 0x85, 0xba, 0x97, 0x65, 0xdf, 0xef, + 0xbd, 0xf7, 0xfb, 0xf3, 0x32, 0x80, 0x5c, 0x72, 0x36, 0x3b, 0x66, 0x57, 0x8d, 0xa8, 0xda, 0xa4, + 0xac, 0x74, 0xad, 0x31, 0xe0, 0x92, 0x27, 0xb3, 0xe3, 0x49, 0xe8, 0x7b, 0x85, 0x50, 0xc2, 0x48, + 0xe3, 0xba, 0x93, 0xc3, 0x42, 0xeb, 0xe2, 0x52, 0xb0, 0xac, 0x94, 0x2c, 0x53, 0x4a, 0xd7, 0x59, + 0x2d, 0xb5, 0xf2, 0x5d, 0xfa, 0x16, 0xc6, 0x67, 0x1d, 0x55, 0x2a, 0xae, 0x1a, 0x61, 0x6a, 0xdc, + 0x87, 0x4d, 0x2e, 0x79, 0x44, 0x1e, 0x92, 0xa3, 0x9d, 0xb4, 0xfb, 0x8b, 0xf7, 0x20, 0xd0, 0x95, + 0x2c, 0xa4, 0x8a, 0x36, 0x2c, 0xe8, 0xab, 0x6e, 0xf2, 0x42, 0xb4, 0xd1, 0xa6, 0x9b, 0xbc, 0x10, + 0x2d, 0x86, 0x30, 0xcc, 0x8c, 0x11, 0x75, 0xb4, 0x65, 0x31, 0x57, 0xd0, 0xaf, 0x04, 0xf6, 0xbc, + 0x84, 0x29, 0xb5, 0x32, 0x02, 0x23, 0x18, 0x99, 0x26, 0xcf, 0x85, 0x31, 0x56, 0x67, 0x3b, 0xed, + 0xcb, 0x8e, 0xc1, 0x06, 0xf3, 0x52, 0xae, 0xc0, 0xc7, 0xb0, 0xcd, 0x75, 0xde, 0x4c, 0x85, 0xaa, + 0xad, 0xdc, 0xee, 0xc9, 0x7e, 0xe2, 0x22, 0x27, 0xa7, 0x1e, 0x4f, 0x6f, 0x26, 0xf0, 0x11, 0x04, + 0x65, 0x56, 0x65, 0x53, 0x13, 0x0d, 0xed, 0xec, 0x9d, 0x7e, 0xf6, 0x95, 0x45, 0x53, 0xdf, 0xa5, + 0xcf, 0xe0, 0xc0, 0xda, 0xf2, 0x70, 0x6f, 0xee, 0xef, 0x3a, 0xf9, 0xef, 0xfa, 0x29, 0x84, 0x7d, + 0x2a, 0x7d, 0x39, 0x13, 0x37, 0xfb, 0xcb, 0x66, 0xc9, 0x3a, 0xb3, 0xf4, 0x01, 0xec, 0xbe, 0x6e, + 0x55, 0x7e, 0xeb, 0xf5, 0xe9, 0x11, 0x8c, 0xdd, 0xc0, 0xba, 0xdb, 0x9d, 0xfc, 0x26, 0x30, 0xb4, + 0x8e, 0xf0, 0x25, 0x04, 0xce, 0x2c, 0x86, 0xbd, 0xf4, 0xf2, 0x37, 0x9e, 0xdc, 0x5f, 0x41, 0x57, + 0xf3, 0xd3, 0xbb, 0x9f, 0xbe, 0xff, 0xfa, 0xb2, 0xb1, 0x83, 0x23, 0xe6, 0x82, 0xe2, 0x19, 0x8c, + 0x7c, 0xc6, 0x5b, 0xe8, 0x0e, 0xff, 0x41, 0x57, 0xee, 0x41, 0xd1, 0xf2, 0x8d, 0x11, 0x58, 0xf7, + 0x3a, 0x3f, 0x70, 0xc9, 0x3f, 0xe2, 0x73, 0xd8, 0xea, 0x42, 0xe1, 0x41, 0xbf, 0xb9, 0x74, 0x83, + 0x49, 0xb8, 0x0a, 0x7a, 0x9a, 0x3d, 0x4b, 0x33, 0xa2, 0x43, 0x66, 0x5a, 0x95, 0xbf, 0x78, 0xfa, + 0x6d, 0x1e, 0x93, 0xeb, 0x79, 0x4c, 0x7e, 0xce, 0x63, 0xf2, 0x79, 0x11, 0x0f, 0xae, 0x17, 0xf1, + 0xe0, 0xc7, 0x22, 0x1e, 0xbc, 0xa1, 0x85, 0xac, 0xdf, 0x35, 0xe7, 0x49, 0xae, 0xa7, 0x4c, 0x2b, + 0xa3, 0x55, 0xc5, 0xec, 0xcf, 0x7b, 0xab, 0x5f, 0xb7, 0xa5, 0x30, 0xe7, 0x81, 0x7d, 0xfb, 0x4f, + 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x31, 0x4b, 0x75, 0xe8, 0x4d, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -929,33 +405,10 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Params queries all parameters of the module. - RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - // Service returns associated ServiceInfo for a given Origin - // if the servie is not found, a fingerprint is generated to be used - // as a TXT record in DNS. v=sonr, o=origin, p=protocol - Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Accounts returns associated wallet accounts with the DID. - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) - // Credentials returns associated credentials with the DID and Service Origin. - Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) - // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) - // Service returns associated ServiceInfo for a given Origin - Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) } type queryClient struct { @@ -975,63 +428,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc return out, nil } -func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/ParamsAssets", in, out, opts...) -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { - out := new(QueryAccountsResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/Accounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/ParamsByAsset", in, out, opts...) -func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { - out := new(QueryCredentialsResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/Credentials", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/ParamsKeys", in, out, opts...) -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) ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/ParamsByKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/RegistrationOptionsByKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) -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 { @@ -1040,11 +437,9 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) -func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { - out := new(QueryServiceResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/Service", in, out, opts...) +func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Sync", in, out, opts...) if err != nil { return nil, err } @@ -1055,33 +450,10 @@ func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(context.Context, *QueryRequest) (*QueryResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - ParamsByKey(context.Context, *QueryRequest) (*QueryResponse, error) - // Params queries all parameters of the module. - RegistrationOptionsByKey(context.Context, *QueryRequest) (*QueryResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryRequest) (*QueryResponse, error) - // Service returns associated ServiceInfo for a given Origin - // if the servie is not found, a fingerprint is generated to be used - // as a TXT record in DNS. v=sonr, o=origin, p=protocol - Service(context.Context, *QueryRequest) (*QueryResponse, error) - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Accounts returns associated wallet accounts with the DID. - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) - // Credentials returns associated credentials with the DID and Service Origin. - Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) - // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) - // Service returns associated ServiceInfo for a given Origin - Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(context.Context, *SyncRequest) (*SyncResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1091,39 +463,11 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) ParamsAssets(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsAssets not implemented") -} -func (*UnimplementedQueryServer) ParamsByAsset(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByAsset not implemented") -} -func (*UnimplementedQueryServer) ParamsKeys(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsKeys not implemented") -} -func (*UnimplementedQueryServer) ParamsByKey(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByKey not implemented") -} -func (*UnimplementedQueryServer) RegistrationOptionsByKey(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegistrationOptionsByKey not implemented") -} -func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryRequest) (*QueryResponse, 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 *QueryRequest) (*QueryResponse, error) { -func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") -} -func (*UnimplementedQueryServer) Credentials(ctx context.Context, req *QueryCredentialsRequest) (*QueryCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented") -} -func (*UnimplementedQueryServer) Identities(ctx context.Context, req *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented") -} -func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") -} -func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryServiceRequest) (*QueryServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") +func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -1148,162 +492,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ParamsAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) -func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Accounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Accounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Credentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Credentials", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIdentitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Identities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Identities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryResolveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/ParamsAssets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsAssets(ctx, req.(*QueryRequest)) - return srv.(QueryServer).Resolve(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Resolve", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) -func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/ParamsByAsset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByAsset(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/ParamsKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsKeys(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/ParamsByKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByKey(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RegistrationOptionsByKey_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).RegistrationOptionsByKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/RegistrationOptionsByKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RegistrationOptionsByKey(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { @@ -1322,28 +510,20 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter 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(QueryRequest) +func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Service(ctx, in) + return srv.(QueryServer).Sync(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Query/Service", + FullMethod: "/did.v1.Query/Sync", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Service(ctx, req.(*QueryRequest)) - return srv.(QueryServer).Service(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Service", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest)) + return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) } return interceptor(ctx, in, info, handler) } @@ -1356,43 +536,13 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "ParamsAssets", - Handler: _Query_ParamsAssets_Handler, - }, - { - MethodName: "ParamsByAsset", - Handler: _Query_ParamsByAsset_Handler, - }, - { - MethodName: "ParamsKeys", - Handler: _Query_ParamsKeys_Handler, - }, - { - MethodName: "ParamsByKey", - Handler: _Query_ParamsByKey_Handler, - }, - { - MethodName: "RegistrationOptionsByKey", - Handler: _Query_RegistrationOptionsByKey_Handler, - MethodName: "Accounts", - Handler: _Query_Accounts_Handler, - }, - { - MethodName: "Credentials", - Handler: _Query_Credentials_Handler, - }, - { - MethodName: "Identities", - Handler: _Query_Identities_Handler, - }, { MethodName: "Resolve", Handler: _Query_Resolve_Handler, }, { - MethodName: "Service", - Handler: _Query_Service_Handler, + MethodName: "Sync", + Handler: _Query_Sync_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -1482,18 +632,6 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - 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] = 0x22 - } if m.Document != nil { { size, err := m.Document.MarshalToSizedBuffer(dAtA[:i]) @@ -1561,8 +699,7 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsAssetsResponse) Marshal() (dAtA []byte, err error) { -func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryResolveResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1572,354 +709,16 @@ func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsAssetsResponse) MarshalTo(dAtA []byte) (int, error) { -func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryResolveResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { -func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Assets) > 0 { - for iNdEx := len(m.Assets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Assets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - 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 *QueryParamsKeysResponse) Marshal() (dAtA []byte, err error) { -func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsKeysResponse) MarshalTo(dAtA []byte) (int, error) { -func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { -func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for k := range m.Keys { - v := m.Keys[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - 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 *QueryParamsByKeyResponse) 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 *QueryParamsByKeyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsByKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Key != nil { - { - size, err := m.Key.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 *QueryParamsByAssetResponse) Marshal() (dAtA []byte, err error) { -func (m *QueryCredentialsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCredentialsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x12 - } - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCredentialsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCredentialsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Credentials) > 0 { - for k := range m.Credentials { - v := m.Credentials[k] - baseI := i - if len(v) > 0 { - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintQuery(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintQuery(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryIdentitiesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryIdentitiesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIdentitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryIdentitiesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryIdentitiesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIdentitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationMethod) > 0 { - for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Exists { - i-- - if m.Exists { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryResolveRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsByAssetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsByAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Asset != nil { - { - size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - 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 *QueryRegistrationOptionsByKeyResponse) 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 *QueryRegistrationOptionsByKeyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRegistrationOptionsByKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RegistrationOptions) > 0 { - for iNdEx := len(m.RegistrationOptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RegistrationOptions[iNdEx]) - copy(dAtA[i:], m.RegistrationOptions[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RegistrationOptions[iNdEx]))) - i-- - dAtA[i] = 0xa - } if m.Document != nil { { size, err := m.Document.MarshalToSizedBuffer(dAtA[:i]) @@ -1935,7 +734,7 @@ func (m *QueryRegistrationOptionsByKeyResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } -func (m *QueryServiceRequest) Marshal() (dAtA []byte, err error) { +func (m *SyncRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1945,27 +744,27 @@ func (m *QueryServiceRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryServiceRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SyncRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SyncRequest) 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))) + 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 *QueryServiceResponse) Marshal() (dAtA []byte, err error) { +func (m *SyncResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1975,22 +774,25 @@ func (m *QueryServiceResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryServiceResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SyncResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = 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.Success { i-- - dAtA[i] = 0xa + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -2048,10 +850,6 @@ func (m *QueryResponse) Size() (n int) { l = m.Document.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovQuery(uint64(l)) - } if m.Params != nil { l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) @@ -2072,167 +870,12 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *QueryParamsAssetsResponse) Size() (n int) { -func (m *QueryAccountsRequest) Size() (n int) { +func (m *QueryResolveResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Assets) > 0 { - for _, e := range m.Assets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryParamsKeysResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for k, v := range m.Keys { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovQuery(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l - n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) - } - } - return n -} - -func (m *QueryParamsByKeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != nil { - l = m.Key.Size() - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsByAssetResponse) Size() (n int) { -func (m *QueryAccountsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Asset != nil { - l = m.Asset.Size() - if m.Exists { - n += 2 - } - return n -} - -func (m *QueryCredentialsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCredentialsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Credentials) > 0 { - for k, v := range m.Credentials { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovQuery(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l - n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) - } - } - return n -} - -func (m *QueryIdentitiesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryIdentitiesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Exists { - n += 2 - } - if len(m.VerificationMethod) > 0 { - for _, e := range m.VerificationMethod { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryResolveRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRegistrationOptionsByKeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.RegistrationOptions) > 0 { - for _, s := range m.RegistrationOptions { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } if m.Document != nil { l = m.Document.Size() n += 1 + l + sovQuery(uint64(l)) @@ -2240,28 +883,27 @@ func (m *QueryRegistrationOptionsByKeyResponse) Size() (n int) { return n } -func (m *QueryServiceRequest) Size() (n int) { +func (m *SyncRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Origin) + l = len(m.Did) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryServiceResponse) Size() (n int) { +func (m *SyncResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Options) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Success { + n += 2 } return n } @@ -2567,42 +1209,6 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: - 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 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 = &ServiceInfo{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) @@ -2746,8 +1352,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsAssetsResponse) Unmarshal(dAtA []byte) error { -func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2770,20 +1375,15 @@ func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsAssetsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryResolveResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsAssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - 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) + return fmt.Errorf("proto: QueryResolveResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2810,829 +1410,6 @@ func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Assets = append(m.Assets, &AssetInfo{}) - if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *QueryParamsKeysResponse) Unmarshal(dAtA []byte) error { -func (m *QueryAccountsResponse) 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: QueryParamsKeysResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) - return fmt.Errorf("proto: QueryAccountsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountsResponse: 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) - 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 *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCredentialsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCredentialsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCredentialsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCredentialsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCredentialsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Credentials == nil { - m.Credentials = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthQuery - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthQuery - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthQuery - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return ErrInvalidLengthQuery - } - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Credentials[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryIdentitiesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryIdentitiesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIdentitiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryIdentitiesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryIdentitiesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIdentitiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exists = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) - if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - 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 Keys", wireType) - return fmt.Errorf("proto: wrong wireType = %d for field Did", 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.Keys == nil { - m.Keys = make(map[string]*KeyInfo) - } - var mapkey string - var mapvalue *KeyInfo - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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 mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthQuery - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthQuery - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &KeyInfo{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } 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.Keys[mapkey] = mapvalue - 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 *QueryParamsByKeyResponse) 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: QueryParamsByKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsByKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key == nil { - m.Key = &KeyInfo{} - } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { if m.Document == nil { m.Document = &Document{} } @@ -3661,8 +1438,7 @@ func (m *QueryParamsByKeyResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsByAssetResponse) Unmarshal(dAtA []byte) error { -func (m *QueryServiceRequest) Unmarshal(dAtA []byte) error { +func (m *SyncRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3685,112 +1461,15 @@ func (m *QueryServiceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsByAssetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsByAssetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - 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) + return fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) - return fmt.Errorf("proto: wrong wireType = %d for field Origin", 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.Asset == nil { - m.Asset = &AssetInfo{} - } - if err := m.Asset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *QueryRegistrationOptionsByKeyResponse) Unmarshal(dAtA []byte) error { -func (m *QueryServiceResponse) 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: QueryRegistrationOptionsByKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRegistrationOptionsByKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - return fmt.Errorf("proto: QueryServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegistrationOptions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3818,7 +1497,7 @@ func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RegistrationOptions = append(m.RegistrationOptions, string(dAtA[iNdEx:postIndex])) + m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3841,6 +1520,76 @@ func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *SyncResponse) 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: SyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SyncResponse: 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) + 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/query.pb.gw.go b/x/did/types/query.pb.gw.go index 1c38f0316..4080b92e3 100644 --- a/x/did/types/query.pb.gw.go +++ b/x/did/types/query.pb.gw.go @@ -69,540 +69,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -var ( - filter_Query_ParamsAssets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ParamsAssets_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_ParamsAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ParamsAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) -func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := server.Accounts(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCredentialsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - msg, err := client.Credentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCredentialsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - msg, err := server.Credentials(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIdentitiesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := client.Identities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIdentitiesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := server.Identities(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := client.Resolve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ParamsAssets_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_ParamsAssets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ParamsAssets(ctx, &protoReq) -func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := server.Resolve(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ParamsByAsset_0 = &utilities.DoubleArray{Encoding: map[string]int{"asset": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRequest -func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryServiceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") - } - - protoReq.Asset, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", 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_ParamsByAsset_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ParamsByAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRequest -func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryServiceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["asset"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") - } - - protoReq.Asset, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", 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_ParamsByAsset_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ParamsByAsset(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ParamsKeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ParamsKeys_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_ParamsKeys_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ParamsKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ParamsKeys_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_ParamsKeys_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ParamsKeys(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ParamsByKey_0 = &utilities.DoubleArray{Encoding: map[string]int{"key": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_ParamsByKey_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 - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", 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_ParamsByKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ParamsByKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ParamsByKey_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 - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", 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_ParamsByKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ParamsByKey(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_RegistrationOptionsByKey_0 = &utilities.DoubleArray{Encoding: map[string]int{"key": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_RegistrationOptionsByKey_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 - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", 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_RegistrationOptionsByKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RegistrationOptionsByKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RegistrationOptionsByKey_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 - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", 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_RegistrationOptionsByKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.RegistrationOptionsByKey(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}} ) @@ -676,84 +142,37 @@ func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marsha } var ( - filter_Query_Service_0 = &utilities.DoubleArray{Encoding: map[string]int{"origin": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -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 QueryRequest +func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - 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 { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_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)) + msg, err := client.Sync(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 QueryRequest +func local_request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - 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 { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Sync_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - val, ok = pathParams["origin"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") - } - - protoReq.Origin, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) - } - - msg, err := server.Service(ctx, &protoReq) + msg, err := server.Sync(ctx, &protoReq) return msg, metadata, err } @@ -787,136 +206,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - 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_ParamsAssets_0(rctx, inboundMarshaler, server, req, pathParams) - resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ParamsAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - 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_ParamsByAsset_0(rctx, inboundMarshaler, server, req, pathParams) - resp, md, err := local_request_Query_Credentials_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ParamsByAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - 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_ParamsKeys_0(rctx, inboundMarshaler, server, req, pathParams) - resp, md, err := local_request_Query_Identities_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ParamsKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsByKey_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_ParamsByKey_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_ParamsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RegistrationOptionsByKey_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_RegistrationOptionsByKey_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_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - 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() @@ -940,7 +229,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -951,7 +240,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Service_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Sync_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 { @@ -959,7 +248,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1024,121 +313,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ParamsAssets_0(rctx, inboundMarshaler, client, req, pathParams) - resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ParamsAssets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - 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_ParamsByAsset_0(rctx, inboundMarshaler, client, req, pathParams) - resp, md, err := request_Query_Credentials_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ParamsByAsset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - 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_ParamsKeys_0(rctx, inboundMarshaler, client, req, pathParams) - 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_ParamsKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ParamsByKey_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_ParamsByKey_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_ParamsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RegistrationOptionsByKey_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_RegistrationOptionsByKey_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_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - 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() @@ -1159,7 +333,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Query_Sync_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) @@ -1168,14 +342,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Service_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Sync_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1185,49 +359,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ParamsAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"params", "assets"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ParamsByAsset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"params", "assets", "asset"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ParamsKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"params", "keys"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ParamsByKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"params", "keys", "key"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_RegistrationOptionsByKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"params", "keys", "key", "registration"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"service", "origin"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "accounts"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Credentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"did", "origin", "credentials"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Identities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "identities"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "resolve"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "service", "origin"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"sync"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_ParamsAssets_0 = runtime.ForwardResponseMessage - - forward_Query_ParamsByAsset_0 = runtime.ForwardResponseMessage - - forward_Query_ParamsKeys_0 = runtime.ForwardResponseMessage - - forward_Query_ParamsByKey_0 = runtime.ForwardResponseMessage - - forward_Query_RegistrationOptionsByKey_0 = runtime.ForwardResponseMessage - forward_Query_Accounts_0 = runtime.ForwardResponseMessage - - forward_Query_Credentials_0 = runtime.ForwardResponseMessage - - forward_Query_Identities_0 = runtime.ForwardResponseMessage - forward_Query_Resolve_0 = runtime.ForwardResponseMessage - forward_Query_Service_0 = runtime.ForwardResponseMessage + forward_Query_Sync_0 = runtime.ForwardResponseMessage ) diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 02b7eb7c7..2ae9ec672 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -23,46 +23,28 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Account represents a wallet account associated with a DID Controller -type Account struct { - // The unique identifier of the account +// Alias represents a DID alias +type Alias struct { + // The unique identifier of the alias Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the account - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The address of the account - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - // The label of the account - Label string `protobuf:"bytes,5,opt,name=label,proto3" json:"label,omitempty"` - // The bip32 chain code - ChainCode uint32 `protobuf:"varint,6,opt,name=chain_code,json=chainCode,proto3" json:"chain_code,omitempty"` - // The index of the account - Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` - // The supported chains of the account - Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"` - // Origin is the Alias provider - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Subject is the user defined alias - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - // Controller of the alias - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` - // Expiration of the alias - Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` + // The alias of the DID + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // Origin of the alias + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` } -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { +func (m *Alias) Reset() { *m = Alias{} } +func (m *Alias) String() string { return proto.CompactTextString(m) } +func (*Alias) ProtoMessage() {} +func (*Alias) Descriptor() ([]byte, []int) { return fileDescriptor_f44bb702879c34b4, []int{0} } -func (m *Account) XXX_Unmarshal(b []byte) error { +func (m *Alias) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Alias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) + return xxx_messageInfo_Alias.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -72,103 +54,59 @@ func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(m, src) +func (m *Alias) XXX_Merge(src proto.Message) { + xxx_messageInfo_Alias.Merge(m, src) } -func (m *Account) XXX_Size() int { +func (m *Alias) XXX_Size() int { return m.Size() } -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) +func (m *Alias) XXX_DiscardUnknown() { + xxx_messageInfo_Alias.DiscardUnknown(m) } -var xxx_messageInfo_Account proto.InternalMessageInfo +var xxx_messageInfo_Alias proto.InternalMessageInfo -func (m *Account) GetId() string { +func (m *Alias) GetId() string { if m != nil { return m.Id } return "" } -func (m *Account) GetController() string { -func (m *Aliases) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *Aliases) GetSubject() string { +func (m *Alias) GetSubject() string { if m != nil { return m.Subject } return "" } -func (m *Aliases) GetController() string { +func (m *Alias) GetOrigin() string { if m != nil { - return m.Controller + return m.Origin } return "" } -func (m *Account) GetPublicKey() *PubKey { - if m != nil { - return m.PublicKey - } - return nil -} - -func (m *Account) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Account) GetLabel() string { - if m != nil { - return m.Label - } - return "" -} - -func (m *Account) GetChainCode() uint32 { - if m != nil { - return m.ChainCode - } - return 0 -} - -func (m *Account) GetIndex() uint32 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *Account) GetChains() []string { - if m != nil { - return m.Chains - } - return nil -} - // Controller represents a Sonr DWN Vault type Controller struct { // The unique identifier of the controller 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"` + SonrAddress string `protobuf:"bytes,2,opt,name=sonr_address,json=sonrAddress,proto3" json:"sonr_address,omitempty"` + // The DID of the controller + EthAddress string `protobuf:"bytes,3,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` + // The DID of the controller + BtcAddress string `protobuf:"bytes,4,opt,name=btc_address,json=btcAddress,proto3" json:"btc_address,omitempty"` // Aliases of the controller - Aliases []*Alias `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` + Aliases []string `protobuf:"bytes,5,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"` + PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier - VaultCid string `protobuf:"bytes,5,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` + VaultCid string `protobuf:"bytes,7,opt,name=vault_cid,json=vaultCid,proto3" json:"vault_cid,omitempty"` // The Authentications of the controller - Authentication []*Credential `protobuf:"bytes,6,rep,name=authentication,proto3" json:"authentication,omitempty"` + Authentication []string `protobuf:"bytes,8,rep,name=authentication,proto3" json:"authentication,omitempty"` + // The Status of the claims for the controller + Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"` } func (m *Controller) Reset() { *m = Controller{} } @@ -211,14 +149,28 @@ func (m *Controller) GetId() string { return "" } -func (m *Controller) GetAddress() string { +func (m *Controller) GetSonrAddress() string { if m != nil { - return m.Address + return m.SonrAddress } return "" } -func (m *Controller) GetAliases() []*Alias { +func (m *Controller) GetEthAddress() string { + if m != nil { + return m.EthAddress + } + return "" +} + +func (m *Controller) GetBtcAddress() string { + if m != nil { + return m.BtcAddress + } + return "" +} + +func (m *Controller) GetAliases() []string { if m != nil { return m.Aliases } @@ -239,245 +191,50 @@ func (m *Controller) GetVaultCid() string { return "" } -func (m *Controller) GetAuthentication() []*Credential { +func (m *Controller) GetAuthentication() []string { if m != nil { return m.Authentication } return nil } -// Proof represents a verifiable credential -type Proof struct { - // The unique identifier of the proof - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The controller of the proof - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The value of the linked identifier - Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` - // The property of the proof - Property string `protobuf:"bytes,4,opt,name=property,proto3" json:"property,omitempty"` - // The accumulator of the proof - Accumulator []byte `protobuf:"bytes,5,opt,name=accumulator,proto3" json:"accumulator,omitempty"` - // The secret key of the proof - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *Proof) Reset() { *m = Proof{} } -func (m *Proof) String() string { return proto.CompactTextString(m) } -func (*Proof) ProtoMessage() {} -func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{2} -} -func (m *Proof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proof.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 *Proof) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proof.Merge(m, src) -} -func (m *Proof) XXX_Size() int { - return m.Size() -} -func (m *Proof) XXX_DiscardUnknown() { - xxx_messageInfo_Proof.DiscardUnknown(m) -} - -var xxx_messageInfo_Proof proto.InternalMessageInfo - -func (m *Proof) GetId() string { +func (m *Controller) GetStatus() string { if m != nil { - return m.Id + return m.Status } return "" } -func (m *Proof) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Proof) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" -} - -func (m *Proof) GetProperty() string { - if m != nil { - return m.Property - } - return "" -} - -func (m *Proof) GetAccumulator() []byte { - if m != nil { - return m.Accumulator - } - return nil -} - -func (m *Proof) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -// 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 authority DID of the service - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - // The domain name of the service - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,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,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,7,opt,name=permissions,proto3" json:"permissions,omitempty"` - // The controller DID of the service - ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` - // The domain name of the service - OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // The service endpoint - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Scopes is the Authorization Grants of the service - Scopes []PermissionScope `protobuf:"varint,6,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` -} - -func (m *ServiceRecord) Reset() { *m = ServiceRecord{} } -func (m *ServiceRecord) String() string { return proto.CompactTextString(m) } -func (*ServiceRecord) ProtoMessage() {} -func (*ServiceRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{3} -} -func (m *ServiceRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceRecord.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 *ServiceRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceRecord.Merge(m, src) -} -func (m *ServiceRecord) XXX_Size() int { - return m.Size() -} -func (m *ServiceRecord) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceRecord proto.InternalMessageInfo - -func (m *ServiceRecord) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ServiceRecord) GetServiceType() string { - if m != nil { - return m.ServiceType - } - return "" -} - -func (m *ServiceRecord) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *ServiceRecord) GetOrigin() string { -func (m *Service) GetControllerDid() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *ServiceRecord) GetDescription() string { - if m != nil { - return m.Description -func (m *Service) GetOriginUri() string { - if m != nil { - return m.OriginUri - } - return "" -} - -func (m *ServiceRecord) GetServiceEndpoints() map[string]string { -func (m *Service) GetServiceEndpoints() map[string]string { - if m != nil { - return m.ServiceEndpoints - } - return nil -} - -func (m *ServiceRecord) GetPermissions() *Permissions { - if m != nil { - return m.Permissions - } - return nil -} - // Verification reprsents a method of verifying membership in a DID -type VerificationMethod struct { +type Verification struct { // The unique identifier of the verification Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The controller of the verification Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The DIDNamespace of the verification - Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + DidMethod string `protobuf:"bytes,3,opt,name=did_method,json=didMethod,proto3" json:"did_method,omitempty"` // The value of the linked identifier Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` // The subject of the verification Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // The public key of the verification PublicKey *PubKey `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The Verification Type (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation) + VerificationType string `protobuf:"bytes,7,opt,name=verification_type,json=verificationType,proto3" json:"verification_type,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_f44bb702879c34b4, []int{4} +func (m *Verification) Reset() { *m = Verification{} } +func (m *Verification) String() string { return proto.CompactTextString(m) } +func (*Verification) ProtoMessage() {} +func (*Verification) Descriptor() ([]byte, []int) { + return fileDescriptor_f44bb702879c34b4, []int{2} } -func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { +func (m *Verification) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Verification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_VerificationMethod.Marshal(b, m, deterministic) + return xxx_messageInfo_Verification.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -487,184 +244,115 @@ func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *VerificationMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerificationMethod.Merge(m, src) +func (m *Verification) XXX_Merge(src proto.Message) { + xxx_messageInfo_Verification.Merge(m, src) } -func (m *VerificationMethod) XXX_Size() int { +func (m *Verification) XXX_Size() int { return m.Size() } -func (m *VerificationMethod) XXX_DiscardUnknown() { - xxx_messageInfo_VerificationMethod.DiscardUnknown(m) +func (m *Verification) XXX_DiscardUnknown() { + xxx_messageInfo_Verification.DiscardUnknown(m) } -var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo +var xxx_messageInfo_Verification proto.InternalMessageInfo -func (m *VerificationMethod) GetId() string { +func (m *Verification) GetId() string { if m != nil { return m.Id } return "" } -func (m *VerificationMethod) GetController() string { +func (m *Verification) GetController() string { if m != nil { return m.Controller } return "" } -func (m *VerificationMethod) GetMethod() DIDNamespace { +func (m *Verification) GetDidMethod() string { if m != nil { - return m.Method + return m.DidMethod } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return "" } -func (m *VerificationMethod) GetIssuer() string { +func (m *Verification) GetIssuer() string { if m != nil { return m.Issuer } return "" } -func (m *VerificationMethod) GetSubject() string { +func (m *Verification) GetSubject() string { if m != nil { return m.Subject } return "" } -func (m *VerificationMethod) GetPublicKey() *PubKey { +func (m *Verification) GetPublicKey() *PubKey { if m != nil { return m.PublicKey -func (m *Service) GetScopes() []PermissionScope { - if m != nil { - return m.Scopes } return nil } +func (m *Verification) GetVerificationType() string { + if m != nil { + return m.VerificationType + } + return "" +} + func init() { - proto.RegisterType((*Account)(nil), "did.v1.Account") + proto.RegisterType((*Alias)(nil), "did.v1.Alias") proto.RegisterType((*Controller)(nil), "did.v1.Controller") - proto.RegisterType((*Proof)(nil), "did.v1.Proof") - proto.RegisterType((*ServiceRecord)(nil), "did.v1.ServiceRecord") - proto.RegisterMapType((map[string]string)(nil), "did.v1.ServiceRecord.ServiceEndpointsEntry") - proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") - proto.RegisterType((*Delegation)(nil), "did.v1.Delegation") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Delegation.PublicKeyJwksEntry") - proto.RegisterType((*Service)(nil), "did.v1.Service") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry") + proto.RegisterType((*Verification)(nil), "did.v1.Verification") } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 828 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0xdb, 0x59, 0x67, 0xf3, 0xb2, 0xbb, 0x84, 0xe9, 0xb2, 0x8c, 0x52, 0x88, 0xdc, 0x1c, - 0x20, 0x82, 0x90, 0xb4, 0xcb, 0x1f, 0xa1, 0x88, 0x4b, 0x49, 0x7b, 0x40, 0x15, 0xa8, 0x32, 0x08, - 0x21, 0x24, 0xb4, 0x72, 0x66, 0xa6, 0xbb, 0x03, 0xb6, 0xc7, 0x9a, 0x19, 0x47, 0xf5, 0x67, 0x40, - 0x42, 0xdc, 0xb8, 0x71, 0xe4, 0xb3, 0x20, 0x4e, 0x45, 0x5c, 0x38, 0xa2, 0xdd, 0x6f, 0xc0, 0x27, - 0x40, 0x33, 0x1e, 0x27, 0xde, 0x50, 0xa9, 0xea, 0x25, 0xca, 0xfb, 0xbd, 0x37, 0xf3, 0xde, 0xef, - 0xf7, 0x7e, 0x23, 0x03, 0xa2, 0x9c, 0xce, 0xd7, 0xf7, 0xe6, 0x4a, 0x27, 0x9a, 0xcd, 0x0a, 0x29, - 0xb4, 0x40, 0x21, 0xe5, 0x74, 0xb6, 0xbe, 0x37, 0x7c, 0x9d, 0x08, 0x95, 0x09, 0x35, 0x17, 0x32, - 0x33, 0x25, 0x42, 0x66, 0x75, 0xc1, 0xf0, 0xc4, 0x1d, 0xba, 0x60, 0x39, 0x53, 0x5c, 0x39, 0xf4, - 0x96, 0x43, 0x33, 0x41, 0x59, 0xea, 0xc0, 0xf1, 0x1f, 0x3e, 0x74, 0xef, 0x13, 0x22, 0xca, 0x5c, - 0xa3, 0x63, 0xf0, 0x39, 0xc5, 0x5e, 0xe4, 0x4d, 0x7a, 0xb1, 0xcf, 0x29, 0x1a, 0x01, 0x10, 0x91, - 0x6b, 0x29, 0xd2, 0x94, 0x49, 0xec, 0x5b, 0xbc, 0x85, 0xa0, 0xf7, 0x00, 0x8a, 0x72, 0x95, 0x72, - 0x72, 0xfe, 0x03, 0xab, 0x70, 0x10, 0x79, 0x93, 0xfe, 0xd9, 0xf1, 0xac, 0x1e, 0x6e, 0xf6, 0xb8, - 0x5c, 0x3d, 0x62, 0x55, 0xdc, 0xab, 0x2b, 0x1e, 0xb1, 0x0a, 0x61, 0xe8, 0x26, 0x94, 0x4a, 0xa6, - 0x14, 0xee, 0xd8, 0xbb, 0x9a, 0x10, 0x9d, 0xc0, 0x7e, 0x9a, 0xac, 0x58, 0x8a, 0xf7, 0x2d, 0x5e, - 0x07, 0xe8, 0x4d, 0x00, 0x72, 0x99, 0xf0, 0xfc, 0x9c, 0x08, 0xca, 0x70, 0x18, 0x79, 0x93, 0xa3, - 0xb8, 0x67, 0x91, 0xa5, 0xa0, 0xcc, 0x1c, 0xe2, 0x39, 0x65, 0x4f, 0x71, 0xd7, 0x66, 0xea, 0x00, - 0x9d, 0x42, 0x68, 0x4b, 0x14, 0x3e, 0x88, 0x82, 0x49, 0x2f, 0x76, 0xd1, 0x82, 0xfc, 0xfb, 0xeb, - 0x5f, 0x3f, 0x05, 0xdf, 0x41, 0xc7, 0x70, 0x44, 0xa7, 0x30, 0xd8, 0xf2, 0x98, 0xda, 0x76, 0x03, - 0x0f, 0x7b, 0x08, 0x03, 0x6a, 0xe1, 0x6e, 0xbc, 0x81, 0x8f, 0x3d, 0x74, 0x07, 0x6e, 0xb7, 0x32, - 0xdb, 0xb9, 0xa6, 0xb6, 0xed, 0x20, 0xc0, 0x1e, 0xf6, 0xc6, 0xbf, 0xf8, 0x00, 0xcb, 0xad, 0x3e, - 0xbb, 0x7a, 0xb6, 0x04, 0xf0, 0x6f, 0x0a, 0xf0, 0x36, 0x74, 0x93, 0x94, 0x27, 0x8a, 0x29, 0x1c, - 0x44, 0xc1, 0xa4, 0x7f, 0x76, 0xd4, 0xc8, 0x78, 0xdf, 0xc0, 0x71, 0x93, 0xdd, 0x91, 0xbc, 0xf3, - 0x22, 0xc9, 0x6f, 0x43, 0x6f, 0x9d, 0x94, 0xa9, 0x3e, 0x27, 0x9c, 0x3a, 0x71, 0x0f, 0x2c, 0xb0, - 0xe4, 0x14, 0x2d, 0xe0, 0x38, 0x29, 0xf5, 0x25, 0xcb, 0x35, 0x27, 0x89, 0xe6, 0x22, 0xc7, 0xa1, - 0xed, 0x8d, 0x9a, 0xfb, 0x96, 0x92, 0x51, 0x93, 0x4d, 0xd2, 0x78, 0xa7, 0x72, 0x31, 0xb3, 0x72, - 0x4e, 0x9c, 0x9c, 0x47, 0x1b, 0x62, 0x56, 0xc5, 0x57, 0x5a, 0x5d, 0x8d, 0x78, 0xd8, 0x1f, 0xff, - 0xe9, 0xc1, 0xfe, 0x63, 0x29, 0xc4, 0x93, 0x97, 0x36, 0xd9, 0x29, 0x84, 0x5c, 0xa9, 0x92, 0x49, - 0x6b, 0xb0, 0x5e, 0xec, 0x22, 0x34, 0x84, 0x83, 0x42, 0x8a, 0x82, 0x49, 0x5d, 0x39, 0x3b, 0x6d, - 0x62, 0x14, 0x41, 0x3f, 0x21, 0xa4, 0xcc, 0xca, 0x34, 0xd1, 0x42, 0x5a, 0xe2, 0x87, 0x71, 0x1b, - 0x42, 0x03, 0x08, 0x8c, 0x80, 0xa1, 0xcd, 0x98, 0xbf, 0x8b, 0xbb, 0x96, 0xd1, 0x3b, 0x8e, 0x51, - 0x04, 0xc3, 0xd6, 0xba, 0xeb, 0x96, 0xd3, 0xe6, 0x7e, 0x43, 0x12, 0x77, 0xc6, 0xbf, 0x05, 0x70, - 0xf4, 0x25, 0x93, 0x6b, 0x4e, 0x58, 0xcc, 0x88, 0x90, 0xf4, 0x7f, 0xdc, 0xee, 0xc0, 0xa1, 0xaa, - 0x0b, 0xce, 0x75, 0x55, 0x30, 0xc7, 0xae, 0xef, 0xb0, 0xaf, 0xaa, 0x82, 0xa1, 0x37, 0xa0, 0x67, - 0xa4, 0x15, 0x92, 0xeb, 0xca, 0x31, 0xdc, 0x02, 0x86, 0xbc, 0x90, 0xfc, 0x82, 0xe7, 0x8e, 0xa2, - 0x8b, 0x0c, 0x41, 0xca, 0x14, 0x91, 0xbc, 0xb0, 0x7b, 0xab, 0x37, 0xdb, 0x86, 0xd0, 0x37, 0xf0, - 0x6a, 0xd3, 0x9a, 0xe5, 0xb4, 0x10, 0x3c, 0xd7, 0xca, 0xed, 0xf7, 0xdd, 0x66, 0xbf, 0x37, 0x86, - 0x6f, 0xa2, 0x87, 0x4d, 0xf5, 0xc3, 0x5c, 0xcb, 0x2a, 0x1e, 0xa8, 0x1d, 0x18, 0x7d, 0x08, 0xfd, - 0x82, 0xc9, 0x8c, 0x2b, 0xc5, 0x45, 0xae, 0xec, 0xeb, 0xeb, 0x9f, 0xdd, 0xda, 0x78, 0x70, 0x9b, - 0x8a, 0xdb, 0x75, 0xc3, 0x25, 0xbc, 0xf6, 0xdc, 0x0e, 0xcd, 0x2a, 0x6a, 0xd5, 0xcc, 0x5f, 0xf3, - 0xb2, 0xd7, 0x49, 0x5a, 0x36, 0x7a, 0xd5, 0xc1, 0xc2, 0xff, 0xd8, 0x5b, 0x7c, 0x60, 0x97, 0x34, - 0x73, 0x4b, 0x3a, 0x6c, 0xd4, 0xb1, 0xae, 0x3b, 0x85, 0xc1, 0x46, 0xb8, 0xa9, 0xc3, 0x8d, 0xf9, - 0x82, 0xf1, 0x8f, 0x3e, 0xa0, 0xaf, 0x99, 0xe4, 0x4f, 0x9c, 0x7b, 0x3f, 0x67, 0xfa, 0x52, 0xd0, - 0x97, 0x76, 0xe2, 0x14, 0xc2, 0xcc, 0x9e, 0xb4, 0x7b, 0x3a, 0x3e, 0x3b, 0x69, 0x38, 0x3f, 0xf8, - 0xec, 0xc1, 0x17, 0x49, 0xc6, 0x54, 0x91, 0x10, 0x16, 0xbb, 0x9a, 0x96, 0x6f, 0x3b, 0x37, 0x7c, - 0x8b, 0xa1, 0xab, 0xca, 0xd5, 0xf7, 0x8c, 0x68, 0xb7, 0xb6, 0x26, 0xdc, 0x79, 0xdb, 0xe1, 0x0b, - 0xde, 0xf6, 0xe2, 0x23, 0xab, 0xc5, 0x5d, 0xa7, 0xc5, 0x5b, 0x10, 0xb5, 0x0c, 0x5b, 0xcf, 0xd0, - 0xf8, 0xd6, 0x35, 0xb0, 0xb6, 0xdd, 0xff, 0xf4, 0x93, 0xdf, 0xaf, 0x46, 0xde, 0xb3, 0xab, 0x91, - 0xf7, 0xcf, 0xd5, 0xc8, 0xfb, 0xf9, 0x7a, 0xb4, 0xf7, 0xec, 0x7a, 0xb4, 0xf7, 0xf7, 0xf5, 0x68, - 0xef, 0xdb, 0xf1, 0x05, 0xd7, 0x97, 0xe5, 0x6a, 0x46, 0x44, 0x36, 0x17, 0xb9, 0x12, 0xb9, 0x9c, - 0xdb, 0x9f, 0xa7, 0x73, 0xf3, 0xe5, 0x30, 0x0e, 0x56, 0xab, 0xd0, 0x7e, 0x36, 0xde, 0xff, 0x2f, - 0x00, 0x00, 0xff, 0xff, 0x31, 0x1c, 0x51, 0xe6, 0x98, 0x06, 0x00, 0x00, - // 760 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbd, 0x6e, 0x2b, 0x45, - 0x14, 0xc7, 0xb3, 0x5e, 0x7f, 0x1e, 0x7f, 0x60, 0x46, 0x81, 0x2c, 0x46, 0x31, 0xc6, 0xe8, 0x4a, - 0xae, 0xbc, 0xdc, 0x4b, 0x83, 0x72, 0x29, 0x30, 0x49, 0x0a, 0x40, 0x91, 0x22, 0x07, 0x1a, 0x1a, - 0x6b, 0xbd, 0x33, 0x71, 0x26, 0xde, 0x9d, 0x59, 0xcd, 0xcc, 0x3a, 0xd9, 0x8e, 0x1e, 0x09, 0x51, - 0x50, 0xf3, 0x00, 0x34, 0xbc, 0x06, 0x65, 0x24, 0x1a, 0x0a, 0x0a, 0x94, 0xbc, 0x01, 0x4f, 0x80, - 0x76, 0x67, 0xd6, 0xde, 0xd8, 0x01, 0x84, 0x52, 0xd9, 0xf3, 0x3f, 0x67, 0xe6, 0xfc, 0xce, 0x7f, - 0x8e, 0x3d, 0x80, 0x30, 0xc5, 0xee, 0xea, 0xa5, 0x2b, 0x95, 0xa7, 0xc8, 0x38, 0x12, 0x5c, 0x71, - 0x54, 0xc5, 0x14, 0x8f, 0x57, 0x2f, 0x7b, 0x07, 0x3e, 0x97, 0x21, 0x97, 0x2e, 0x17, 0x61, 0x9a, - 0xc2, 0x45, 0xa8, 0x13, 0x7a, 0xfb, 0x66, 0xd3, 0x82, 0x30, 0x22, 0xa9, 0x34, 0x6a, 0x7e, 0x14, - 0x61, 0x71, 0x68, 0xb4, 0xe1, 0xcf, 0x16, 0xd4, 0x26, 0x01, 0xf5, 0x24, 0x91, 0xa8, 0x03, 0x25, - 0x8a, 0x1d, 0x6b, 0x60, 0x8d, 0x1a, 0xd3, 0x12, 0xc5, 0xe8, 0x6d, 0xa8, 0x72, 0x41, 0x17, 0x94, - 0x39, 0xa5, 0x4c, 0x33, 0x2b, 0xe4, 0x40, 0x4d, 0xc6, 0xf3, 0x6b, 0xe2, 0x2b, 0xc7, 0xce, 0x02, - 0xf9, 0x12, 0xf5, 0x01, 0x7c, 0xce, 0x94, 0xe0, 0x41, 0x40, 0x84, 0x53, 0xce, 0x82, 0x05, 0x25, - 0x8d, 0x93, 0xdb, 0x88, 0x0a, 0x4f, 0x51, 0xce, 0x9c, 0xca, 0xc0, 0x1a, 0x95, 0xa7, 0x05, 0xe5, - 0xe8, 0xf0, 0xaf, 0x9f, 0x7e, 0xfb, 0xde, 0x3e, 0x80, 0x72, 0x4a, 0x82, 0xda, 0xeb, 0x3a, 0x5d, - 0xcb, 0xb1, 0x1c, 0x6b, 0xf8, 0x6d, 0x09, 0x1a, 0x13, 0x29, 0x89, 0x48, 0x93, 0x77, 0x70, 0xdf, - 0x81, 0xfa, 0x92, 0x24, 0x33, 0x95, 0x44, 0xc4, 0x00, 0xd7, 0x96, 0x24, 0xf9, 0x2a, 0x89, 0x48, - 0xc6, 0x25, 0x08, 0x26, 0x4c, 0x51, 0x2f, 0xc8, 0xa0, 0x5b, 0xd3, 0x82, 0x82, 0x5e, 0x43, 0x3d, - 0x24, 0xca, 0xc3, 0x9e, 0xf2, 0x9c, 0xf2, 0xc0, 0x1e, 0x35, 0x5f, 0xbd, 0x37, 0xd6, 0x1e, 0x8f, - 0xd7, 0xf5, 0xc6, 0x67, 0x26, 0xe3, 0x94, 0x29, 0x91, 0x4c, 0xd7, 0x1b, 0xb6, 0x9a, 0xae, 0x6c, - 0x37, 0xdd, 0x7b, 0x0d, 0xed, 0x47, 0x5b, 0x51, 0x17, 0xec, 0x25, 0x49, 0x0c, 0x79, 0xfa, 0x15, - 0xed, 0x43, 0x65, 0xe5, 0x05, 0x71, 0xce, 0xad, 0x17, 0x47, 0xa5, 0x8f, 0xad, 0xa3, 0x4e, 0xe6, - 0x48, 0x5d, 0x3b, 0xe2, 0x94, 0x86, 0x3f, 0x5a, 0xd0, 0x9c, 0x28, 0x45, 0xd2, 0x71, 0xf8, 0x9f, - 0x26, 0xac, 0x8b, 0xd8, 0x85, 0x22, 0xa9, 0x1a, 0x09, 0xce, 0x2f, 0xcd, 0x6d, 0xe9, 0xc5, 0x7f, - 0xf5, 0xb4, 0x85, 0x65, 0x0f, 0x7f, 0xb1, 0x00, 0x8e, 0x37, 0xf7, 0xbc, 0x4d, 0xd5, 0x05, 0x1b, - 0xa7, 0xf8, 0xba, 0x63, 0x4c, 0x31, 0xfa, 0x10, 0xf6, 0xa3, 0x78, 0x1e, 0x50, 0x7f, 0x96, 0xe2, - 0x86, 0x71, 0xa0, 0xe8, 0xdc, 0x93, 0x39, 0x1b, 0xd2, 0xb1, 0x2f, 0x49, 0x72, 0x96, 0x47, 0xd0, - 0xbb, 0xd0, 0x58, 0x79, 0x71, 0xa0, 0x66, 0x3e, 0xc5, 0x06, 0xb6, 0x9e, 0x09, 0xc7, 0x14, 0xa3, - 0x01, 0x34, 0x2f, 0x29, 0x5b, 0x10, 0x11, 0x09, 0xca, 0x54, 0x06, 0xdc, 0x9a, 0x16, 0xa5, 0x2d, - 0xe2, 0xf2, 0xf0, 0x3b, 0x1b, 0xe0, 0x84, 0x04, 0x64, 0xf1, 0xb4, 0x8f, 0xbb, 0xc4, 0x87, 0x00, - 0xfe, 0x95, 0x47, 0x99, 0xf6, 0x56, 0x73, 0x36, 0x32, 0x25, 0x73, 0xf7, 0x03, 0x68, 0xeb, 0xb0, - 0x87, 0xb1, 0x20, 0x52, 0x1a, 0xc4, 0x56, 0x26, 0x4e, 0xb4, 0x86, 0x5e, 0x40, 0x67, 0x63, 0xe2, - 0x2c, 0x2d, 0xa0, 0xad, 0x6d, 0x6f, 0xd4, 0x93, 0x7f, 0x31, 0xa7, 0xfa, 0x8f, 0xe6, 0x9c, 0xc1, - 0x1b, 0x85, 0x1d, 0xd7, 0x37, 0x4b, 0xe9, 0xd4, 0xb2, 0x39, 0x7e, 0x91, 0xcf, 0xf1, 0xa6, 0xd7, - 0xf1, 0x79, 0xbe, 0xff, 0x8b, 0x9b, 0xa5, 0xd4, 0xd3, 0xdc, 0x8e, 0x8a, 0x9a, 0xe9, 0x95, 0x31, - 0x12, 0xcc, 0x28, 0x76, 0xea, 0xd9, 0xef, 0xb4, 0x61, 0x94, 0xcf, 0x71, 0xef, 0x53, 0x40, 0xbb, - 0x67, 0x3c, 0x63, 0xac, 0x2b, 0xc3, 0x3f, 0x4a, 0x50, 0xbb, 0x20, 0x62, 0x45, 0x7d, 0xb2, 0x73, - 0x15, 0xef, 0x43, 0x4b, 0xea, 0x50, 0x71, 0xac, 0x9b, 0x46, 0xcb, 0xcc, 0xdf, 0xf5, 0xd5, 0x7e, - 0xca, 0xd7, 0x43, 0x00, 0xfd, 0x17, 0x36, 0x8b, 0x05, 0x35, 0x17, 0xd4, 0xd0, 0xca, 0xd7, 0x82, - 0xa2, 0x29, 0xbc, 0x99, 0x17, 0x22, 0x0c, 0x47, 0x9c, 0x32, 0x25, 0x9d, 0xca, 0x63, 0x1b, 0x0d, - 0x64, 0xfe, 0x79, 0x9a, 0xe7, 0x69, 0x1b, 0xbb, 0x72, 0x4b, 0x46, 0x2e, 0x54, 0xa5, 0xcf, 0x23, - 0x22, 0x9d, 0xea, 0xc0, 0x1e, 0x75, 0x5e, 0x1d, 0xe4, 0x07, 0x9d, 0x13, 0x11, 0x52, 0x29, 0x29, - 0x67, 0x17, 0x69, 0x7c, 0x6a, 0xd2, 0x7a, 0xc7, 0xf0, 0xd6, 0x93, 0x67, 0x3f, 0xc3, 0xde, 0xea, - 0x67, 0x9f, 0xfc, 0x7a, 0xdf, 0xb7, 0xee, 0xee, 0xfb, 0xd6, 0x9f, 0xf7, 0x7d, 0xeb, 0x87, 0x87, - 0xfe, 0xde, 0xdd, 0x43, 0x7f, 0xef, 0xf7, 0x87, 0xfe, 0xde, 0x37, 0xc3, 0x05, 0x55, 0x57, 0xf1, - 0x7c, 0xec, 0xf3, 0xd0, 0xe5, 0x4c, 0x72, 0x26, 0xdc, 0xab, 0x1b, 0x2f, 0x71, 0x6f, 0xdd, 0xf4, - 0xb1, 0x48, 0xfd, 0x96, 0xf3, 0x6a, 0xf6, 0x54, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x54, 0xb1, 0xb7, 0x51, 0x8b, 0x06, 0x00, 0x00, + // 557 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0xed, 0xd8, 0x79, 0x34, 0x37, 0x55, 0x70, 0x47, 0x55, 0x19, 0x15, 0x30, 0x21, 0x42, 0x55, + 0x25, 0x42, 0xac, 0xc2, 0x2e, 0x62, 0x53, 0xba, 0xac, 0x90, 0x50, 0x85, 0x58, 0xb0, 0x89, 0x6c, + 0xcf, 0x90, 0x4c, 0x9b, 0x78, 0x82, 0x67, 0x1c, 0x91, 0x9f, 0x40, 0xac, 0x59, 0xf0, 0x3d, 0x2c, + 0x2b, 0xb1, 0x61, 0x83, 0x84, 0x92, 0x3f, 0xe0, 0x0b, 0xd0, 0x3c, 0x92, 0x38, 0xed, 0x8a, 0x8d, + 0xa5, 0x7b, 0xe6, 0x78, 0xce, 0xbd, 0xe7, 0xdc, 0x01, 0x4c, 0x39, 0x8d, 0x66, 0xa7, 0x91, 0x54, + 0xb1, 0x62, 0xbd, 0x69, 0x2e, 0x94, 0xc0, 0x35, 0xca, 0x69, 0x6f, 0x76, 0x7a, 0x74, 0x3f, 0x15, + 0x72, 0x22, 0x64, 0x24, 0xf2, 0x89, 0xa6, 0x88, 0x7c, 0x62, 0x09, 0x47, 0x07, 0xee, 0xa7, 0x21, + 0xcb, 0x98, 0xe4, 0xd2, 0xa2, 0x1d, 0x01, 0xd5, 0xb3, 0x31, 0x8f, 0x25, 0x6e, 0x81, 0xc7, 0x29, + 0x41, 0x6d, 0x74, 0xd2, 0xb8, 0xf4, 0x38, 0xc5, 0x04, 0xea, 0xb2, 0x48, 0xae, 0x58, 0xaa, 0x88, + 0x67, 0xc0, 0x55, 0x89, 0x0f, 0xa1, 0x26, 0x72, 0x3e, 0xe4, 0x19, 0xf1, 0xcd, 0x81, 0xab, 0xfa, + 0x4f, 0xff, 0x7e, 0xff, 0xf9, 0xc5, 0x0f, 0xa1, 0xa2, 0x6f, 0xc2, 0x07, 0xd0, 0x72, 0x3f, 0x74, + 0xed, 0x79, 0x80, 0x08, 0x22, 0xa8, 0xf3, 0xcd, 0x07, 0x38, 0x17, 0x99, 0xca, 0xc5, 0x78, 0xcc, + 0xf2, 0x3b, 0xb2, 0x4f, 0x60, 0x4f, 0x8a, 0x2c, 0x1f, 0xc4, 0x94, 0xe6, 0x4c, 0x4a, 0xa7, 0xdd, + 0xd4, 0xd8, 0x99, 0x85, 0xf0, 0x63, 0x68, 0x32, 0x35, 0x5a, 0x33, 0x6c, 0x13, 0xc0, 0xd4, 0xa8, + 0x44, 0x48, 0x54, 0xba, 0x26, 0x54, 0x2c, 0x21, 0x51, 0xe9, 0x8a, 0x40, 0xa0, 0x1e, 0xeb, 0xa1, + 0x99, 0x24, 0xd5, 0xb6, 0xaf, 0x67, 0x73, 0x25, 0x7e, 0x0e, 0x30, 0x2d, 0x92, 0x31, 0x4f, 0x07, + 0xd7, 0x6c, 0x4e, 0x6a, 0x6d, 0x74, 0xd2, 0x7c, 0xd1, 0xea, 0x59, 0x6b, 0x7b, 0x6f, 0x8b, 0xe4, + 0x82, 0xcd, 0x2f, 0x1b, 0x96, 0x71, 0xc1, 0xe6, 0xf8, 0x01, 0x34, 0x66, 0x71, 0x31, 0x56, 0x83, + 0x94, 0x53, 0x52, 0x37, 0x3a, 0xbb, 0x06, 0x38, 0xe7, 0x14, 0x1f, 0x43, 0x2b, 0x2e, 0xd4, 0x88, + 0x65, 0x8a, 0xa7, 0xb1, 0xe2, 0x22, 0x23, 0xbb, 0x46, 0xec, 0x16, 0xaa, 0xfd, 0xd4, 0x41, 0x16, + 0x92, 0x34, 0xac, 0x9f, 0xb6, 0xea, 0x7f, 0x32, 0x7e, 0x5e, 0x3b, 0x3f, 0xf1, 0xb6, 0x31, 0xda, + 0x4d, 0xbc, 0xbf, 0xe5, 0x44, 0xe0, 0x59, 0xa8, 0x34, 0x7b, 0xe0, 0x13, 0x84, 0xef, 0x95, 0x9a, + 0x0c, 0x2a, 0x04, 0xe1, 0x43, 0x08, 0xac, 0x44, 0x77, 0x83, 0x57, 0x09, 0x22, 0x5e, 0xe7, 0xb7, + 0x07, 0x7b, 0xef, 0x59, 0xce, 0x3f, 0xae, 0x7a, 0xbb, 0x1d, 0x4f, 0x08, 0x90, 0xae, 0xc3, 0x73, + 0xe1, 0x94, 0x10, 0xfc, 0x08, 0x80, 0x72, 0x3a, 0x98, 0x30, 0x35, 0x12, 0xd4, 0x45, 0xd3, 0xa0, + 0x9c, 0xbe, 0x31, 0x80, 0x1e, 0x95, 0x4b, 0x59, 0xb0, 0xdc, 0x85, 0xe2, 0xaa, 0xf2, 0xb2, 0x55, + 0xb7, 0x97, 0xed, 0x3f, 0x03, 0x79, 0x06, 0xfb, 0xb3, 0x52, 0xff, 0x03, 0x35, 0x9f, 0x32, 0x17, + 0x4c, 0x50, 0x3e, 0x78, 0x37, 0x9f, 0xb2, 0xfe, 0xd4, 0x18, 0x7c, 0xb5, 0x59, 0x58, 0xdb, 0x4d, + 0xd7, 0x69, 0x1b, 0x8b, 0x3b, 0xf0, 0x70, 0x33, 0x5e, 0x77, 0x33, 0x5b, 0xd7, 0x72, 0x8d, 0xe7, + 0xc7, 0xd0, 0xbe, 0x23, 0xba, 0xba, 0x64, 0xc5, 0xf3, 0x09, 0x22, 0x95, 0xd7, 0xaf, 0x7e, 0x2c, + 0x42, 0x74, 0xb3, 0x08, 0xd1, 0x9f, 0x45, 0x88, 0xbe, 0x2e, 0xc3, 0x9d, 0x9b, 0x65, 0xb8, 0xf3, + 0x6b, 0x19, 0xee, 0x7c, 0xe8, 0x0c, 0xb9, 0x1a, 0x15, 0x49, 0x2f, 0x15, 0x93, 0x48, 0x64, 0x3a, + 0xe9, 0xc8, 0x7c, 0x3e, 0x47, 0xfa, 0xd9, 0xea, 0x1b, 0x65, 0x52, 0x33, 0x4f, 0xf6, 0xe5, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x53, 0x80, 0x70, 0xff, 0x03, 0x00, 0x00, } -func (m *Account) Marshal() (dAtA []byte, err error) { +func (m *Alias) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -674,135 +362,27 @@ func (m *Account) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Account) MarshalTo(dAtA []byte) (int, error) { +func (m *Alias) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Alias) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Chains) > 0 { - for iNdEx := len(m.Chains) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Chains[iNdEx]) - copy(dAtA[i:], m.Chains[iNdEx]) - i = encodeVarintState(dAtA, i, uint64(len(m.Chains[iNdEx]))) - if m.Expiration != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Expiration)) - i-- - dAtA[i] = 0x28 - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x1a - } if len(m.Origin) > 0 { i -= len(m.Origin) copy(dAtA[i:], m.Origin) i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintState(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Assertion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Assertion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x2a - } - if len(m.Metadata) > 0 { - for k := range m.Metadata { - v := m.Metadata[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintState(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x42 - } - } - if m.Index != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x38 - } - if m.ChainCode != 0 { - i = encodeVarintState(dAtA, i, uint64(m.ChainCode)) - i-- - dAtA[i] = 0x30 - } - if len(m.Label) > 0 { - i -= len(m.Label) - copy(dAtA[i:], m.Label) - i = encodeVarintState(dAtA, i, uint64(len(m.Label))) - i-- - dAtA[i] = 0x2a - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintState(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x22 - } - if m.PublicKey != nil { - { - size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) + 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] = 0x12 } @@ -836,18 +416,20 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintState(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x4a + } 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 = encodeVarintState(dAtA, i, uint64(size)) - } + i -= len(m.Authentication[iNdEx]) + copy(dAtA[i:], m.Authentication[iNdEx]) + i = encodeVarintState(dAtA, i, uint64(len(m.Authentication[iNdEx]))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } } if len(m.VaultCid) > 0 { @@ -855,7 +437,7 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.VaultCid) i = encodeVarintState(dAtA, i, uint64(len(m.VaultCid))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } if m.PublicKey != nil { { @@ -867,91 +449,35 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintState(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } if len(m.Aliases) > 0 { for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Aliases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } + i -= len(m.Aliases[iNdEx]) + copy(dAtA[i:], m.Aliases[iNdEx]) + i = encodeVarintState(dAtA, i, uint64(len(m.Aliases[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a } } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintState(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintState(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Proof) 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 *Proof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintState(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x32 - } - if len(m.Accumulator) > 0 { - i -= len(m.Accumulator) - copy(dAtA[i:], m.Accumulator) - i = encodeVarintState(dAtA, i, uint64(len(m.Accumulator))) - i-- - dAtA[i] = 0x2a - } - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintState(dAtA, i, uint64(len(m.Property))) + if len(m.BtcAddress) > 0 { + i -= len(m.BtcAddress) + copy(dAtA[i:], m.BtcAddress) + i = encodeVarintState(dAtA, i, uint64(len(m.BtcAddress))) i-- dAtA[i] = 0x22 } - if len(m.Issuer) > 0 { - i -= len(m.Issuer) - copy(dAtA[i:], m.Issuer) - i = encodeVarintState(dAtA, i, uint64(len(m.Issuer))) + if len(m.EthAddress) > 0 { + i -= len(m.EthAddress) + copy(dAtA[i:], m.EthAddress) + i = encodeVarintState(dAtA, i, uint64(len(m.EthAddress))) i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) + if len(m.SonrAddress) > 0 { + i -= len(m.SonrAddress) + copy(dAtA[i:], m.SonrAddress) + i = encodeVarintState(dAtA, i, uint64(len(m.SonrAddress))) i-- dAtA[i] = 0x12 } @@ -965,7 +491,7 @@ func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ServiceRecord) Marshal() (dAtA []byte, err error) { +func (m *Verification) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -975,105 +501,23 @@ func (m *ServiceRecord) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ServiceRecord) MarshalTo(dAtA []byte) (int, error) { +func (m *Verification) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Verification) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Permissions != nil { - { - size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintState(dAtA, i, uint64(size)) - } + if len(m.VerificationType) > 0 { + i -= len(m.VerificationType) + copy(dAtA[i:], m.VerificationType) + i = encodeVarintState(dAtA, i, uint64(len(m.VerificationType))) i-- dAtA[i] = 0x3a } - if len(m.ServiceEndpoints) > 0 { - for k := range m.ServiceEndpoints { - v := m.ServiceEndpoints[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintState(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintState(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintState(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 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.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintState(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0x1a - } - if len(m.ServiceType) > 0 { - i -= len(m.ServiceType) - copy(dAtA[i:], m.ServiceType) - i = encodeVarintState(dAtA, i, uint64(len(m.ServiceType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintState(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *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 m.PublicKey != nil { { size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) @@ -1100,58 +544,10 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.Method != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Method)) - i-- - dAtA[i] = 0x18 - if len(m.Scopes) > 0 { - dAtA2 := make([]byte, len(m.Scopes)*10) - var j1 int - for _, num := range m.Scopes { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintState(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x32 - } - if len(m.ServiceEndpoints) > 0 { - for k := range m.ServiceEndpoints { - v := m.ServiceEndpoints[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintState(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintState(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintState(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.OriginUri) > 0 { - i -= len(m.OriginUri) - copy(dAtA[i:], m.OriginUri) - i = encodeVarintState(dAtA, i, uint64(len(m.OriginUri))) - i-- - dAtA[i] = 0x22 - } - if len(m.ControllerDid) > 0 { - i -= len(m.ControllerDid) - copy(dAtA[i:], m.ControllerDid) - i = encodeVarintState(dAtA, i, uint64(len(m.ControllerDid))) + if len(m.DidMethod) > 0 { + i -= len(m.DidMethod) + copy(dAtA[i:], m.DidMethod) + i = encodeVarintState(dAtA, i, uint64(len(m.DidMethod))) i-- dAtA[i] = 0x1a } @@ -1183,7 +579,7 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Account) Size() (n int) { +func (m *Alias) Size() (n int) { if m == nil { return 0 } @@ -1193,42 +589,14 @@ func (m *Account) Size() (n int) { 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)) } - l = len(m.Controller) + l = len(m.Origin) if l > 0 { n += 1 + l + sovState(uint64(l)) } - if m.PublicKey != nil { - l = m.PublicKey.Size() - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Label) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.ChainCode != 0 { - n += 1 + sovState(uint64(m.ChainCode)) - } - if m.Index != 0 { - n += 1 + sovState(uint64(m.Index)) - } - if len(m.Chains) > 0 { - for _, s := range m.Chains { - l = len(s) - n += 1 + l + sovState(uint64(l)) - } - } return n } @@ -1242,13 +610,21 @@ func (m *Controller) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Address) + l = len(m.SonrAddress) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.EthAddress) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.BtcAddress) if l > 0 { n += 1 + l + sovState(uint64(l)) } if len(m.Aliases) > 0 { - for _, e := range m.Aliases { - l = e.Size() + for _, s := range m.Aliases { + l = len(s) n += 1 + l + sovState(uint64(l)) } } @@ -1261,15 +637,19 @@ func (m *Controller) Size() (n int) { n += 1 + l + sovState(uint64(l)) } if len(m.Authentication) > 0 { - for _, e := range m.Authentication { - l = e.Size() + for _, s := range m.Authentication { + l = len(s) n += 1 + l + sovState(uint64(l)) } } + l = len(m.Status) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } return n } -func (m *Proof) Size() (n int) { +func (m *Verification) Size() (n int) { if m == nil { return 0 } @@ -1283,88 +663,10 @@ func (m *Proof) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Issuer) + l = len(m.DidMethod) if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Property) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Accumulator) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - return n -} - -func (m *ServiceRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.ServiceType) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Authority) - 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.Description) - l = len(m.ControllerDid) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.OriginUri) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if len(m.ServiceEndpoints) > 0 { - for k, v := range m.ServiceEndpoints { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) - n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) - } - } - if m.Permissions != nil { - l = m.Permissions.Size() - n += 1 + l + sovState(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 + sovState(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.Method != 0 { - n += 1 + sovState(uint64(m.Method)) - } l = len(m.Issuer) if l > 0 { n += 1 + l + sovState(uint64(l)) @@ -1376,12 +678,10 @@ func (m *VerificationMethod) Size() (n int) { if m.PublicKey != nil { l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) - if len(m.Scopes) > 0 { - l = 0 - for _, e := range m.Scopes { - l += sovState(uint64(e)) - } - n += 1 + sovState(uint64(l)) + l + } + l = len(m.VerificationType) + if l > 0 { + n += 1 + l + sovState(uint64(l)) } return n } @@ -1392,7 +692,7 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Account) Unmarshal(dAtA []byte) error { +func (m *Alias) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1415,10 +715,10 @@ func (m *Account) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Account: wiretype end group for non-group") + return fmt.Errorf("proto: Alias: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Alias: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1454,38 +754,6 @@ func (m *Account) Unmarshal(dAtA []byte) error { m.Id = 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 ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } @@ -1517,77 +785,9 @@ func (m *Account) Unmarshal(dAtA []byte) error { } m.Subject = 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 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.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { - m.PublicKey = &PubKey{} - } - if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1615,109 +815,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Label", 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.Label = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainCode", wireType) - } - m.ChainCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainCode |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chains", 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.Chains = append(m.Chains, string(dAtA[iNdEx:postIndex])) + m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1803,7 +901,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SonrAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1831,13 +929,13 @@ func (m *Controller) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.SonrAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1847,27 +945,89 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aliases = append(m.Aliases, &Alias{}) - if err := m.Aliases[len(m.Aliases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.EthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BtcAddress", 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.BtcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } @@ -1903,7 +1063,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VaultCid", wireType) } @@ -1935,11 +1095,11 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } m.VaultCid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1949,25 +1109,55 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthState } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthState } if postIndex > l { return io.ErrUnexpectedEOF } - m.Authentication = append(m.Authentication, &Credential{}) - if err := m.Authentication[len(m.Authentication)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1990,7 +1180,7 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } return nil } -func (m *Proof) Unmarshal(dAtA []byte) error { +func (m *Verification) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2013,10 +1203,10 @@ func (m *Proof) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Proof: wiretype end group for non-group") + return fmt.Errorf("proto: Verification: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Verification: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2085,7 +1275,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DidMethod", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2113,619 +1303,11 @@ func (m *Proof) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Issuer = string(dAtA[iNdEx:postIndex]) + m.DidMethod = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) - if m.Accumulator == nil { - m.Accumulator = []byte{} - } - iNdEx = postIndex - case 6: - 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 ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceRecord) 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 ErrIntOverflowState - } - 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: ServiceRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceRecord: 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 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceType", 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.ServiceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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.Authority = 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 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 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ServiceEndpoints == nil { - m.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthState - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthState - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 7: - 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 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.Permissions == nil { - m.Permissions = &Permissions{} - } - if err := m.Permissions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - 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 ErrIntOverflowState - } - 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 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.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 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.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 ErrIntOverflowState - } - 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 Issuer", wireType) - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2823,9 +1405,9 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerificationType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2853,204 +1435,8 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginUri = string(dAtA[iNdEx:postIndex]) + m.VerificationType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ServiceEndpoints == nil { - m.ServiceEndpoints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthState - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthState - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ServiceEndpoints[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scopes = append(m.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Scopes) == 0 { - m.Scopes = make([]PermissionScope, 0, elementCount) - } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scopes = append(m.Scopes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 4fc9aadf0..166e19f8c 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -30,6 +30,514 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// 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"` + // subject is a unique human-defined identifier to associate with the vault. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` +} + +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{0} +} +func (m *MsgAllocateVault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAllocateVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAllocateVault.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 *MsgAllocateVault) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateVault.Merge(m, src) +} +func (m *MsgAllocateVault) XXX_Size() int { + return m.Size() +} +func (m *MsgAllocateVault) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateVault.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAllocateVault proto.InternalMessageInfo + +func (m *MsgAllocateVault) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgAllocateVault) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *MsgAllocateVault) 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"` + // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + // IsLocalhost is a flag to indicate if the vault is localhost + Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` +} + +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{1} +} +func (m *MsgAllocateVaultResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAllocateVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAllocateVaultResponse.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 *MsgAllocateVaultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateVaultResponse.Merge(m, src) +} +func (m *MsgAllocateVaultResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAllocateVaultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateVaultResponse.DiscardUnknown(m) +} + +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 +} + +func (m *MsgAllocateVaultResponse) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *MsgAllocateVaultResponse) GetLocalhost() bool { + if m != nil { + return m.Localhost + } + return false +} + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } +func (m *MsgRegisterController) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterController) ProtoMessage() {} +func (*MsgRegisterController) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{2} +} +func (m *MsgRegisterController) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterController.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterController) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterController.Merge(m, src) +} +func (m *MsgRegisterController) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterController) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterController.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterController proto.InternalMessageInfo + +func (m *MsgRegisterController) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterController) GetAssertions() [][]byte { + if m != nil { + return m.Assertions + } + return nil +} + +func (m *MsgRegisterController) GetKeyshares() [][]byte { + if m != nil { + return m.Keyshares + } + return nil +} + +func (m *MsgRegisterController) GetVerifications() [][]byte { + if m != nil { + return m.Verifications + } + return nil +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { + // 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,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,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{} } +func (m *MsgRegisterControllerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterControllerResponse) ProtoMessage() {} +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{3} +} +func (m *MsgRegisterControllerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterControllerResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterControllerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterControllerResponse.Merge(m, src) +} +func (m *MsgRegisterControllerResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterControllerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterControllerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterControllerResponse proto.InternalMessageInfo + +func (m *MsgRegisterControllerResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgRegisterControllerResponse) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if m != nil { + return m.Accounts + } + return nil +} + +// MsgAuthorizeService is the message type for the AuthorizeService RPC. +type MsgAuthorizeService struct { + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + // Permissions is the scope of the service. + Permissions map[string]string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // token is the macron token to authenticate the operation. + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *MsgAuthorizeService) Reset() { *m = MsgAuthorizeService{} } +func (m *MsgAuthorizeService) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeService) ProtoMessage() {} +func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{4} +} +func (m *MsgAuthorizeService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorizeService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorizeService.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 *MsgAuthorizeService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeService.Merge(m, src) +} +func (m *MsgAuthorizeService) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorizeService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeService.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorizeService proto.InternalMessageInfo + +func (m *MsgAuthorizeService) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgAuthorizeService) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *MsgAuthorizeService) GetPermissions() map[string]string { + if m != nil { + return m.Permissions + } + return nil +} + +func (m *MsgAuthorizeService) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. +type MsgAuthorizeServiceResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *MsgAuthorizeServiceResponse) Reset() { *m = MsgAuthorizeServiceResponse{} } +func (m *MsgAuthorizeServiceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeServiceResponse) ProtoMessage() {} +func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{5} +} +func (m *MsgAuthorizeServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorizeServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorizeServiceResponse.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 *MsgAuthorizeServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeServiceResponse.Merge(m, src) +} +func (m *MsgAuthorizeServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorizeServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorizeServiceResponse proto.InternalMessageInfo + +func (m *MsgAuthorizeServiceResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgAuthorizeServiceResponse) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + // authority is the address of the governance account. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. + Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,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{6} +} +func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterService.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterService.Merge(m, src) +} +func (m *MsgRegisterService) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterService.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterService proto.InternalMessageInfo + +func (m *MsgRegisterService) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgRegisterService) GetService() *Service { + if m != nil { + return m.Service + } + 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"` + 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{7} +} +func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterServiceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterServiceResponse.Merge(m, src) +} +func (m *MsgRegisterServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterServiceResponse proto.InternalMessageInfo + +func (m *MsgRegisterServiceResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgRegisterServiceResponse) GetDid() string { + if m != nil { + return m.Did + } + return "" +} + // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 @@ -46,7 +554,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{0} + return fileDescriptor_d73284df019ff211, []int{8} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +615,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{1} + return fileDescriptor_d73284df019ff211, []int{9} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,1092 +644,76 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// 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"` - // subject is a unique human-defined identifier to associate with the vault. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` -} - -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 *MsgAllocateVault) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAllocateVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAllocateVault.Marshal(b, m, deterministic) -// MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticate struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Controller is the address of the controller to authenticate. - 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"` -} - -func (m *MsgAuthenticate) Reset() { *m = MsgAuthenticate{} } -func (m *MsgAuthenticate) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticate) ProtoMessage() {} -func (*MsgAuthenticate) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{2} -} -func (m *MsgAuthenticate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAuthenticate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAuthenticate.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 *MsgAllocateVault) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAllocateVault.Merge(m, src) -} -func (m *MsgAllocateVault) XXX_Size() int { - return m.Size() -} -func (m *MsgAllocateVault) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAllocateVault.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAllocateVault proto.InternalMessageInfo - -func (m *MsgAllocateVault) GetAuthority() string { -func (m *MsgAuthenticate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticate.Merge(m, src) -} -func (m *MsgAuthenticate) XXX_Size() int { - return m.Size() -} -func (m *MsgAuthenticate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticate.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAuthenticate proto.InternalMessageInfo - -func (m *MsgAuthenticate) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgAllocateVault) GetSubject() string { - if m != nil { - return m.Subject -func (m *MsgAuthenticate) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *MsgAllocateVault) GetOrigin() string { -func (m *MsgAuthenticate) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -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"` - // RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn - RegistrationOptions string `protobuf:"bytes,3,opt,name=registration_options,json=registrationOptions,proto3" json:"registration_options,omitempty"` - // IsLocalhost is a flag to indicate if the vault is localhost - Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"` -} - -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 *MsgAllocateVaultResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAllocateVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAllocateVaultResponse.Marshal(b, m, deterministic) -// 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) { - return fileDescriptor_d73284df019ff211, []int{3} -} -func (m *MsgAuthenticateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAuthenticateResponse.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 *MsgAllocateVaultResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAllocateVaultResponse.Merge(m, src) -} -func (m *MsgAllocateVaultResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAllocateVaultResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAllocateVaultResponse.DiscardUnknown(m) -} - -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 -} - -func (m *MsgAllocateVaultResponse) GetRegistrationOptions() string { - if m != nil { - return m.RegistrationOptions - } - return "" -} - -func (m *MsgAllocateVaultResponse) GetLocalhost() bool { - if m != nil { - return m.Localhost - } - return false -} -func (m *MsgAuthenticateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateResponse.Merge(m, src) -} -func (m *MsgAuthenticateResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAuthenticateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAuthenticateResponse proto.InternalMessageInfo - -// MsgProveWitness is the message type for the ProveWitness RPC. -type MsgProveWitness struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // property is key to prove. - Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` - // Witness Value is the bytes of the witness. - Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` -} - -func (m *MsgProveWitness) Reset() { *m = MsgProveWitness{} } -func (m *MsgProveWitness) String() string { return proto.CompactTextString(m) } -func (*MsgProveWitness) ProtoMessage() {} -func (*MsgProveWitness) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{4} -} -func (m *MsgProveWitness) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgProveWitness) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgProveWitness.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgProveWitness) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgProveWitness.Merge(m, src) -} -func (m *MsgProveWitness) XXX_Size() int { - return m.Size() -} -func (m *MsgProveWitness) XXX_DiscardUnknown() { - xxx_messageInfo_MsgProveWitness.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgProveWitness proto.InternalMessageInfo - -func (m *MsgProveWitness) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgProveWitness) GetProperty() string { - if m != nil { - return m.Property - } - return "" -} - -func (m *MsgProveWitness) GetWitness() []byte { - if m != nil { - return m.Witness - } - return nil -} - -func (m *MsgProveWitness) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -// MsgProveWitnessResponse is the response type for the ProveWitness RPC. -type MsgProveWitnessResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` -} - -func (m *MsgProveWitnessResponse) Reset() { *m = MsgProveWitnessResponse{} } -func (m *MsgProveWitnessResponse) String() string { return proto.CompactTextString(m) } -func (*MsgProveWitnessResponse) ProtoMessage() {} -func (*MsgProveWitnessResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{5} -} -func (m *MsgProveWitnessResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgProveWitnessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgProveWitnessResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgProveWitnessResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgProveWitnessResponse.Merge(m, src) -} -func (m *MsgProveWitnessResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgProveWitnessResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgProveWitnessResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgProveWitnessResponse proto.InternalMessageInfo - -func (m *MsgProveWitnessResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *MsgProveWitnessResponse) GetProperty() string { - if m != nil { - return m.Property - } - return "" -} - -// MsgSyncController is the message type for the SyncController RPC. -type MsgSyncController struct { - // controller is the address of the controller to sync. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Token is the public token to authenticate the operation. - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` -} - -func (m *MsgSyncController) Reset() { *m = MsgSyncController{} } -func (m *MsgSyncController) String() string { return proto.CompactTextString(m) } -func (*MsgSyncController) ProtoMessage() {} -func (*MsgSyncController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{6} -} -func (m *MsgSyncController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSyncController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSyncController.Marshal(b, m, deterministic) -// MsgSyncVault is the message type for the SyncVault RPC. -type MsgSyncVault struct { - // controller is the address of the controller to sync. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // cid is the IPFS content identifier. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Macroon is the public token to authenticate the operation. - Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` -} - -func (m *MsgSyncVault) Reset() { *m = MsgSyncVault{} } -func (m *MsgSyncVault) String() string { return proto.CompactTextString(m) } -func (*MsgSyncVault) ProtoMessage() {} -func (*MsgSyncVault) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{6} -} -func (m *MsgSyncVault) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSyncVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSyncVault.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSyncController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncController.Merge(m, src) -} -func (m *MsgSyncController) XXX_Size() int { - return m.Size() -} -func (m *MsgSyncController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncController.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSyncController proto.InternalMessageInfo - -func (m *MsgSyncController) GetController() string { -func (m *MsgSyncVault) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncVault.Merge(m, src) -} -func (m *MsgSyncVault) XXX_Size() int { - return m.Size() -} -func (m *MsgSyncVault) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncVault.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSyncVault proto.InternalMessageInfo - -func (m *MsgSyncVault) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *MsgSyncController) GetToken() string { - if m != nil { - return m.Token -func (m *MsgSyncVault) GetCid() string { - if m != nil { - return m.Cid - } - return "" -} - -// MsgSyncControllerResponse is the response type for the SyncController RPC. -type MsgSyncControllerResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *MsgSyncControllerResponse) Reset() { *m = MsgSyncControllerResponse{} } -func (m *MsgSyncControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSyncControllerResponse) ProtoMessage() {} -func (*MsgSyncControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{7} -} -func (m *MsgSyncControllerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSyncControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSyncControllerResponse.Marshal(b, m, deterministic) -func (m *MsgSyncVault) GetMacron() []byte { - if m != nil { - return m.Macron - } - return nil -} - -// MsgSyncVaultResponse is the response type for the SyncVault RPC. -type MsgSyncVaultResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *MsgSyncVaultResponse) Reset() { *m = MsgSyncVaultResponse{} } -func (m *MsgSyncVaultResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSyncVaultResponse) ProtoMessage() {} -func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{7} -} -func (m *MsgSyncVaultResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSyncVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSyncVaultResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSyncControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncControllerResponse.Merge(m, src) -} -func (m *MsgSyncControllerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSyncControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncControllerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSyncControllerResponse proto.InternalMessageInfo - -func (m *MsgSyncControllerResponse) GetSuccess() bool { -func (m *MsgSyncVaultResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSyncVaultResponse.Merge(m, src) -} -func (m *MsgSyncVaultResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSyncVaultResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSyncVaultResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSyncVaultResponse proto.InternalMessageInfo - -func (m *MsgSyncVaultResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -// MsgRegisterController is the message type for the InitializeController RPC. -type MsgRegisterController struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,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. - CredentialCreationResponse string `protobuf:"bytes,4,opt,name=credential_creation_response,json=credentialCreationResponse,proto3" json:"credential_creation_response,omitempty"` - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } -func (m *MsgRegisterController) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterController) ProtoMessage() {} -func (*MsgRegisterController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{8} -} -func (m *MsgRegisterController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterController.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterController.Merge(m, src) -} -func (m *MsgRegisterController) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterController.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterController proto.InternalMessageInfo - -func (m *MsgRegisterController) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgRegisterController) GetCid() string { - if m != nil { - return m.Cid - } - return "" -} - -func (m *MsgRegisterController) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *MsgRegisterController) GetCredentialCreationResponse() string { - if m != nil { - return m.CredentialCreationResponse - } - return "" -func (m *MsgRegisterController) GetAssertions() [][]byte { - if m != nil { - return m.Assertions - } - return nil -} - -func (m *MsgRegisterController) GetKeyshares() [][]byte { - if m != nil { - return m.Keyshares - } - return nil -} - -func (m *MsgRegisterController) GetVerifications() [][]byte { - if m != nil { - return m.Verifications - } - return nil -} - -// MsgRegisterControllerResponse is the response type for the InitializeController RPC. -type MsgRegisterControllerResponse struct { - // 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,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,3,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Accounts are a Address Map and Supported coin Denoms for the controller - Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MsgRegisterControllerResponse) Reset() { *m = MsgRegisterControllerResponse{} } -func (m *MsgRegisterControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterControllerResponse) ProtoMessage() {} -func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{9} -} -func (m *MsgRegisterControllerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterControllerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterControllerResponse.Merge(m, src) -} -func (m *MsgRegisterControllerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterControllerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterControllerResponse proto.InternalMessageInfo - -func (m *MsgRegisterControllerResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *MsgRegisterControllerResponse) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { - if m != nil { - return m.Accounts - } - return nil -} - -// MsgAuthorizeService is the message type for the AuthorizeService RPC. -type MsgAuthorizeService struct { - // Controller is the address of the controller to authenticate. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Permissions is the scope of the service. - Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` -} - -func (m *MsgAuthorizeService) Reset() { *m = MsgAuthorizeService{} } -func (m *MsgAuthorizeService) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorizeService) ProtoMessage() {} -func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{10} -} -func (m *MsgAuthorizeService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAuthorizeService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAuthorizeService.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 *MsgAuthorizeService) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorizeService.Merge(m, src) -} -func (m *MsgAuthorizeService) XXX_Size() int { - return m.Size() -} -func (m *MsgAuthorizeService) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorizeService.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAuthorizeService proto.InternalMessageInfo - -func (m *MsgAuthorizeService) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *MsgAuthorizeService) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *MsgAuthorizeService) GetScopes() *Permissions { - if m != nil { - return m.Scopes - } - return nil -} - -func (m *MsgAuthorizeService) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC. -type MsgAuthorizeServiceResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` -} - -func (m *MsgAuthorizeServiceResponse) Reset() { *m = MsgAuthorizeServiceResponse{} } -func (m *MsgAuthorizeServiceResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorizeServiceResponse) ProtoMessage() {} -func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{11} -} -func (m *MsgAuthorizeServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAuthorizeServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAuthorizeServiceResponse.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 *MsgAuthorizeServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorizeServiceResponse.Merge(m, src) -} -func (m *MsgAuthorizeServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAuthorizeServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorizeServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAuthorizeServiceResponse proto.InternalMessageInfo - -func (m *MsgAuthorizeServiceResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *MsgAuthorizeServiceResponse) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -// MsgRegisterService is the message type for the RegisterService RPC. -type MsgRegisterService struct { - // authority is the address of the governance account. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // origin is the origin of the request in wildcard form. Requires valid TXT record in DNS. - Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - // token is the macron token to authenticate the operation. - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` -// MsgRegisterService is the message type for the RegisterService RPC. -type MsgRegisterService struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // origin is the origin of the request in wildcard form. - OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // PermissionScope is the scope of the service. - Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` -} - -func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} } -func (m *MsgRegisterService) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterService) ProtoMessage() {} -func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{12} - return fileDescriptor_d73284df019ff211, []int{10} -} -func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterService.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterService) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterService.Merge(m, src) -} -func (m *MsgRegisterService) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterService) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterService.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterService proto.InternalMessageInfo - -func (m *MsgRegisterService) GetController() string { - if m != nil { - return m.Controller -func (m *MsgRegisterService) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgRegisterService) GetService() *Service { - if m != nil { - return m.Service -func (m *MsgRegisterService) GetOriginUri() string { - if m != nil { - return m.OriginUri - } - return "" -} - -func (m *MsgRegisterService) GetScopes() []PermissionScope { - if m != nil { - return m.Scopes - } - return nil -} - -func (m *MsgRegisterService) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -// MsgRegisterServiceResponse is the response type for the RegisterService RPC. -type MsgRegisterServiceResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` -// MsgRegisterServiceResponse is the response type for the RegisterService RPC. -type MsgRegisterServiceResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (m *MsgRegisterServiceResponse) Reset() { *m = MsgRegisterServiceResponse{} } -func (m *MsgRegisterServiceResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterServiceResponse) ProtoMessage() {} -func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{13} - return fileDescriptor_d73284df019ff211, []int{11} -} -func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterServiceResponse.Merge(m, src) -} -func (m *MsgRegisterServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterServiceResponse proto.InternalMessageInfo - -func (m *MsgRegisterServiceResponse) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (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((*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((*MsgSyncController)(nil), "did.v1.MsgSyncController") - proto.RegisterType((*MsgSyncControllerResponse)(nil), "did.v1.MsgSyncControllerResponse") 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((*MsgAuthorizeService)(nil), "did.v1.MsgAuthorizeService") + proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgAuthorizeService.PermissionsEntry") proto.RegisterType((*MsgAuthorizeServiceResponse)(nil), "did.v1.MsgAuthorizeServiceResponse") - proto.RegisterType((*MsgAuthenticate)(nil), "did.v1.MsgAuthenticate") - proto.RegisterType((*MsgAuthenticateResponse)(nil), "did.v1.MsgAuthenticateResponse") - proto.RegisterType((*MsgProveWitness)(nil), "did.v1.MsgProveWitness") - proto.RegisterType((*MsgProveWitnessResponse)(nil), "did.v1.MsgProveWitnessResponse") - proto.RegisterType((*MsgSyncVault)(nil), "did.v1.MsgSyncVault") - proto.RegisterType((*MsgSyncVaultResponse)(nil), "did.v1.MsgSyncVaultResponse") - proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController") - proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse") - proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry") proto.RegisterType((*MsgRegisterService)(nil), "did.v1.MsgRegisterService") proto.RegisterType((*MsgRegisterServiceResponse)(nil), "did.v1.MsgRegisterServiceResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "did.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "did.v1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 911 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0xdc, 0x44, - 0x18, 0x8e, 0x77, 0xd3, 0x6d, 0xf2, 0x26, 0xcd, 0x06, 0x27, 0x10, 0xc7, 0x6d, 0xb7, 0xa9, 0x11, - 0x52, 0x28, 0xb0, 0xab, 0xa4, 0x02, 0x55, 0x85, 0x03, 0x49, 0x85, 0x54, 0x09, 0x2d, 0x29, 0x0e, - 0x1f, 0x52, 0x2f, 0x91, 0x77, 0x3c, 0x72, 0x86, 0xf5, 0x7a, 0xac, 0x99, 0xd9, 0x25, 0xe6, 0x04, - 0x9c, 0x39, 0xf0, 0x07, 0x90, 0xb8, 0x70, 0xef, 0x81, 0x1b, 0x7f, 0xa0, 0x12, 0x97, 0x8a, 0x13, - 0x27, 0x84, 0x92, 0x43, 0xff, 0x02, 0x47, 0x34, 0x9e, 0xf1, 0xc7, 0x7e, 0x76, 0x9b, 0x5e, 0x76, - 0xfd, 0xce, 0xf3, 0xce, 0x33, 0xcf, 0x3b, 0xcf, 0x3b, 0x63, 0x43, 0xdd, 0x27, 0x7e, 0x6b, 0xb0, - 0xd7, 0x12, 0x67, 0xcd, 0x98, 0x51, 0x41, 0xcd, 0x9a, 0x4f, 0xfc, 0xe6, 0x60, 0xcf, 0xde, 0x42, - 0x94, 0xf7, 0x28, 0x6f, 0xf5, 0x78, 0x20, 0xf1, 0x1e, 0x0f, 0x54, 0x82, 0xbd, 0xad, 0x80, 0x93, - 0x34, 0x6a, 0xa9, 0x40, 0x43, 0x9b, 0x9a, 0x2c, 0xc0, 0x11, 0xe6, 0x24, 0x1b, 0xdd, 0xd0, 0xa3, - 0x3d, 0xea, 0xe3, 0x30, 0x4f, 0x0d, 0x68, 0x40, 0x15, 0x85, 0x7c, 0x52, 0xa3, 0xce, 0x2f, 0x06, - 0xd4, 0xdb, 0x3c, 0xf8, 0x32, 0xf6, 0x3d, 0x81, 0x1f, 0x79, 0xcc, 0xeb, 0x71, 0xf3, 0x03, 0x58, - 0xf6, 0xfa, 0xe2, 0x94, 0x32, 0x22, 0x12, 0xcb, 0xd8, 0x31, 0x76, 0x97, 0x0f, 0xad, 0xbf, 0x7e, - 0x7f, 0x6f, 0x53, 0xaf, 0x7c, 0xe0, 0xfb, 0x0c, 0x73, 0x7e, 0x2c, 0x18, 0x89, 0x02, 0xb7, 0x48, - 0x35, 0xdf, 0x85, 0x5a, 0x9c, 0x32, 0x58, 0x95, 0x1d, 0x63, 0x77, 0x65, 0x7f, 0xad, 0xa9, 0x2a, - 0x6b, 0x2a, 0xde, 0xc3, 0xc5, 0xa7, 0xff, 0xdc, 0x5a, 0x70, 0x75, 0x8e, 0xb9, 0x09, 0x57, 0x04, - 0xed, 0xe2, 0xc8, 0xaa, 0xca, 0x15, 0x5c, 0x15, 0xdc, 0x5f, 0xfb, 0xf1, 0xf9, 0x93, 0x3b, 0x05, - 0xa7, 0xb3, 0x0d, 0x5b, 0x23, 0xf2, 0x5c, 0xcc, 0x63, 0x1a, 0x71, 0xec, 0xfc, 0x64, 0xc0, 0x7a, - 0x9b, 0x07, 0x07, 0x61, 0x48, 0x91, 0x27, 0xf0, 0x57, 0x5e, 0x3f, 0x14, 0x97, 0xd6, 0x6e, 0xc1, - 0x55, 0xde, 0xef, 0x7c, 0x83, 0x91, 0x48, 0xc5, 0x2f, 0xbb, 0x59, 0x68, 0xbe, 0x01, 0x35, 0xca, - 0x48, 0x40, 0x32, 0xa1, 0x3a, 0x1a, 0x53, 0xfa, 0xab, 0x01, 0xd6, 0xa8, 0x9c, 0x4c, 0xab, 0xb9, - 0x0e, 0x55, 0x44, 0x7c, 0x25, 0xc8, 0x95, 0x8f, 0xe6, 0x6d, 0x58, 0xc5, 0x67, 0x31, 0x61, 0xc9, - 0x49, 0x27, 0xa4, 0xa8, 0x9b, 0xae, 0x5a, 0x75, 0x57, 0xd4, 0xd8, 0xa1, 0x1c, 0x32, 0xf7, 0x60, - 0x93, 0xe1, 0x80, 0x70, 0xc1, 0x3c, 0x41, 0x68, 0x74, 0x42, 0x63, 0xf9, 0xc7, 0xb5, 0x8e, 0x8d, - 0x32, 0x76, 0xa4, 0x20, 0xf3, 0x06, 0x2c, 0xcb, 0xe5, 0xc3, 0x53, 0xca, 0x85, 0xb5, 0xb8, 0x63, - 0xec, 0x2e, 0xb9, 0xc5, 0x80, 0xf3, 0x9b, 0x32, 0xfb, 0x11, 0xa3, 0x03, 0xfc, 0x35, 0x11, 0x11, - 0xe6, 0x97, 0x37, 0xdb, 0x86, 0xa5, 0x98, 0xd1, 0x18, 0x33, 0x91, 0xe8, 0x1d, 0xcb, 0x63, 0xb9, - 0x99, 0xdf, 0x2a, 0xfa, 0x54, 0xeb, 0xaa, 0x9b, 0x85, 0x85, 0xe9, 0x8b, 0xb3, 0x4c, 0x3f, 0x4a, - 0x4d, 0x2f, 0xcb, 0xcc, 0x37, 0x32, 0xf5, 0x09, 0x21, 0x49, 0x6d, 0xa4, 0xe5, 0x65, 0xe1, 0x2c, - 0x41, 0x8e, 0x80, 0xd7, 0xda, 0x3c, 0x38, 0x4e, 0x22, 0xf4, 0x80, 0x46, 0x82, 0xd1, 0x30, 0xc4, - 0xcc, 0xbc, 0x07, 0x80, 0xf2, 0xe8, 0x85, 0xa5, 0x97, 0x72, 0xa7, 0xb4, 0x6e, 0x5d, 0x56, 0x51, - 0x4a, 0x73, 0xde, 0x87, 0xed, 0xb1, 0x55, 0x5f, 0x5c, 0x88, 0xf3, 0xa7, 0x01, 0xaf, 0xb7, 0x79, - 0xe0, 0xa6, 0xf6, 0x62, 0x56, 0x52, 0x7c, 0x59, 0xaf, 0x74, 0xf7, 0x55, 0x8a, 0xee, 0x9b, 0xd2, - 0xd4, 0xe6, 0xc7, 0x70, 0x03, 0x31, 0xec, 0xe3, 0x48, 0x10, 0x2f, 0x3c, 0x41, 0x0c, 0xab, 0xce, - 0x63, 0x5a, 0xb5, 0xb6, 0xcd, 0x2e, 0x72, 0x1e, 0xe8, 0x94, 0xac, 0xae, 0x31, 0x2f, 0x7f, 0xa8, - 0xc0, 0xcd, 0x89, 0xd5, 0xcc, 0x61, 0xe9, 0xb0, 0x43, 0x95, 0x97, 0x70, 0xe8, 0x08, 0x96, 0x3c, - 0x84, 0x68, 0x3f, 0x12, 0xb2, 0x05, 0xab, 0xbb, 0x2b, 0xfb, 0x77, 0xb3, 0xcb, 0x68, 0xa6, 0x98, - 0xe6, 0x81, 0x9e, 0xf5, 0x49, 0x24, 0x58, 0xe2, 0xe6, 0x24, 0xf6, 0x87, 0x70, 0x6d, 0x08, 0x92, - 0x7b, 0xda, 0xc5, 0x49, 0x76, 0xa2, 0xbb, 0x38, 0x91, 0x5d, 0x31, 0xf0, 0xc2, 0x3e, 0xd6, 0xfb, - 0xac, 0x82, 0xfb, 0x95, 0x7b, 0x86, 0xf3, 0x87, 0x01, 0x1b, 0xf2, 0x6a, 0x50, 0x9b, 0xf2, 0x1d, - 0x3e, 0xc6, 0x6c, 0x40, 0x10, 0x7e, 0x85, 0x0e, 0x2c, 0xfc, 0xab, 0x0c, 0xf9, 0xf7, 0x0e, 0xd4, - 0x38, 0xa2, 0x31, 0x56, 0x07, 0x6f, 0x65, 0x7f, 0x23, 0xbf, 0x82, 0x31, 0xeb, 0x11, 0xce, 0xe5, - 0x25, 0xe1, 0xea, 0x94, 0x29, 0x87, 0x71, 0xac, 0x8d, 0xdb, 0x70, 0x7d, 0x82, 0xf8, 0x39, 0xec, - 0xcb, 0xf9, 0x2b, 0x25, 0x7e, 0x79, 0x4f, 0x9a, 0x25, 0x0f, 0x5e, 0x7d, 0x2f, 0xde, 0x86, 0xab, - 0x5c, 0x91, 0xe8, 0xf7, 0x4e, 0x3d, 0x2b, 0x3a, 0x93, 0x9a, 0xe1, 0xf3, 0x1e, 0xdc, 0x87, 0x60, - 0x8f, 0x2b, 0x9c, 0xa3, 0xe0, 0x75, 0xa8, 0xfa, 0xc5, 0x39, 0xf3, 0x89, 0xbf, 0xff, 0x5f, 0x15, - 0xaa, 0x6d, 0x1e, 0x98, 0x0f, 0x61, 0x75, 0xe8, 0x15, 0xbb, 0x55, 0xea, 0xc6, 0x32, 0x60, 0xdf, - 0x9a, 0x02, 0xe4, 0xab, 0x7f, 0x01, 0xeb, 0x63, 0x7d, 0x74, 0xbd, 0x34, 0x69, 0x14, 0xb4, 0xdf, - 0x9c, 0x01, 0xe6, 0xac, 0x9f, 0xc2, 0xb5, 0xe1, 0xf7, 0xa8, 0x55, 0x9e, 0x55, 0x46, 0xec, 0x9d, - 0x69, 0x48, 0x4e, 0xf6, 0x19, 0xac, 0x8d, 0x5c, 0xb5, 0xdb, 0xa5, 0x39, 0xc3, 0x90, 0x7d, 0x7b, - 0x2a, 0x94, 0xf3, 0x3d, 0x06, 0x73, 0xc2, 0x65, 0x78, 0x73, 0xe6, 0x81, 0xb6, 0xdf, 0x9a, 0xeb, - 0xbc, 0x9b, 0x9f, 0x43, 0x7d, 0xb4, 0x13, 0xed, 0x09, 0x33, 0xb3, 0xcd, 0x74, 0xa6, 0x63, 0x19, - 0xa5, 0x7d, 0xe5, 0xfb, 0xe7, 0x4f, 0xee, 0x18, 0x87, 0x1f, 0x3d, 0x3d, 0x6f, 0x18, 0xcf, 0xce, - 0x1b, 0xc6, 0xbf, 0xe7, 0x0d, 0xe3, 0xe7, 0x8b, 0xc6, 0xc2, 0xb3, 0x8b, 0xc6, 0xc2, 0xdf, 0x17, - 0x8d, 0x85, 0xc7, 0x4e, 0x40, 0xc4, 0x69, 0xbf, 0xd3, 0x44, 0xb4, 0xd7, 0xa2, 0x11, 0xa7, 0x11, - 0x6b, 0xa5, 0x3f, 0x67, 0x2d, 0xf9, 0xdd, 0x26, 0x92, 0x18, 0xf3, 0x4e, 0x2d, 0xfd, 0x3c, 0xbb, - 0xfb, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x48, 0x8a, 0xd6, 0x2e, 0x0a, 0x00, 0x00, - // 797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x37, 0xdd, 0x6c, 0xf3, 0x36, 0xdb, 0x20, 0x2b, 0x90, 0xac, 0xb5, 0xcd, 0x56, 0x16, - 0x48, 0x55, 0x05, 0x31, 0x4d, 0xa5, 0xaa, 0x2a, 0x48, 0xa8, 0x45, 0x48, 0xbd, 0x44, 0x2d, 0x8e, - 0x0a, 0x52, 0x2f, 0x95, 0x6b, 0x0f, 0xce, 0xa8, 0xf1, 0x8c, 0x35, 0x33, 0x4e, 0x9b, 0x1b, 0x82, - 0x03, 0x47, 0xf8, 0x21, 0x1c, 0x7a, 0xe0, 0x1f, 0x70, 0xe9, 0xb1, 0xe2, 0x84, 0x38, 0x00, 0x6a, - 0x0f, 0xfd, 0x1b, 0x68, 0x3c, 0x13, 0xc7, 0x69, 0xd2, 0x94, 0xcd, 0x6d, 0xde, 0xfb, 0xde, 0xfb, - 0xe6, 0x7d, 0x7e, 0x6f, 0x5e, 0x02, 0xd5, 0x00, 0x07, 0xce, 0x60, 0xd3, 0x11, 0x97, 0xad, 0x98, - 0x51, 0x41, 0xcd, 0x52, 0x80, 0x83, 0xd6, 0x60, 0xd3, 0xaa, 0xfb, 0x94, 0x47, 0x94, 0x3b, 0x11, - 0x0f, 0x25, 0x1e, 0xf1, 0x50, 0x05, 0x58, 0xa6, 0xce, 0x40, 0x24, 0x89, 0xb8, 0xf6, 0xd5, 0xb4, - 0x2f, 0x44, 0x04, 0x71, 0x9c, 0x79, 0x43, 0x1a, 0xd2, 0xf4, 0xe8, 0xc8, 0x93, 0xf6, 0xbe, 0x56, - 0xc4, 0xa7, 0x0a, 0x50, 0x86, 0x82, 0xec, 0x9f, 0x0c, 0xa8, 0x76, 0x78, 0x78, 0x1c, 0x07, 0x9e, - 0x40, 0x47, 0x1e, 0xf3, 0x22, 0x6e, 0x6e, 0x43, 0xd9, 0x4b, 0x44, 0x8f, 0x32, 0x2c, 0x86, 0x0d, - 0x63, 0xcd, 0x58, 0x2f, 0xef, 0x37, 0xfe, 0xf8, 0xed, 0x93, 0x9a, 0x4e, 0xdc, 0x0b, 0x02, 0x86, - 0x38, 0xef, 0x0a, 0x86, 0x49, 0xe8, 0x8e, 0x43, 0xcd, 0x8f, 0xa1, 0x14, 0xa7, 0x0c, 0x8d, 0x67, - 0x6b, 0xc6, 0xfa, 0xcb, 0xf6, 0x4a, 0x4b, 0x09, 0x6b, 0x29, 0xde, 0xfd, 0xa5, 0xeb, 0xbf, 0xdf, - 0x16, 0x5c, 0x1d, 0xb3, 0xbb, 0xf2, 0xc3, 0xfd, 0xd5, 0xc6, 0x38, 0xdb, 0x7e, 0x0d, 0xf5, 0x07, - 0x85, 0xb8, 0x88, 0xc7, 0x94, 0x70, 0x64, 0xff, 0xa3, 0x8a, 0xdc, 0x4b, 0x44, 0x0f, 0x11, 0x81, - 0x7d, 0x4f, 0xa0, 0x85, 0x8b, 0xdc, 0x01, 0xf0, 0x29, 0x11, 0x8c, 0xf6, 0xfb, 0x88, 0xa5, 0x85, - 0xce, 0x4b, 0xcc, 0xc5, 0x9a, 0x6d, 0x78, 0xe1, 0x29, 0xb0, 0x51, 0x7c, 0x22, 0x6d, 0x14, 0x68, - 0x7e, 0x00, 0x25, 0xca, 0x70, 0x88, 0x49, 0x63, 0x49, 0xa6, 0xb8, 0xda, 0x7a, 0x44, 0x7c, 0x5e, - 0x60, 0x26, 0xfe, 0x67, 0x25, 0xfe, 0x88, 0xd1, 0x01, 0xfa, 0x16, 0x0b, 0x22, 0x69, 0x17, 0x15, - 0x6f, 0xc1, 0x72, 0xcc, 0x68, 0x8c, 0x98, 0x18, 0x2a, 0xe9, 0x6e, 0x66, 0x9b, 0x0d, 0x78, 0x71, - 0xa1, 0xe8, 0x53, 0x79, 0x15, 0x77, 0x64, 0x4e, 0x15, 0x7b, 0x98, 0x16, 0x9b, 0x2f, 0x68, 0x54, - 0xac, 0x24, 0xe1, 0x89, 0xef, 0x4b, 0x12, 0x59, 0xd6, 0xb2, 0x3b, 0x32, 0xe7, 0x5d, 0x6d, 0xff, - 0x68, 0x40, 0xa5, 0xc3, 0xc3, 0xee, 0x90, 0xf8, 0xdf, 0x78, 0x49, 0x5f, 0x3c, 0x68, 0x92, 0xf1, - 0x0e, 0x4d, 0x7a, 0x0f, 0x8a, 0x3e, 0x0e, 0xf4, 0x0d, 0xf2, 0x28, 0x5b, 0x10, 0x79, 0x3e, 0xa3, - 0x44, 0xcb, 0xd2, 0xd6, 0x6e, 0x55, 0xaa, 0xca, 0xa5, 0xda, 0x9f, 0x42, 0x2d, 0x5f, 0xc4, 0xd3, - 0x9a, 0xec, 0xdf, 0x0d, 0x78, 0xbf, 0xc3, 0x43, 0x17, 0x85, 0x98, 0x0b, 0xc4, 0xbe, 0x1c, 0x97, - 0xb1, 0x68, 0x83, 0x9a, 0x00, 0x1e, 0xe7, 0x88, 0x09, 0x4c, 0x89, 0x7c, 0x46, 0xc5, 0xf5, 0x8a, - 0x9b, 0xf3, 0x98, 0x6f, 0xa0, 0x7c, 0x8e, 0x86, 0xbc, 0xe7, 0x31, 0x24, 0xdb, 0x24, 0xe1, 0xb1, - 0xc3, 0xfc, 0x10, 0x5e, 0x0d, 0x10, 0xc3, 0xdf, 0xc9, 0x01, 0x4a, 0x09, 0x96, 0xd2, 0x88, 0x49, - 0xe7, 0x54, 0x3b, 0xef, 0x0d, 0x58, 0x9d, 0xa9, 0x22, 0xfb, 0x02, 0x8b, 0xb7, 0xe3, 0x10, 0x96, - 0x3d, 0xdf, 0xa7, 0x09, 0x11, 0x4a, 0xcd, 0xcb, 0xf6, 0xd6, 0x68, 0x29, 0xcc, 0xbd, 0xb2, 0xb5, - 0xa7, 0xb3, 0xbe, 0x22, 0x82, 0x0d, 0xdd, 0x8c, 0xc4, 0xfa, 0x0c, 0x5e, 0x4d, 0x40, 0xb2, 0xe1, - 0xe7, 0x48, 0x7f, 0x63, 0x57, 0x1e, 0xcd, 0x1a, 0x3c, 0x1f, 0x78, 0xfd, 0x04, 0xe9, 0x21, 0x50, - 0xc6, 0xee, 0xb3, 0x1d, 0xc3, 0xfe, 0xd5, 0x00, 0x33, 0x77, 0x6d, 0x17, 0xb1, 0x01, 0xf6, 0x17, - 0x5f, 0x25, 0xab, 0x00, 0xea, 0x39, 0x9f, 0x26, 0x0c, 0xeb, 0xdb, 0xca, 0xca, 0x73, 0xcc, 0xb0, - 0xe9, 0x40, 0x89, 0xfb, 0x34, 0xd6, 0x8d, 0x5a, 0x69, 0xd7, 0xb3, 0x75, 0x88, 0x58, 0x84, 0x39, - 0xc7, 0x94, 0x74, 0x25, 0xee, 0xea, 0xb0, 0xa9, 0xc6, 0x6c, 0x83, 0x35, 0x5d, 0xed, 0xd3, 0x63, - 0xd9, 0xfe, 0xab, 0x08, 0xc5, 0x0e, 0x0f, 0xcd, 0x03, 0xa8, 0x4c, 0xec, 0xf5, 0x7a, 0xee, 0xd3, - 0xe7, 0x01, 0xeb, 0xed, 0x23, 0x40, 0x76, 0xd7, 0x01, 0x54, 0x26, 0x96, 0x6f, 0x9e, 0x29, 0x0f, - 0x4c, 0x30, 0xcd, 0xda, 0x66, 0x92, 0x69, 0x62, 0x93, 0xe5, 0x99, 0xf2, 0xc0, 0x04, 0xd3, 0xcc, - 0x55, 0xf3, 0x05, 0x94, 0xc7, 0x0b, 0xa3, 0x96, 0x8b, 0xce, 0xbc, 0xd6, 0x9b, 0x59, 0xde, 0x8c, - 0xe0, 0x04, 0xcc, 0x19, 0x2f, 0x77, 0x75, 0xee, 0x7c, 0x5a, 0x1f, 0xfd, 0xaf, 0xf1, 0x35, 0xbf, - 0x86, 0xea, 0xc3, 0x29, 0xb3, 0x66, 0x64, 0x6a, 0xcc, 0xb2, 0x1f, 0xc7, 0x46, 0x94, 0xd6, 0xf3, - 0xef, 0xef, 0xaf, 0x36, 0x8c, 0xfd, 0xcf, 0xaf, 0x6f, 0x9b, 0xc6, 0xcd, 0x6d, 0xd3, 0xf8, 0xf7, - 0xb6, 0x69, 0xfc, 0x72, 0xd7, 0x2c, 0xdc, 0xdc, 0x35, 0x0b, 0x7f, 0xde, 0x35, 0x0b, 0x27, 0x76, - 0x88, 0x45, 0x2f, 0x39, 0x6b, 0xf9, 0x34, 0x72, 0x28, 0xe1, 0x94, 0x30, 0xa7, 0x77, 0xe1, 0x0d, - 0x9d, 0x4b, 0x47, 0xfe, 0x55, 0x10, 0xc3, 0x18, 0xf1, 0xb3, 0x52, 0xfa, 0xab, 0xbf, 0xf5, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x69, 0xc4, 0x75, 0x84, 0x08, 0x00, 0x00, + // 806 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x4f, 0xeb, 0x46, + 0x14, 0x8d, 0xe3, 0x10, 0xe0, 0x06, 0x48, 0x34, 0xa5, 0xc5, 0x98, 0x12, 0x52, 0xb7, 0x95, 0x28, + 0xa2, 0x89, 0x00, 0xa9, 0x42, 0xb4, 0xaa, 0x44, 0xaa, 0x4a, 0x48, 0x55, 0x5a, 0x6a, 0xda, 0x2e, + 0xd8, 0x20, 0xc7, 0x9e, 0x3a, 0xd3, 0x38, 0x9e, 0x68, 0x66, 0x12, 0x91, 0xae, 0xfa, 0xb1, 0xab, + 0xba, 0xe8, 0x1f, 0x68, 0xd7, 0x5d, 0xb2, 0xe8, 0x3f, 0xe8, 0x86, 0x25, 0xea, 0xaa, 0xab, 0xa7, + 0x27, 0x58, 0xf0, 0x37, 0x9e, 0xec, 0xb1, 0x1d, 0xe7, 0x83, 0x08, 0x78, 0x9b, 0xc8, 0xf7, 0x9e, + 0x3b, 0x77, 0xce, 0xb9, 0x73, 0x32, 0x03, 0x45, 0x87, 0x38, 0xb5, 0xfe, 0x5e, 0x4d, 0x5c, 0x56, + 0xbb, 0x8c, 0x0a, 0x8a, 0xf2, 0x0e, 0x71, 0xaa, 0xfd, 0x3d, 0x7d, 0xcd, 0xa6, 0xbc, 0x43, 0x79, + 0xad, 0xc3, 0xdd, 0x00, 0xef, 0x70, 0x57, 0x16, 0xe8, 0xeb, 0x12, 0xb8, 0x08, 0xa3, 0x9a, 0x0c, + 0x22, 0x68, 0x35, 0x6a, 0xe6, 0x62, 0x1f, 0x73, 0x92, 0x64, 0x5d, 0xea, 0x52, 0x59, 0x1d, 0x7c, + 0xc9, 0xac, 0xf1, 0xbb, 0x02, 0xa5, 0x06, 0x77, 0x8f, 0x3d, 0x8f, 0xda, 0x96, 0xc0, 0xdf, 0x59, + 0x3d, 0x4f, 0xa0, 0x8f, 0x60, 0xd1, 0xea, 0x89, 0x16, 0x65, 0x44, 0x0c, 0x34, 0xa5, 0xa2, 0x6c, + 0x2f, 0xd6, 0xb5, 0xff, 0xfe, 0xf9, 0x70, 0x35, 0xda, 0xe5, 0xd8, 0x71, 0x18, 0xe6, 0xfc, 0x4c, + 0x30, 0xe2, 0xbb, 0xe6, 0xb0, 0x14, 0x69, 0x30, 0xcf, 0x7b, 0xcd, 0x1f, 0xb0, 0x2d, 0xb4, 0x6c, + 0xb0, 0xca, 0x8c, 0x43, 0xf4, 0x16, 0xe4, 0x29, 0x23, 0x2e, 0xf1, 0x35, 0x35, 0x04, 0xa2, 0xe8, + 0x68, 0xe5, 0x97, 0xfb, 0xab, 0x9d, 0x61, 0x07, 0xe3, 0x57, 0x05, 0xb4, 0x71, 0x3a, 0x26, 0xe6, + 0x5d, 0xea, 0x73, 0x8c, 0x4a, 0xa0, 0xda, 0xc4, 0x91, 0x84, 0xcc, 0xe0, 0x13, 0xbd, 0x03, 0x4b, + 0xf8, 0xb2, 0x4b, 0xd8, 0xe0, 0xa2, 0xe9, 0x51, 0xbb, 0x1d, 0xee, 0xaa, 0x9a, 0x05, 0x99, 0xab, + 0x07, 0x29, 0xb4, 0x0a, 0x73, 0x82, 0xb6, 0x71, 0xbc, 0xb1, 0x0c, 0xd0, 0xdb, 0xb0, 0x18, 0xec, + 0xe0, 0xb5, 0x28, 0x17, 0x5a, 0xae, 0xa2, 0x6c, 0x2f, 0x98, 0xc3, 0x84, 0xf1, 0xaf, 0x02, 0x6f, + 0x36, 0xb8, 0x6b, 0x62, 0x97, 0x70, 0x81, 0xd9, 0x67, 0xd4, 0x17, 0x8c, 0x7a, 0x1e, 0x66, 0xcf, + 0x9e, 0x4c, 0x19, 0xc0, 0xe2, 0x1c, 0x33, 0x41, 0xa8, 0xcf, 0xb5, 0x6c, 0x45, 0xdd, 0x5e, 0x32, + 0x53, 0x99, 0x80, 0x4f, 0x1b, 0x0f, 0x78, 0xcb, 0x62, 0x98, 0x6b, 0x6a, 0x08, 0x0f, 0x13, 0xe8, + 0x3d, 0x58, 0xee, 0x63, 0x46, 0xbe, 0x27, 0xb6, 0x25, 0x1b, 0xe4, 0xc2, 0x8a, 0xd1, 0xe4, 0xc4, + 0x2c, 0x7f, 0xce, 0xc2, 0xe6, 0x54, 0x15, 0xc9, 0x40, 0xc3, 0xf3, 0xb2, 0x6d, 0xcc, 0x79, 0xa8, + 0x65, 0xc1, 0x8c, 0x43, 0x74, 0x08, 0x60, 0x27, 0xf5, 0xf2, 0x30, 0x67, 0x08, 0x4d, 0xd5, 0xa2, + 0xaf, 0x60, 0xc1, 0xb2, 0x6d, 0xda, 0xf3, 0x85, 0x14, 0x52, 0xd8, 0x3f, 0xa8, 0x4a, 0x2f, 0x57, + 0x67, 0x92, 0xa9, 0x1e, 0x47, 0xab, 0x3e, 0xf7, 0x05, 0x1b, 0x98, 0x49, 0x13, 0xfd, 0x63, 0x58, + 0x1e, 0x81, 0x02, 0x1b, 0xb4, 0xf1, 0x20, 0xb6, 0x41, 0x1b, 0x0f, 0x82, 0x33, 0xee, 0x5b, 0x5e, + 0x0f, 0x47, 0xae, 0x93, 0xc1, 0x51, 0xf6, 0x50, 0x31, 0xfe, 0xca, 0xc2, 0x1b, 0x81, 0x9f, 0xe4, + 0x50, 0x7e, 0xc4, 0x67, 0x98, 0xf5, 0x89, 0x8d, 0xc7, 0xf4, 0x29, 0x4f, 0xd0, 0x37, 0x74, 0x72, + 0x36, 0xed, 0x64, 0xf4, 0x25, 0x14, 0xba, 0x98, 0x75, 0x08, 0xe7, 0xe1, 0x09, 0x49, 0xe9, 0xbb, + 0x29, 0xe9, 0xe3, 0x1c, 0xaa, 0xa7, 0xc3, 0x72, 0xa9, 0x39, 0xdd, 0x60, 0xe8, 0xdb, 0x5c, 0xca, + 0xb7, 0xfa, 0xa7, 0x50, 0x1a, 0x5f, 0xf6, 0x94, 0x79, 0x1c, 0x15, 0x03, 0x8f, 0xa4, 0xe4, 0x18, + 0x0d, 0xd8, 0x98, 0xc2, 0xed, 0x11, 0x0e, 0x49, 0xf8, 0x65, 0x53, 0xfc, 0x8c, 0xdf, 0x14, 0x40, + 0xa9, 0x63, 0x7e, 0xfd, 0x71, 0x7f, 0x00, 0xf3, 0x5c, 0x36, 0x09, 0x37, 0x2a, 0xec, 0x17, 0xe3, + 0x91, 0xc6, 0x54, 0x63, 0x7c, 0x52, 0xdb, 0x09, 0xe8, 0x93, 0x5c, 0x1e, 0x21, 0xad, 0x04, 0xaa, + 0x43, 0x9c, 0x48, 0x58, 0xf0, 0x69, 0xfc, 0xa9, 0x40, 0xb1, 0xc1, 0xdd, 0x6f, 0xbb, 0x8e, 0x25, + 0xf0, 0xa9, 0xc5, 0xac, 0x0e, 0x7f, 0xf6, 0x55, 0xb0, 0x0b, 0xf9, 0x6e, 0xd8, 0x21, 0x12, 0xb4, + 0x12, 0x0b, 0x92, 0x7d, 0xeb, 0xb9, 0xeb, 0x17, 0x5b, 0x19, 0x33, 0xaa, 0x99, 0x7e, 0x7d, 0x4d, + 0xfc, 0xd5, 0xd7, 0x61, 0x6d, 0x8c, 0x5e, 0x2c, 0x73, 0xff, 0x6f, 0x15, 0xd4, 0x06, 0x77, 0xd1, + 0x09, 0x2c, 0x8d, 0xd0, 0x5f, 0x4b, 0x59, 0x33, 0x0d, 0xe8, 0x5b, 0x0f, 0x00, 0xc9, 0xe0, 0xbe, + 0x81, 0xd2, 0xc4, 0xff, 0x69, 0x63, 0x86, 0xd1, 0xf5, 0x77, 0x67, 0x80, 0x49, 0xd7, 0x2f, 0x60, + 0x79, 0xf4, 0x11, 0xd2, 0xd2, 0xab, 0xd2, 0x88, 0x5e, 0x79, 0x08, 0x49, 0x9a, 0x9d, 0x03, 0x9a, + 0x72, 0x79, 0x6f, 0xce, 0xbc, 0x88, 0xf4, 0xf7, 0x1f, 0x75, 0x4f, 0xa1, 0xaf, 0xa1, 0x38, 0x6e, + 0x6f, 0x7d, 0xca, 0xca, 0x58, 0xbc, 0xf1, 0x30, 0x16, 0xb7, 0xd4, 0xe7, 0x7e, 0xba, 0xbf, 0xda, + 0x51, 0xea, 0x9f, 0x5c, 0xdf, 0x96, 0x95, 0x9b, 0xdb, 0xb2, 0xf2, 0xf2, 0xb6, 0xac, 0xfc, 0x71, + 0x57, 0xce, 0xdc, 0xdc, 0x95, 0x33, 0xff, 0xdf, 0x95, 0x33, 0xe7, 0x86, 0x4b, 0x44, 0xab, 0xd7, + 0xac, 0xda, 0xb4, 0x53, 0xa3, 0x3e, 0xa7, 0x3e, 0xab, 0x85, 0x3f, 0x97, 0xb5, 0xe0, 0xa9, 0x17, + 0x83, 0x2e, 0xe6, 0xcd, 0x7c, 0xf8, 0xa0, 0x1f, 0xbc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00, 0xae, + 0x36, 0x79, 0x4b, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1245,14 +737,6 @@ type MsgClient interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -1279,9 +763,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) { out := new(MsgAuthorizeServiceResponse) err := c.cc.Invoke(ctx, "/did.v1.Msg/AuthorizeService", in, out, opts...) -func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { - out := new(MsgAuthenticateResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/Authenticate", in, out, opts...) if err != nil { return nil, err } @@ -1291,21 +772,6 @@ func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, 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...) -func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { - out := new(MsgProveWitnessResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/ProveWitness", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) { - out := new(MsgSyncControllerResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/SyncController", in, out, opts...) -func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { - out := new(MsgSyncVaultResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/SyncVault", in, out, opts...) if err != nil { return nil, err } @@ -1341,14 +807,6 @@ type MsgServer interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -1368,17 +826,6 @@ func (*UnimplementedMsgServer) AuthorizeService(ctx context.Context, req *MsgAut func (*UnimplementedMsgServer) AllocateVault(ctx context.Context, req *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } -func (*UnimplementedMsgServer) SyncController(ctx context.Context, req *MsgSyncController) (*MsgSyncControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented") -func (*UnimplementedMsgServer) Authenticate(ctx context.Context, req *MsgAuthenticate) (*MsgAuthenticateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") -} -func (*UnimplementedMsgServer) ProveWitness(ctx context.Context, req *MsgProveWitness) (*MsgProveWitnessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") -} -func (*UnimplementedMsgServer) SyncVault(ctx context.Context, req *MsgSyncVault) (*MsgSyncVaultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") -} func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } @@ -1410,8 +857,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAuthorizeService) -func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticate) if err := dec(in); err != nil { return nil, err } @@ -1424,22 +869,12 @@ func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(in } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService)) - return srv.(MsgServer).Authenticate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Msg/Authenticate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) } return interceptor(ctx, in, info, handler) } func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgAllocateVault) -func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgProveWitness) if err := dec(in); err != nil { return nil, err } @@ -1452,42 +887,6 @@ func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(in } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) - return srv.(MsgServer).ProveWitness(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Msg/ProveWitness", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncController) -func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncVault) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SyncController(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Msg/SyncController", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController)) - return srv.(MsgServer).SyncVault(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Msg/SyncVault", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault)) } return interceptor(ctx, in, info, handler) } @@ -1544,20 +943,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AllocateVault", Handler: _Msg_AllocateVault_Handler, }, - { - MethodName: "SyncController", - Handler: _Msg_SyncController_Handler, - MethodName: "Authenticate", - Handler: _Msg_Authenticate_Handler, - }, - { - MethodName: "ProveWitness", - Handler: _Msg_ProveWitness_Handler, - }, - { - MethodName: "SyncVault", - Handler: _Msg_SyncVault_Handler, - }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, @@ -1571,78 +956,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "did/v1/tx.proto", } -func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0x1a - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - 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 *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgAllocateVault) Marshal() (dAtA []byte, err error) { -func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1653,13 +967,11 @@ func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { } func (m *MsgAllocateVault) MarshalTo(dAtA []byte) (int, error) { -func (m *MsgAuthenticate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgAllocateVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { -func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1669,19 +981,12 @@ func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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))) + 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 } @@ -1695,7 +1000,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]) @@ -1705,180 +1010,48 @@ 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 - return len(dAtA) - i, nil -} - -func (m *MsgProveWitness) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgProveWitness) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgProveWitness) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Witness) > 0 { - i -= len(m.Witness) - copy(dAtA[i:], m.Witness) - i = encodeVarintTx(dAtA, i, uint64(len(m.Witness))) + if m.Localhost { i-- - dAtA[i] = 0x1a - } - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgProveWitnessResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgProveWitnessResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgProveWitnessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) - i-- - dAtA[i] = 0x12 - } - if m.Success { - i-- - if m.Success { + if m.Localhost { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x20 } - return len(dAtA) - i, nil -} - -func (m *MsgSyncVault) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSyncVault) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSyncVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Macron) > 0 { - i -= len(m.Macron) - copy(dAtA[i:], m.Macron) - i = encodeVarintTx(dAtA, i, uint64(len(m.Macron))) + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) i-- dAtA[i] = 0x1a } + 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] = 0x12 - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgSyncVaultResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSyncVaultResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSyncVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *MsgRegisterController) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1951,388 +1124,6 @@ func (m *MsgRegisterControllerResponse) MarshalTo(dAtA []byte) (int, error) { return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Accounts) > 0 { - for k := range m.Accounts { - v := m.Accounts[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTx(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTx(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTx(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterService) 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 *MsgRegisterService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintTx(dAtA, i, uint64(len(m.Subject))) - if len(m.Scopes) > 0 { - dAtA3 := make([]byte, len(m.Scopes)*10) - var j2 int - for _, num := range m.Scopes { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ - } - dAtA3[j2] = uint8(num) - j2++ - } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintTx(dAtA, i, uint64(j2)) - i-- - dAtA[i] = 0x1a - } - if len(m.OriginUri) > 0 { - i -= len(m.OriginUri) - copy(dAtA[i:], m.OriginUri) - i = encodeVarintTx(dAtA, i, uint64(len(m.OriginUri))) - 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 *MsgAllocateVaultResponse) Marshal() (dAtA []byte, err error) { -func (m *MsgRegisterServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAllocateVaultResponse) MarshalTo(dAtA []byte) (int, error) { -func (m *MsgRegisterServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAllocateVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { -func (m *MsgRegisterServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Localhost { - i-- - if m.Localhost { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.RegistrationOptions) > 0 { - i -= len(m.RegistrationOptions) - copy(dAtA[i:], m.RegistrationOptions) - i = encodeVarintTx(dAtA, i, uint64(len(m.RegistrationOptions))) - i-- - dAtA[i] = 0x1a - } - 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 -} - -func (m *MsgProveWitness) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgProveWitness) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgProveWitness) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0x22 - } - if len(m.Witness) > 0 { - i -= len(m.Witness) - copy(dAtA[i:], m.Witness) - i = encodeVarintTx(dAtA, i, uint64(len(m.Witness))) - i-- - dAtA[i] = 0x1a - } - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgProveWitnessResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgProveWitnessResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgProveWitnessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) - i-- - dAtA[i] = 0x12 - } - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgSyncController) 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 *MsgSyncController) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSyncController) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) - 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] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSyncControllerResponse) 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 *MsgSyncControllerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSyncControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Success { - i-- - if m.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterController) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRegisterController) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CredentialCreationResponse) > 0 { - i -= len(m.CredentialCreationResponse) - copy(dAtA[i:], m.CredentialCreationResponse) - i = encodeVarintTx(dAtA, i, uint64(len(m.CredentialCreationResponse))) - i-- - dAtA[i] = 0x22 - } - 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) - copy(dAtA[i:], m.Cid) - i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) - 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 *MsgRegisterControllerResponse) 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 *MsgRegisterControllerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i @@ -2404,17 +1195,24 @@ func (m *MsgAuthorizeService) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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)) + if len(m.Permissions) > 0 { + for k := range m.Permissions { + v := m.Permissions[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] = 0x1a } - i-- - dAtA[i] = 0x1a } if len(m.Origin) > 0 { i -= len(m.Origin) @@ -2493,13 +1291,6 @@ func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0x1a - } if m.Service != nil { { size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) @@ -2562,6 +1353,76 @@ func (m *MsgRegisterServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintTx(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + 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 *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -2573,140 +1434,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.Token) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgAllocateVault) Size() (n int) { -func (m *MsgAuthenticate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgAuthenticateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgProveWitness) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Property) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Witness) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgProveWitnessResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - l = len(m.Property) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSyncVault) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Macron) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSyncVaultResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - return n -} - -func (m *MsgRegisterController) Size() (n int) { if m == nil { return 0 } @@ -2723,6 +1451,43 @@ func (m *MsgRegisterController) Size() (n int) { l = len(m.Origin) if l > 0 { n += 1 + l + sovTx(uint64(l)) + } + return n +} + +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)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Localhost { + n += 2 + } + return n +} + +func (m *MsgRegisterController) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if len(m.Assertions) > 0 { for _, b := range m.Assertions { l = len(b) @@ -2744,170 +1509,6 @@ func (m *MsgRegisterController) Size() (n int) { return n } -func (m *MsgRegisterControllerResponse) 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)) - } - if len(m.Accounts) > 0 { - for k, v := range m.Accounts { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) - n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MsgRegisterService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.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)) - } - n += 1 + sovTx(uint64(l)) + l - } - return n -} - -func (m *MsgAllocateVaultResponse) Size() (n int) { -func (m *MsgRegisterServiceResponse) 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)) - } - l = len(m.RegistrationOptions) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Localhost { - n += 2 - } - return n -} - -func (m *MsgProveWitness) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Property) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Witness) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgProveWitnessResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - l = len(m.Property) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSyncController) 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.Token) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSyncControllerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Success { - n += 2 - } - return n -} - -func (m *MsgRegisterController) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - 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.Origin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.CredentialCreationResponse) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - func (m *MsgRegisterControllerResponse) Size() (n int) { if m == nil { return 0 @@ -2946,9 +1547,13 @@ func (m *MsgAuthorizeService) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovTx(uint64(l)) + if len(m.Permissions) > 0 { + for k, v := range m.Permissions { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) + n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) + } } l = len(m.Token) if l > 0 { @@ -2987,10 +1592,6 @@ func (m *MsgRegisterService) Size() (n int) { l = m.Service.Size() n += 1 + l + sovTx(uint64(l)) } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -3007,9 +1608,34 @@ func (m *MsgRegisterServiceResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Success { - n += 2 + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Token) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l return n } @@ -3019,205 +1645,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *MsgAllocateVault) Unmarshal(dAtA []byte) error { -func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3244,10 +1672,6 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) - return fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3285,7 +1709,6 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3316,42 +1739,6 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { m.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - 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) } @@ -3405,7 +1792,6 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { return nil } func (m *MsgAllocateVaultResponse) Unmarshal(dAtA []byte) error { -func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3432,10 +1818,6 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { } if fieldNum <= 0 { return fmt.Errorf("proto: MsgAllocateVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - return fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3491,7 +1873,7 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegistrationOptions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3519,7 +1901,7 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RegistrationOptions = string(dAtA[iNdEx:postIndex]) + m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { @@ -3562,472 +1944,6 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Witness = append(m.Witness[:0], dAtA[iNdEx:postIndex]...) - if m.Witness == nil { - m.Witness = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgProveWitnessResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSyncController) 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: MsgSyncController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncController: 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 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSyncControllerResponse) 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: MsgSyncControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4091,9 +2007,9 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4103,29 +2019,29 @@ func (m *MsgRegisterController) 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 ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Cid = string(dAtA[iNdEx:postIndex]) + m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) + copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4135,29 +2051,29 @@ func (m *MsgRegisterController) 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 ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Origin = string(dAtA[iNdEx:postIndex]) + m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) + copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialCreationResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4167,23 +2083,23 @@ func (m *MsgRegisterController) 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 ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.CredentialCreationResponse = string(dAtA[iNdEx:postIndex]) + m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) + copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4530,7 +2446,7 @@ func (m *MsgAuthorizeService) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4557,12 +2473,103 @@ func (m *MsgAuthorizeService) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Scopes == nil { - m.Scopes = &Permissions{} + if m.Permissions == nil { + m.Permissions = make(map[string]string) } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Permissions[mapkey] = mapvalue iNdEx = postIndex case 4: if wireType != 2 { @@ -4816,38 +2823,6 @@ func (m *MsgRegisterService) 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 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.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4971,7 +2946,7 @@ func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4994,10 +2969,10 @@ func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5034,653 +3009,7 @@ func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Witness = append(m.Witness[:0], dAtA[iNdEx:postIndex]...) - if m.Witness == nil { - m.Witness = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgProveWitnessResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSyncVault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Macron = append(m.Macron[:0], dAtA[iNdEx:postIndex]...) - if m.Macron == nil { - m.Macron = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSyncVaultResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSyncVaultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) - copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) - copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) - copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5707,287 +3036,42 @@ func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Accounts == nil { - m.Accounts = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTx - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTx - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTx - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTx - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Accounts[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + 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++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - for iNdEx < postIndex { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scopes = append(m.Scopes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -6009,7 +3093,7 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6032,32 +3116,12 @@ func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) 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 3329dca2e..000000000 --- a/x/did/types/types.pb.go +++ /dev/null @@ -1,4548 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/types.proto - -package types - -import ( - encoding_binary "encoding/binary" - 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 - -// AssetInfo defines the asset info -type AssetInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` -} - -func (m *AssetInfo) Reset() { *m = AssetInfo{} } -func (m *AssetInfo) String() string { return proto.CompactTextString(m) } -func (*AssetInfo) ProtoMessage() {} -func (*AssetInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{0} -} -func (m *AssetInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AssetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetInfo.Merge(m, src) -} -func (m *AssetInfo) XXX_Size() int { - return m.Size() -} -func (m *AssetInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AssetInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetInfo proto.InternalMessageInfo - -func (m *AssetInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *AssetInfo) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *AssetInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *AssetInfo) GetAssetType() string { - if m != nil { - return m.AssetType - } - return "" -} - -func (m *AssetInfo) GetOriginChain() string { - if m != nil { - return m.OriginChain - } - return "" -} - -func (m *AssetInfo) GetOriginDenom() string { - if m != nil { - return m.OriginDenom - } - return "" -} - -func (m *AssetInfo) GetDecimals() int32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *AssetInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *AssetInfo) GetImageUrl() string { - if m != nil { - return m.ImageUrl - } - return "" -} - -func (m *AssetInfo) GetCoingeckoId() string { - if m != nil { - return m.CoingeckoId - } - return "" -} - -func (m *AssetInfo) GetIsEnabled() bool { - if m != nil { - return m.IsEnabled - } - return false -} - -func (m *AssetInfo) GetIbcPath() string { - if m != nil { - return m.IbcPath - } - return "" -} - -func (m *AssetInfo) GetIbcChannel() string { - if m != nil { - return m.IbcChannel - } - return "" -} - -func (m *AssetInfo) GetIbcPort() string { - if m != nil { - return m.IbcPort - } - return "" -} - -// ChainInfo defines the chain info -type ChainInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` -} - -func (m *ChainInfo) Reset() { *m = ChainInfo{} } -func (m *ChainInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo) ProtoMessage() {} -func (*ChainInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{1} -} -func (m *ChainInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo.Merge(m, src) -} -func (m *ChainInfo) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo proto.InternalMessageInfo - -func (m *ChainInfo) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ChainInfo) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ChainInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ChainInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *ChainInfo) GetBech32Prefix() string { - if m != nil { - return m.Bech32Prefix - } - return "" -} - -func (m *ChainInfo) GetGenesisTime() string { - if m != nil { - return m.GenesisTime - } - return "" -} - -func (m *ChainInfo) GetGrpcEndpoints() []*Endpoint { - if m != nil { - return m.GrpcEndpoints - } - return nil -} - -func (m *ChainInfo) GetRestEndpoints() []*Endpoint { - if m != nil { - return m.RestEndpoints - } - return nil -} - -func (m *ChainInfo) GetExplorer() *ExplorerInfo { - if m != nil { - return m.Explorer - } - return nil -} - -func (m *ChainInfo) GetFeeInfo() *FeeInfo { - if m != nil { - return m.FeeInfo - } - return nil -} - -// Credential defines a WebAuthn credential -type Credential struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *Credential) Reset() { *m = Credential{} } -func (m *Credential) String() string { return proto.CompactTextString(m) } -func (*Credential) ProtoMessage() {} -func (*Credential) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{2} -} -func (m *Credential) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Credential.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Credential) XXX_Merge(src proto.Message) { - xxx_messageInfo_Credential.Merge(m, src) -} -func (m *Credential) XXX_Size() int { - return m.Size() -} -func (m *Credential) XXX_DiscardUnknown() { - xxx_messageInfo_Credential.DiscardUnknown(m) -} - -var xxx_messageInfo_Credential proto.InternalMessageInfo - -func (m *Credential) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Credential) GetCredentialType() string { - if m != nil { - return m.CredentialType - } - return "" -} - -func (m *Credential) GetCredentialId() []byte { - if m != nil { - return m.CredentialId - } - return nil -} - -func (m *Credential) GetTransport() []string { - if m != nil { - return m.Transport - } - return nil -} - -func (m *Credential) GetAttestationType() string { - if m != nil { - return m.AttestationType - } - return "" -} - -func (m *Credential) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *Credential) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// Document defines a DID document -type Document struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` -} - -func (m *Document) Reset() { *m = Document{} } -func (m *Document) String() string { return proto.CompactTextString(m) } -func (*Document) ProtoMessage() {} -func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{3} -} -func (m *Document) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Document.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Document) XXX_Merge(src proto.Message) { - xxx_messageInfo_Document.Merge(m, src) -} -func (m *Document) XXX_Size() int { - return m.Size() -} -func (m *Document) XXX_DiscardUnknown() { - xxx_messageInfo_Document.DiscardUnknown(m) -} - -var xxx_messageInfo_Document proto.InternalMessageInfo - -func (m *Document) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Document) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -func (m *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 -} - -// Endpoint defines an endpoint -type Endpoint struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` -} - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (m *Endpoint) String() string { return proto.CompactTextString(m) } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{4} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *Endpoint) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *Endpoint) GetIsPrimary() bool { - if m != nil { - return m.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ExplorerInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *ExplorerInfo) Reset() { *m = ExplorerInfo{} } -func (m *ExplorerInfo) String() string { return proto.CompactTextString(m) } -func (*ExplorerInfo) ProtoMessage() {} -func (*ExplorerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{5} -} -func (m *ExplorerInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExplorerInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExplorerInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExplorerInfo.Merge(m, src) -} -func (m *ExplorerInfo) XXX_Size() int { - return m.Size() -} -func (m *ExplorerInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ExplorerInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ExplorerInfo proto.InternalMessageInfo - -func (m *ExplorerInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ExplorerInfo) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// FeeInfo defines a fee info -type FeeInfo struct { - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (m *FeeInfo) Reset() { *m = FeeInfo{} } -func (m *FeeInfo) String() string { return proto.CompactTextString(m) } -func (*FeeInfo) ProtoMessage() {} -func (*FeeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{6} -} -func (m *FeeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FeeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeInfo.Merge(m, src) -} -func (m *FeeInfo) XXX_Size() int { - return m.Size() -} -func (m *FeeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FeeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeInfo proto.InternalMessageInfo - -func (m *FeeInfo) GetBaseDenom() string { - if m != nil { - return m.BaseDenom - } - return "" -} - -func (m *FeeInfo) GetFeeRates() []string { - if m != nil { - return m.FeeRates - } - return nil -} - -func (m *FeeInfo) GetInitGasLimit() int32 { - if m != nil { - return m.InitGasLimit - } - return 0 -} - -func (m *FeeInfo) GetIsSimulable() bool { - if m != nil { - return m.IsSimulable - } - return false -} - -func (m *FeeInfo) GetGasMultiply() float64 { - if m != nil { - return m.GasMultiply - } - return 0 -} - -// Identity defines an associated profile for a did subject -type Identity struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` -} - -func (m *Identity) Reset() { *m = Identity{} } -func (m *Identity) String() string { return proto.CompactTextString(m) } -func (*Identity) ProtoMessage() {} -func (*Identity) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{7} -} -func (m *Identity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Identity.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Identity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Identity.Merge(m, src) -} -func (m *Identity) XXX_Size() int { - return m.Size() -} -func (m *Identity) XXX_DiscardUnknown() { - xxx_messageInfo_Identity.DiscardUnknown(m) -} - -var xxx_messageInfo_Identity proto.InternalMessageInfo - -func (m *Identity) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Identity) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Identity) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Identity) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *Identity) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -// PubKey defines a public key for a did -type PubKey struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *PubKey) Reset() { *m = PubKey{} } -func (m *PubKey) String() string { return proto.CompactTextString(m) } -func (*PubKey) ProtoMessage() {} -func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{8} -} -func (m *PubKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PubKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKey.Merge(m, src) -} -func (m *PubKey) XXX_Size() int { - return m.Size() -} -func (m *PubKey) XXX_DiscardUnknown() { - xxx_messageInfo_PubKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PubKey proto.InternalMessageInfo - -func (m *PubKey) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *PubKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *PubKey) GetKeyType() string { - if m != nil { - return m.KeyType - } - return "" -} - -func (m *PubKey) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// VerificationMethod defines a verification method -type VerificationMethod struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - 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{9} -} -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((*AssetInfo)(nil), "did.v1.AssetInfo") - proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") - proto.RegisterType((*Credential)(nil), "did.v1.Credential") - proto.RegisterType((*Document)(nil), "did.v1.Document") - proto.RegisterType((*Endpoint)(nil), "did.v1.Endpoint") - proto.RegisterType((*ExplorerInfo)(nil), "did.v1.ExplorerInfo") - proto.RegisterType((*FeeInfo)(nil), "did.v1.FeeInfo") - proto.RegisterType((*Identity)(nil), "did.v1.Identity") - proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") - proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") - proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry") -} - -func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } - -var fileDescriptor_e3176cd2dbe76ac1 = []byte{ - // 1133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x72, 0xe3, 0x44, - 0x10, 0x8e, 0xec, 0x38, 0x96, 0xda, 0x8e, 0x93, 0x1a, 0x0c, 0x28, 0x59, 0x30, 0xc1, 0x4b, 0x41, - 0xa0, 0x0a, 0x7b, 0x37, 0xd9, 0x2a, 0x28, 0xe0, 0x00, 0x24, 0x81, 0x32, 0x4b, 0xa8, 0x94, 0xd8, - 0xe5, 0xc0, 0x45, 0x35, 0x92, 0xc6, 0xf2, 0xac, 0x25, 0x8d, 0x4a, 0x33, 0x76, 0xa2, 0xa7, 0x80, - 0x67, 0xe0, 0xc0, 0x9d, 0xb7, 0xe0, 0xb8, 0x47, 0xb8, 0x51, 0xc9, 0x3b, 0x70, 0xe0, 0x44, 0xcd, - 0x8c, 0x24, 0x2b, 0x31, 0xb9, 0x70, 0x9b, 0xfe, 0xba, 0x7b, 0x7e, 0xfa, 0xfb, 0xba, 0x6b, 0x00, - 0x05, 0x34, 0x18, 0x2f, 0x1f, 0x8f, 0x45, 0x9e, 0x12, 0x3e, 0x4a, 0x33, 0x26, 0x18, 0xda, 0x0a, - 0x68, 0x30, 0x5a, 0x3e, 0xde, 0x7f, 0xdd, 0x67, 0x3c, 0x66, 0x7c, 0x1c, 0xf3, 0x50, 0x86, 0xc4, - 0x3c, 0xd4, 0x01, 0xfb, 0xfd, 0x90, 0x85, 0x4c, 0x2d, 0xc7, 0x72, 0x55, 0xa0, 0x7b, 0x3a, 0xdc, - 0xd5, 0x0e, 0x6d, 0x68, 0xd7, 0xf0, 0x97, 0x26, 0x58, 0x5f, 0x70, 0x4e, 0xc4, 0x24, 0x99, 0x32, - 0xd4, 0x83, 0x06, 0x0d, 0x6c, 0xe3, 0xc0, 0x38, 0xb4, 0x9c, 0x06, 0x0d, 0x50, 0x1f, 0x5a, 0x01, - 0x49, 0x58, 0x6c, 0x37, 0x14, 0xa4, 0x0d, 0xf4, 0x1a, 0x6c, 0xf1, 0x3c, 0xf6, 0x58, 0x64, 0x37, - 0x15, 0x5c, 0x58, 0xe8, 0x4d, 0x00, 0x2c, 0xb7, 0x72, 0xe5, 0x95, 0xed, 0x4d, 0xe5, 0xb3, 0x14, - 0xf2, 0x2c, 0x4f, 0x09, 0x7a, 0x1b, 0xba, 0x2c, 0xa3, 0x21, 0x4d, 0x5c, 0x7f, 0x86, 0x69, 0x62, - 0xb7, 0x54, 0x40, 0x47, 0x63, 0x27, 0x12, 0xaa, 0x85, 0xe8, 0x63, 0xb7, 0xea, 0x21, 0xa7, 0xea, - 0xf0, 0x7d, 0x30, 0x03, 0xe2, 0xd3, 0x18, 0x47, 0xdc, 0x6e, 0x1f, 0x18, 0x87, 0x2d, 0xa7, 0xb2, - 0xd1, 0x01, 0x74, 0x02, 0xc2, 0xfd, 0x8c, 0xa6, 0x82, 0xb2, 0xc4, 0x36, 0x75, 0x76, 0x0d, 0x42, - 0x0f, 0xc0, 0xa2, 0x31, 0x0e, 0x89, 0xbb, 0xc8, 0x22, 0xdb, 0x52, 0x7e, 0x53, 0x01, 0xcf, 0xb3, - 0x48, 0x9e, 0xee, 0x33, 0x9a, 0x84, 0xc4, 0x9f, 0x33, 0x97, 0x06, 0x36, 0xe8, 0xfc, 0x0a, 0x9b, - 0x04, 0xf2, 0x89, 0x94, 0xbb, 0x24, 0xc1, 0x5e, 0x44, 0x02, 0xbb, 0x73, 0x60, 0x1c, 0x9a, 0x8e, - 0x45, 0xf9, 0x99, 0x06, 0xd0, 0x1e, 0x98, 0xd4, 0xf3, 0xdd, 0x14, 0x8b, 0x99, 0xdd, 0x55, 0xd9, - 0x6d, 0xea, 0xf9, 0x17, 0x58, 0xcc, 0xd0, 0x5b, 0xd0, 0x91, 0x2e, 0x7f, 0x86, 0x93, 0x84, 0x44, - 0xf6, 0xb6, 0xf2, 0x02, 0xf5, 0xfc, 0x13, 0x8d, 0x54, 0xb9, 0x2c, 0x13, 0x76, 0x6f, 0x95, 0xcb, - 0x32, 0x31, 0xfc, 0xa7, 0x01, 0x96, 0x2a, 0xd0, 0x7f, 0x92, 0xb4, 0x07, 0xa6, 0x2a, 0xa8, 0xbc, - 0xb2, 0xe6, 0xa9, 0xad, 0xec, 0x49, 0x80, 0x10, 0x6c, 0x26, 0x38, 0x26, 0x05, 0x4f, 0x6a, 0x5d, - 0x63, 0x6f, 0xf3, 0x16, 0x7b, 0x0f, 0x61, 0xdb, 0x23, 0xfe, 0xec, 0xf8, 0xc8, 0x4d, 0x33, 0x32, - 0xa5, 0x57, 0x05, 0x3f, 0x5d, 0x0d, 0x5e, 0x28, 0x4c, 0x96, 0x28, 0x24, 0x09, 0xe1, 0x94, 0xbb, - 0x82, 0xc6, 0xa4, 0x24, 0xa8, 0xc0, 0x9e, 0xd1, 0x98, 0xa0, 0x8f, 0xa0, 0x17, 0x66, 0xa9, 0xef, - 0x92, 0x24, 0x48, 0x19, 0x4d, 0x84, 0xa4, 0xa9, 0x79, 0xd8, 0x39, 0xda, 0x1d, 0x69, 0xf1, 0x8e, - 0xce, 0x0a, 0x87, 0xb3, 0x2d, 0xe3, 0x4a, 0x8b, 0xcb, 0xc4, 0x8c, 0x70, 0x51, 0x4b, 0x34, 0xef, - 0x4b, 0x94, 0x71, 0xab, 0xc4, 0x47, 0x60, 0x92, 0xab, 0x34, 0x62, 0x19, 0xc9, 0x14, 0xa7, 0x9d, - 0xa3, 0x7e, 0x95, 0x52, 0xe0, 0xb2, 0x70, 0x4e, 0x15, 0x85, 0x3e, 0x00, 0x73, 0x4a, 0x88, 0x4b, - 0x93, 0x29, 0x53, 0x2c, 0x77, 0x8e, 0x76, 0xca, 0x8c, 0xaf, 0x08, 0x51, 0xc1, 0xed, 0xa9, 0x5e, - 0x0c, 0xff, 0x36, 0x00, 0x4e, 0x32, 0x12, 0x90, 0x44, 0x50, 0x1c, 0xad, 0x55, 0xff, 0x3d, 0xd8, - 0xf1, 0x2b, 0xaf, 0x56, 0xbe, 0x26, 0xa1, 0xb7, 0x82, 0x95, 0xfc, 0x1f, 0xc2, 0x76, 0x2d, 0x90, - 0x06, 0x8a, 0x94, 0xae, 0xd3, 0x5d, 0x81, 0x93, 0x00, 0xbd, 0x01, 0x96, 0xc8, 0x70, 0xc2, 0x95, - 0x0a, 0x36, 0x0f, 0x9a, 0xb2, 0x83, 0x2a, 0x00, 0xbd, 0x0f, 0xbb, 0x58, 0x08, 0xc2, 0x05, 0x96, - 0x62, 0xd6, 0x87, 0x69, 0x96, 0x76, 0x6a, 0x78, 0xd9, 0x6c, 0x01, 0xe5, 0x69, 0x84, 0x73, 0x57, - 0x29, 0xa0, 0x20, 0xaa, 0xc0, 0xbe, 0x93, 0x42, 0x18, 0x00, 0xf8, 0x2c, 0x11, 0x19, 0x8b, 0x22, - 0x92, 0xa9, 0x5e, 0xb2, 0x9c, 0x1a, 0x32, 0xfc, 0xb5, 0x01, 0xe6, 0x29, 0xf3, 0x17, 0x31, 0x49, - 0xc4, 0xda, 0xb3, 0xcf, 0xa1, 0xbf, 0x24, 0x19, 0x9d, 0x52, 0x5f, 0xdf, 0x25, 0x26, 0x62, 0xc6, - 0x02, 0x6e, 0x37, 0x14, 0x65, 0xfb, 0x65, 0x35, 0x7f, 0xa8, 0xc5, 0x9c, 0xab, 0x10, 0xe7, 0x95, - 0xe5, 0x1a, 0xc6, 0xd1, 0xbb, 0xd0, 0xc3, 0x0b, 0x31, 0x93, 0x75, 0xd0, 0x8e, 0xe2, 0xf1, 0x77, - 0x50, 0x55, 0x01, 0xce, 0x49, 0x56, 0x3b, 0xd3, 0x6e, 0xa9, 0xc8, 0x9d, 0x0a, 0xd7, 0x7b, 0xa2, - 0x63, 0x78, 0xd5, 0xc7, 0x29, 0xf6, 0x68, 0x44, 0x45, 0xee, 0x06, 0x24, 0x22, 0xa1, 0xde, 0xb9, - 0xad, 0xe2, 0xfb, 0x2b, 0xe7, 0x69, 0xe5, 0xbb, 0x93, 0x44, 0x93, 0x25, 0x2b, 0xae, 0x63, 0xde, - 0x4d, 0x9a, 0x54, 0xbe, 0xe1, 0xa7, 0x60, 0x96, 0x62, 0x44, 0xbb, 0xd0, 0x94, 0xa3, 0x45, 0x17, - 0x4a, 0x2e, 0x8b, 0x91, 0x91, 0x66, 0x34, 0xc6, 0x59, 0xae, 0xb4, 0xa1, 0x46, 0xc6, 0x85, 0x06, - 0x86, 0x4f, 0xa0, 0x5b, 0x17, 0x69, 0xd5, 0xb2, 0x46, 0xad, 0x65, 0x8b, 0x4d, 0x1b, 0xd5, 0xa6, - 0xc3, 0xdf, 0x0c, 0x68, 0x17, 0x4a, 0x95, 0x07, 0x78, 0x98, 0x93, 0x62, 0x64, 0xea, 0x3c, 0x4b, - 0x22, 0x7a, 0x60, 0x3e, 0x00, 0x4b, 0x6a, 0x3d, 0xc3, 0x82, 0x68, 0x7a, 0x2c, 0x47, 0x8a, 0xdf, - 0x91, 0x36, 0x7a, 0x07, 0x7a, 0x34, 0xa1, 0xc2, 0x0d, 0x31, 0x77, 0x23, 0x1a, 0x53, 0xa1, 0x54, - 0xd9, 0x72, 0xba, 0x12, 0xfd, 0x1a, 0xf3, 0x6f, 0x25, 0x26, 0xc5, 0x44, 0xb9, 0xcb, 0x69, 0xbc, - 0x88, 0xe4, 0x9c, 0x53, 0x83, 0xc3, 0x74, 0x3a, 0x94, 0x7f, 0x5f, 0x42, 0x6a, 0x30, 0x60, 0xee, - 0xc6, 0x8b, 0x48, 0xd0, 0x34, 0xca, 0x95, 0x2c, 0x0d, 0xa7, 0x13, 0x62, 0x7e, 0x5e, 0x40, 0xc3, - 0x3f, 0x0d, 0x30, 0x27, 0x4a, 0xea, 0x22, 0x5f, 0xd3, 0x93, 0x0d, 0x6d, 0xbe, 0xf0, 0x5e, 0x10, - 0x5f, 0x94, 0x33, 0xac, 0x30, 0xef, 0xc8, 0xb4, 0x79, 0x57, 0xa6, 0xe8, 0x09, 0x74, 0x56, 0x2d, - 0xc4, 0x95, 0x6e, 0x3a, 0x47, 0xa8, 0x14, 0xe0, 0xaa, 0x73, 0x9d, 0x7a, 0xd8, 0xbd, 0xfa, 0x6d, - 0xfd, 0x2f, 0xfd, 0x0e, 0x09, 0x6c, 0x5d, 0x2c, 0xbc, 0xa7, 0x64, 0xfd, 0x61, 0xbb, 0xd0, 0x9c, - 0x13, 0xcd, 0x7b, 0xd7, 0x91, 0x4b, 0x39, 0xaf, 0xe7, 0x24, 0xd7, 0xdd, 0xab, 0x9f, 0xd3, 0x9e, - 0x93, 0x5c, 0x75, 0xed, 0xed, 0xb7, 0x6e, 0xae, 0xb5, 0xe4, 0x4f, 0x0d, 0x40, 0xeb, 0x57, 0x5a, - 0x3b, 0xf3, 0xf6, 0x36, 0x8d, 0xb5, 0x92, 0x3d, 0x82, 0x7e, 0xba, 0xf0, 0x22, 0xea, 0xbb, 0xf2, - 0x22, 0x8a, 0x33, 0xa9, 0x97, 0xe2, 0x36, 0x48, 0xfb, 0x9e, 0x92, 0xfc, 0xbc, 0xf4, 0xa0, 0xe7, - 0xb0, 0x53, 0xcb, 0x78, 0x71, 0x39, 0x2f, 0x0b, 0xfd, 0xe1, 0xfd, 0x95, 0x1a, 0x5d, 0x94, 0xfb, - 0x7c, 0x73, 0x39, 0xe7, 0x67, 0x89, 0xc8, 0x72, 0x67, 0x3b, 0xad, 0x63, 0xfb, 0x9f, 0x03, 0x5a, - 0x0f, 0x2a, 0x4b, 0x56, 0xf4, 0x90, 0x2c, 0x59, 0x1f, 0x5a, 0x4b, 0x1c, 0x2d, 0xca, 0xd1, 0xaa, - 0x8d, 0x4f, 0x1a, 0x1f, 0x1b, 0x5f, 0x7e, 0xf6, 0xfb, 0xf5, 0xc0, 0x78, 0x79, 0x3d, 0x30, 0xfe, - 0xba, 0x1e, 0x18, 0x3f, 0xdf, 0x0c, 0x36, 0x5e, 0xde, 0x0c, 0x36, 0xfe, 0xb8, 0x19, 0x6c, 0xfc, - 0x38, 0x0c, 0xa9, 0x98, 0x2d, 0xbc, 0x91, 0xcf, 0xe2, 0x31, 0x4b, 0x38, 0x4b, 0xb2, 0xf1, 0xec, - 0x12, 0xe7, 0xe3, 0xab, 0xb1, 0xfc, 0x58, 0xa9, 0x5f, 0x95, 0xb7, 0xa5, 0x3e, 0x41, 0xc7, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x81, 0xc0, 0xc2, 0xed, 0x6c, 0x09, 0x00, 0x00, -} - -func (m *AssetInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AssetInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IbcPort) > 0 { - i -= len(m.IbcPort) - copy(dAtA[i:], m.IbcPort) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPort))) - i-- - dAtA[i] = 0x72 - } - if len(m.IbcChannel) > 0 { - i -= len(m.IbcChannel) - copy(dAtA[i:], m.IbcChannel) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(m.IbcPath) > 0 { - i -= len(m.IbcPath) - copy(dAtA[i:], m.IbcPath) - i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(m.CoingeckoId) > 0 { - i -= len(m.CoingeckoId) - copy(dAtA[i:], m.CoingeckoId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(m.ImageUrl) > 0 { - i -= len(m.ImageUrl) - copy(dAtA[i:], m.ImageUrl) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x42 - } - if m.Decimals != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(m.OriginDenom) > 0 { - i -= len(m.OriginDenom) - copy(dAtA[i:], m.OriginDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginDenom))) - i-- - dAtA[i] = 0x32 - } - if len(m.OriginChain) > 0 { - i -= len(m.OriginChain) - copy(dAtA[i:], m.OriginChain) - i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginChain))) - i-- - dAtA[i] = 0x2a - } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetType))) - i-- - dAtA[i] = 0x22 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChainInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChainInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FeeInfo != nil { - { - size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Explorer != nil { - { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.RestEndpoints) > 0 { - for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.GrpcEndpoints) > 0 { - for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.GenesisTime) > 0 { - i -= len(m.GenesisTime) - copy(dAtA[i:], m.GenesisTime) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Credential) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Credential) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x3a - } - if len(m.DisplayName) > 0 { - i -= len(m.DisplayName) - copy(dAtA[i:], m.DisplayName) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DisplayName))) - i-- - dAtA[i] = 0x32 - } - if len(m.AttestationType) > 0 { - i -= len(m.AttestationType) - copy(dAtA[i:], m.AttestationType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AttestationType))) - i-- - dAtA[i] = 0x2a - } - if len(m.Transport) > 0 { - for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Transport[iNdEx]) - copy(dAtA[i:], m.Transport[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Transport[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.CredentialId) > 0 { - i -= len(m.CredentialId) - copy(dAtA[i:], m.CredentialId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialId))) - i-- - dAtA[i] = 0x1a - } - if len(m.CredentialType) > 0 { - i -= len(m.CredentialType) - copy(dAtA[i:], m.CredentialType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Document) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Document) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = 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 *Endpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsPrimary { - i-- - if m.IsPrimary { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExplorerInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Url) > 0 { - i -= len(m.Url) - copy(dAtA[i:], m.Url) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FeeInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FeeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GasMultiply != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) - i-- - dAtA[i] = 0x29 - } - if m.IsSimulable { - i-- - if m.IsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.InitGasLimit != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.InitGasLimit)) - i-- - dAtA[i] = 0x18 - } - if len(m.FeeRates) > 0 { - for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FeeRates[iNdEx]) - copy(dAtA[i:], m.FeeRates[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintTypes(dAtA, i, uint64(len(m.BaseDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Identity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Identity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Identity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PubKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PubKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(m.KeyType) > 0 { - i -= len(m.KeyType) - copy(dAtA[i:], m.KeyType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VerificationMethod) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - 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 *AssetInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AssetType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginChain) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.OriginDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovTypes(uint64(m.Decimals)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ImageUrl) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CoingeckoId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsEnabled { - n += 2 - } - l = len(m.IbcPath) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcChannel) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.IbcPort) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ChainInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.GenesisTime) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.GrpcEndpoints) > 0 { - for _, e := range m.GrpcEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.RestEndpoints) > 0 { - for _, e := range m.RestEndpoints { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.Explorer != nil { - l = m.Explorer.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.FeeInfo != nil { - l = m.FeeInfo.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Credential) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Transport) > 0 { - for _, s := range m.Transport { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.AttestationType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DisplayName) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Document) Size() (n int) { - if m == nil { - return 0 - } - 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 *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.IsPrimary { - n += 2 - } - return n -} - -func (m *ExplorerInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Url) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *FeeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.FeeRates) > 0 { - for _, s := range m.FeeRates { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if m.InitGasLimit != 0 { - n += 1 + sovTypes(uint64(m.InitGasLimit)) - } - if m.IsSimulable { - n += 2 - } - if m.GasMultiply != 0 { - n += 9 - } - return n -} - -func (m *Identity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *PubKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.KeyType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *VerificationMethod) Size() (n int) { - if m == nil { - return 0 - } - 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 *AssetInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 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: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChainInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrpcEndpoints = append(m.GrpcEndpoints, &Endpoint{}) - if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RestEndpoints = append(m.RestEndpoints, &Endpoint{}) - if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explorer == nil { - m.Explorer = &ExplorerInfo{} - } - if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeInfo == nil { - m.FeeInfo = &FeeInfo{} - } - if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Credential) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Credential: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if m.CredentialId == nil { - m.CredentialId = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Document) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 *Endpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsPrimary = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExplorerInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExplorerInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Url = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FeeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FeeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) - } - m.InitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSimulable = bool(v != 0) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.GasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Identity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Identity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PubKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerificationMethod) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - 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") -)