Compare commits

...
572 Commits
Author SHA1 Message Date
Prad Nukala ee2ba1745e fix: License 2025-10-04 11:24:13 -04:00
Prad NukalaandGitHub 0bfaf26357 Create LICENSE
Signed-off-by: Prad Nukala <prad@sonr.io>
2025-10-04 11:21:29 -04:00
Prad Nukala 8ed37f02f3 bump: version 0.0.1 → 0.0.2 2025-10-04 08:58:48 -04:00
Prad Nukala c3dbb04f21 bump: version 0.0.1 → 0.0.2 2025-10-04 08:58:44 -04:00
Prad Nukala 5bc00c5481 bump: version 0.0.1 → 0.0.2 2025-10-04 08:58:16 -04:00
Prad Nukala 6ef7b8ea2d fix: Changelog 2025-10-04 08:58:06 -04:00
Prad Nukala 11d318dc00 bump: version 0.0.1 → 0.0.2 2025-10-04 08:56:10 -04:00
Prad NukalaandGitHub 6f6a20922c chore/devbox plugin (#1301)
* chore: Add Homebrew Casks for snrd/hway

* fix: Tag bump format for npm packages

* chore: Remove plugin setup
2025-10-04 08:55:54 -04:00
Prad Nukala e4450f52a4 fix: goreleaser nix build and url map 2025-10-03 15:10:29 -04:00
Prad Nukala eea48a43b4 bump: version 0.0.0 → 0.0.1 2025-10-03 14:59:45 -04:00
Prad Nukala 6595d4fde1 bump: version 0.0.0 → 0.0.1 2025-10-03 14:54:24 -04:00
Prad Nukala ce55341871 bump: version 0.0.0 → 0.0.1 2025-10-03 14:54:08 -04:00
Prad Nukala 4d0ec9f693 bump: version 0.0.0 → 0.0.1 2025-10-03 14:51:18 -04:00
Prad Nukala 8c31e71804 fix: Remove Changelogs 2025-10-03 14:49:51 -04:00
Prad NukalaandGitHub 13e6c3e84d Master (#1262)
* clear

* feat: Add everything

* fix: Commenht
2025-10-03 14:45:52 -04:00
Prad N 43b4a11c06 docs: add coding guidelines for contributors 2025-04-05 21:43:51 -04:00
Prad N c249c722e1 feat: enhance task management with Taskfile schema validation 2025-04-04 01:29:59 -04:00
Prad N 8b510c1db1 docs: establish codebase conventions and developer guidelines 2025-03-30 22:52:04 -04:00
Prad NukalaandGitHub d3346a6fe6 Update README.md
Signed-off-by: Prad Nukala <prad@sonr.io>
2025-03-27 04:37:54 -04:00
Prad N f0c3230a89 bump: version 0.6.3 → 0.6.4 2025-03-27 04:33:49 -04:00
Prad N 325b2fe4cb ci: remove release workflow 2025-03-27 04:27:03 -04:00
Prad N 85162f2ea6 ci: streamline release workflow triggers 2025-03-27 04:23:42 -04:00
Prad N 9208df92f3 feat: enable GitHub Actions to trigger releases 2025-03-27 04:23:02 -04:00
de72e6186f feat: enhance development environment with ripgrep and gh-milestone (#1252)
Co-authored-by: Prad N <prad@didao.xyz>
2025-03-27 04:21:05 -04:00
240fc5c1ef feat: enhance release process with Doppler integration (#1251)
Co-authored-by: Prad N <prad@didao.xyz>
2025-03-27 04:17:20 -04:00
836963163c Feature/auto releases (#1250)
* refactor: rename project from onsonr/sonr to sonr-io/snrd (#1249)

* refactor: rename project from onsonr/sonr to sonr-io/snrd

* refactor: update package paths to use sonr-io org

---------

Co-authored-by: Prad N <prad@didao.xyz>

* feat: introduce devbox for consistent development environment

* feat: integrate Doppler for secrets management

* feat: streamline release process with Devbox

* <no value>

* bump: version 0.6.3 → 0.6.4

* feat: enable commit-less version bumping

* bump: version 0.6.4 → 0.6.5

* feat: streamline release process and update project metadata

* feat: streamline build process and configuration

* feat: streamline build process by removing release target

* bump: version 0.6.5 → 0.6.6

* feat: upgrade to go 1.24 and align binary name

* bump: version 0.6.6 → 0.6.7

* feat: streamline release process and update project metadata

* bump: version 0.6.3 → 0.6.4

* feat: streamline development and release processes

* feat: streamline development and release processes

* refactor: streamline release process with Taskfile

* feat: enhance goreleaser output with title for better UX

* feat: consolidate release notes

* bump: version 0.6.3 → 0.6.4

* feat: streamline release process with improved automation

* feat: streamline development and release workflow

* bump: version 0.6.3 → 0.6.4

* feat: streamline release process with Taskfile and conventional commits

* bump: version 0.6.4 → 0.6.5

* feat: enhance Docker image publishing with piped credentials

* chore: remove outdated changelog entries

* bump: version 0.6.3 → 0.6.4

* feat: improve release process with interactive feedback

* feat: enhance release process with real-time version feedback

* bump: version 0.6.4 → 0.6.5

* feat: enhance release process with dynamic version display and streamlined automation

* bump: version 0.6.3 → 0.6.4

* refactor: streamline release process by removing redundant version display

* bump: version 0.6.4 → 0.6.5

* refactor: streamline release process and simplify dev environment

* bump: version 0.6.3 → 0.6.4

* ci: simplify PR checks by removing redundant release validation

* refactor: consolidate release workflows for improved maintainability

* ci: enhance release workflow for automated version publishing

---------

Co-authored-by: Prad N <prad@didao.xyz>
2025-03-27 04:14:38 -04:00
Prad N ff3fd631f7 chore: remove taskfile configurations 2025-03-21 21:27:38 -04:00
Prad N bf4a7440be feat: automate release process with conventional commits 2025-03-21 21:26:26 -04:00
Prad N 8b4d51ee30 feat: streamline app initialization and dependency management 2025-03-19 14:47:22 -04:00
Prad N 00b23353c9 fix: Refactor crypto 2025-03-11 13:57:03 -04:00
Prad N 090ee30ba3 feat: enable task management with Taskfile 2025-03-07 14:38:51 -05:00
Prad N 77bbf6bba7 feat: introduce Taskfile automation for build and deployment 2025-03-05 19:22:04 -05:00
root fcc915a115 fix: Deploy config 2025-01-16 18:22:14 -05:00
Prad N f566b7d6c1 refactor: remove evmos chain from deployment configuration 2025-01-11 23:27:50 -05:00
root b12bc88eda feat(deploy): add hdPath and coinType to sonr-1 chain config 2025-01-12 02:21:13 +00:00
Prad N 2892641f17 refactor: simplify deployment infrastructure using starship 2025-01-11 14:57:58 -05:00
Prad N 20317bbc91 style: improve release name format 2025-01-11 13:55:49 -05:00
Prad Nukala 8d218dddaa Add Slack notification workflow 2025-01-11 13:08:04 -05:00
Prad N d73f49bd24 refactor: remove unnecessary Caddyfile 2025-01-11 12:25:05 -05:00
Prad N bd9234572a ci: improve CI/CD process with devbox integration 2025-01-11 12:24:55 -05:00
Prad N 96eff9dffa fix: resolve minor formatting inconsistencies in Dockerfile and accumulator.go 2025-01-11 09:32:12 -05:00
Prad N a06bae6348 refactor: remove process-compose and individual start scripts 2025-01-09 20:09:16 -05:00
root 2d3d1929a0 docs: remove outdated testnet documentation 2025-01-07 11:19:04 -05:00
root 79706e32e3 feat: add go dependency and enhance devbox environment variables 2025-01-07 11:16:47 -05:00
root f8974b3d1f feat: implement HTMX for dynamic updates 2025-01-06 19:38:17 -05:00
root ddacc127c6 chore: update devbox packages to include Doppler 2025-01-06 18:14:55 -05:00
root edb02f3002 docs(scopes): improve keywords and add new documentation links 2025-01-06 15:10:10 -05:00
root 68e7cebb73 refactor: remove devnet and testnet network configurations 2025-01-06 14:46:39 -05:00
root eb2213f6a7 feat: add CI/CD infrastructure for development and deployment 2025-01-06 14:38:51 -05:00
root d137aa97f9 fix: correct typo in workflow name 2025-01-06 14:25:56 -05:00
github-actions[bot] b319fc5378 chore: sync version to 0.6.3 [skip ci] 2025-01-06 19:24:04 +00:00
root f458df70fc chore: add release date to merge workflow 2025-01-06 14:23:37 -05:00
root b95e2ee08e feat: Add release date to workflow environment 2025-01-06 14:23:15 -05:00
root 0431e571e4 fix: revert version number to 0.6.2 2025-01-06 14:22:17 -05:00
github-actions[bot] b94eccd075 chore: sync version to 0.6.3 [skip ci] 2025-01-06 19:20:53 +00:00
root 3f63adc411 fix: checkout main branch before updating version 2025-01-06 14:20:22 -05:00
root 8ed58bf51c fix: Specify main branch and fetch tags in merge workflow 2025-01-06 14:18:42 -05:00
root 505b847790 ci: Add dependency on sync-version job in new-release job 2025-01-06 14:14:42 -05:00
root 63b263f995 chore: add GitHub Actions workflow to synchronize version after tag creation 2025-01-06 14:13:53 -05:00
root 8919019bf3 refactor: Rename workflow file for clarity 2025-01-06 14:09:14 -05:00
root 3288307f1c feat: automate release creation and deployment on tag push 2025-01-06 14:07:02 -05:00
root 1915e06412 ci: Use goreleaser action for releases on new tags 2025-01-06 14:03:28 -05:00
github-actions[bot] 866468c002 bump: version 0.6.1 → 0.6.2 2025-01-06 19:00:34 +00:00
7f3aa01bd5 feature/1220 origin handle exists method (#1243)
* feat: add docs and CI workflow for publishing to onsonr.dev

* (refactor): Move hway,motr executables to their own repos

* feat: simplify devnet and testnet configurations

* refactor: update import path for didcrypto package

* docs(networks): Add README with project overview, architecture, and community links

* refactor: Move network configurations to deploy directory

* build: update golang version to 1.23

* refactor: move logger interface to appropriate package

* refactor: Move devnet configuration to networks/devnet

* chore: improve release process with date variable

* (chore): Move Crypto Library

* refactor: improve code structure and readability in DID module

* feat: integrate Trunk CI checks

* ci: optimize CI workflow by removing redundant build jobs

* feat: integrate Trunk CI checks, simplify devnet and testnet configurations, add docs and CI for onsonr.dev publishing, automate releases using Taskfile and GitHub Actions, and add Reddit release notification

* ci: Trigger release validation on pull requests

* ci: Migrate GoReleaser configuration to Makefiles

* chore: update CI workflow permissions and rename job

* refactor: remove unnecessary docker push steps from release process

* feat: automate release process using Taskfile and GitHub Actions

* fix: change shebang from bash to sh

* chore: update setup script shebang to bash

* chore: remove unnecessary setup-env step from release process

* test: improve test descriptions and naming for clarity

* refactor: rename workflow files for clarity

* refactor: rename post-merge workflow file

* refactor: Move race and coverage tests to separate workflow

* refactor: simplify merge group trigger

* chore: prevent accidental release overwriting of existing tags

* test: rename GoReleaser Dry Run step to GoReleaser Test

* fix: correct GitHub Actions workflow for version bumping

* fix: Correct tag validation in CI workflow

* refactor: simplify GitHub Actions workflow for version checking

* test: replace version check with make command

* chore: update setup-python action to v5

* test: rename workflow job and remove unnecessary steps

* feat: enable workflow on merge group events

---------

Signed-off-by: Prad Nukala <prad@sonr.io>
Co-authored-by: Darp Alakun <i@prad.nu>
2025-01-06 14:00:11 -05:00
root 2f65b1c283 refactor: simplify release process and remove unnecessary tasks 2025-01-06 13:12:38 -05:00
root 48f7b5d5cc chore: update version number to 0.6.1 2025-01-06 13:09:38 -05:00
d26d3d7b4d feature/1220 origin handle exists method (#1242)
* feat: add docs and CI workflow for publishing to onsonr.dev

* (refactor): Move hway,motr executables to their own repos

* feat: simplify devnet and testnet configurations

* refactor: update import path for didcrypto package

* docs(networks): Add README with project overview, architecture, and community links

* refactor: Move network configurations to deploy directory

* build: update golang version to 1.23

* refactor: move logger interface to appropriate package

* refactor: Move devnet configuration to networks/devnet

* chore: improve release process with date variable

* (chore): Move Crypto Library

* refactor: improve code structure and readability in DID module

* feat: integrate Trunk CI checks

* ci: optimize CI workflow by removing redundant build jobs

* feat: integrate Trunk CI checks, simplify devnet and testnet configurations, add docs and CI for onsonr.dev publishing, automate releases using Taskfile and GitHub Actions, and add Reddit release notification

* ci: Trigger release validation on pull requests

* ci: Migrate GoReleaser configuration to Makefiles

* chore: update CI workflow permissions and rename job

---------

Co-authored-by: Darp Alakun <i@prad.nu>
2025-01-06 17:24:48 +00:00
807b2e86ec feature/1220 origin handle exists method (#1241)
* feat: add docs and CI workflow for publishing to onsonr.dev

* (refactor): Move hway,motr executables to their own repos

* feat: simplify devnet and testnet configurations

* refactor: update import path for didcrypto package

* docs(networks): Add README with project overview, architecture, and community links

* refactor: Move network configurations to deploy directory

* build: update golang version to 1.23

* refactor: move logger interface to appropriate package

* refactor: Move devnet configuration to networks/devnet

* chore: improve release process with date variable

* (chore): Move Crypto Library

* refactor: improve code structure and readability in DID module

* feat: integrate Trunk CI checks

* ci: optimize CI workflow by removing redundant build jobs

---------

Co-authored-by: Darp Alakun <i@prad.nu>
2025-01-06 17:06:10 +00:00
root 9bd5e41fa0 docs: add .gitignore entries for Aider generated files 2025-01-03 11:44:12 -05:00
Prad Nukala 2ae32b2f64 refactor: remove devcontainer configuration 2025-01-01 16:21:42 -05:00
Prad Nukala ef7c33a011 chore: disable Reddit release announcement 2025-01-01 15:49:01 -05:00
Prad Nukala ac8250557d refactor: simplify release workflow and remove unnecessary Taskfile includes 2025-01-01 15:42:11 -05:00
Prad Nukala 8764e93437 refactor: improve release process using goreleaser and taskfile 2025-01-01 15:34:51 -05:00
Prad Nukala 8224fd3683 fix: pass working directory to goreleaser task 2025-01-01 15:28:15 -05:00
Prad Nukala a5dd620b17 feat: automate release process using Taskfile and GitHub Actions 2025-01-01 15:22:40 -05:00
Prad Nukala 57bce7d50e ci: Enable remote taskfiles in release workflow 2025-01-01 15:15:24 -05:00
Prad Nukala 5c5e909ffd refactor: simplify release workflow using a single task 2025-01-01 15:13:22 -05:00
Prad Nukala 0cf308016b ci: improve release workflow by adding task installation step 2025-01-01 15:12:46 -05:00
Prad Nukala 9787394d5a fix: correct release name template syntax 2025-01-01 14:58:02 -05:00
Prad Nukala a90111907d refactor: improve release naming and environment variable handling 2025-01-01 14:52:37 -05:00
Prad Nukala 7c8fa0045c Merge branch 'feature/1232-create-vault-settings' into feature/1220-origin-handle-exists-method 2025-01-01 14:31:18 -05:00
Prad Nukala 0eb5530422 feat: add Reddit release notification 2025-01-01 14:30:34 -05:00
Prad Nukala a90a553222 refactor: improve goreleaser archive and nfpms configuration 2025-01-01 14:11:36 -05:00
Prad Nukala aee9af7b34 chore: update next milestone in scopes.json 2025-01-01 13:55:21 -05:00
Prad Nukala 571fb6100b refactor: remove outdated scopes 2024-12-30 14:18:33 -05:00
Prad Nukala 0a7b7d9fe2 refactor: remove unnecessary seed message 2024-12-30 12:31:55 -05:00
Prad Nukala (aider) afc6343c21 fix: Handle only 500 errors in ErrorHandler 2024-12-29 13:19:21 -05:00
Prad Nukala bb0e8495d3 fix: Return only on 500 errors in error handler 2024-12-29 13:19:20 -05:00
Prad Nukala (aider) 26a322a5ea fix: update sqlc queries to match schema and use SQLite conventions 2024-12-29 01:22:19 -05:00
Prad Nukala 014ce98359 refactor: Update sqlc queries to match schema and sqlite conventions 2024-12-29 01:22:18 -05:00
Prad Nukala (aider) ddf2f6232a ```
refactor: convert schema to SQLite
```
2024-12-29 01:20:47 -05:00
Prad Nukala 2486ff3c94 feat: convert highway sink schema to SQLite 2024-12-29 01:20:46 -05:00
Prad Nukala (aider) 9b0a78adda fix: Rename DecodeWasmContext to decodeWasmContext 2024-12-29 00:42:28 -05:00
Prad Nukala b727a52193 fix: resolve lint errors in WASMMiddleware function 2024-12-29 00:42:27 -05:00
Prad Nukala e0d4427153 <no value> 2024-12-28 23:53:54 -05:00
Prad Nukala 356093d08a refactor: move gateway and vault components to new locations 2024-12-28 18:08:59 -05:00
Prad Nukala b0a91ddf14 build: update dependencies 2024-12-28 14:52:43 -05:00
Prad aa8f8c004f chore(dependabot): update dependabot configuration 2024-12-27 06:23:10 +00:00
Prad d8e5bc9f37 chore(scripts): improve new issue script confirmation 2024-12-26 19:32:23 +00:00
Prad 75adb6200d refactor(scopes): simplify scopes.json structure 2024-12-26 19:20:32 +00:00
Prad 92df0375dd feat(scopes): add Web Authentication API documentation 2024-12-24 23:38:00 +00:00
Prad d6f6023d8b chore(.github): update keywords in scopes.json 2024-12-24 23:36:05 +00:00
Prad 3c450ad795 docs(scopes.json): add more specific keywords to documentation links 2024-12-24 23:33:27 +00:00
Prad 4ce9a45912 refactor(scopes): rename and reorganize scopes 2024-12-24 23:07:44 +00:00
Prad 68aa232368 refactor(api): remove unused Allocate RPC from Query service 2024-12-24 18:52:03 +00:00
Prad Nukala 2545ab5748 refactor: remove postgresql tasks 2024-12-24 12:02:19 -05:00
Prad Nukala a5c17cb3db feat: add install script for Sonr binaries 2024-12-24 12:01:20 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
280b441a4b chore(deps): bump github.com/jackc/pgx/v5 from 5.7.1 to 5.7.2 (#1211)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.1 to 5.7.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-12-24 16:56:40 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
145499e1e4 chore(deps): bump github.com/cosmos/cosmos-db from 1.0.2 to 1.1.1 (#1207)
Bumps [github.com/cosmos/cosmos-db](https://github.com/cosmos/cosmos-db) from 1.0.2 to 1.1.1.
- [Changelog](https://github.com/cosmos/cosmos-db/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cosmos/cosmos-db/compare/v1.0.2...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-db
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-12-24 16:56:34 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
0ccfa47e7b chore(deps): bump google.golang.org/protobuf from 1.35.2 to 1.36.0 (#1210)
Bumps google.golang.org/protobuf from 1.35.2 to 1.36.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-12-24 16:56:25 +00:00
Prad Nukala e2735d5cd1 refactor: remove unused AI PR body generator step 2024-12-24 11:49:42 -05:00
Prad Nukala 5eb1f0d0a9 ci: improve CI workflow efficiency by removing merge 2024-12-24 11:46:10 -05:00
Prad Nukala a3652e3f2f chore: upgrade actions to latest versions 2024-12-24 11:44:15 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
7d344ef854 chore(deps): bump cosmossdk.io/api from 0.7.5 to 0.7.6 (#1209)
Bumps [cosmossdk.io/api](https://github.com/cosmos/cosmos-sdk) from 0.7.5 to 0.7.6.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cosmos/cosmos-sdk/compare/api/v0.7.5...api/v0.7.6)

---
updated-dependencies:
- dependency-name: cosmossdk.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-12-24 16:43:02 +00:00
Prad Nukala 378d259895 fix: prevent automatic version bumps from dependabot 2024-12-24 11:40:15 -05:00
Prad Nukala 3bbec0ebed refactor: simplify Taskfile and remove unused chain configurations 2024-12-24 11:36:02 -05:00
Prad Nukala 4c9919f0a0 fix: correct merge workflow to increment patch version 2024-12-24 11:32:47 -05:00
github-actions[bot] c77bf5d1ea bump: version 0.5.27 → 0.6.0 2024-12-24 16:25:16 +00:00
Prad NukalaandGitHub 143053e355 test: Add commitizen dry run step to checks workflow (#1217) 2024-12-24 16:24:04 +00:00
Prad NukalaandGitHub 47c3a53080 refactor/internal (#1216)
* refactor: update import paths in gateway handlers

* refactor: remove obsolete devtools Makefile and README

* build: optimize build process for improved efficiency

* refactor: remove obsolete pkl files related to Matrix and Sonr network configurations

* refactor: move embed code to x/dwn/types
2024-12-24 16:10:20 +00:00
Prad NukalaandGitHub 0ec2f7d86a feature/1214 session fetch refactor (#1215)
* chore(docs): remove token economy guide

* refactor(context): update GatewayContext to use Querier interface

* chore(database): update schema path

* docs: Update READMEs for x/did, x/dwn, and x/svc with UCAN integration

* chore(pkg): update database scope name

* refactor(did): optimize GenesisState proto methods

* refactor(svc): update Service proto to use repeated fields

* refactor(api): rename MsgSpawn to MsgInitialize
2024-12-24 15:38:17 +00:00
Prad Nukala 398864fc6b refactor: rename DID, DWN, and SVC modules to core-dids, core-dwns, and core-svcs respectively 2024-12-24 03:37:27 -05:00
Prad Nukala 630e4ad7f0 refactor: rename MsgInitialize to MsgSpawn for clarity 2024-12-24 00:59:42 -05:00
Prad Nukala 7e50d7f76d refactor: rename scopes in .github/scopes.json for better clarity 2024-12-23 20:35:34 -05:00
Prad 9dfb8634bc chore(workflows): improve CI/CD workflow names 2024-12-23 18:42:34 +00:00
Prad Nukala 9556faabb9 feat: Add option to create draft issues from the new-issue script 2024-12-23 13:35:52 -05:00
Prad c9cc4042db chore(release): remove version bumping workflow 2024-12-23 15:37:07 +00:00
Prad fc9995dd40 chore(configs): remove unused logs config file 2024-12-23 15:34:45 +00:00
Prad 5cc450c170 chore(dependencies): remove PostgreSQL lockfile 2024-12-23 15:33:14 +00:00
Prad NukalaandGitHub d3cfd27f5a Fix/actions (#1213)
* ci(release): trigger release on main branch push

* chore(release): update release workflow to use main branch
2024-12-23 02:14:04 +00:00
Prad NukalaandGitHub 30c984fd90 Feature/deploy linux (#1212)
* chore(deploy): remove devbox configuration

* feat(taskfiles): add mount and platform specific start commands for IPFS

* feat(gateway): update registration route

---------

Signed-off-by: Prad Nukala <prad@sonr.io>
2024-12-23 02:05:51 +00:00
Prad NukalaandGitHub 4d6a8628af feature/deploy linux (#1206)
* chore(deploy): remove devbox configuration

* feat(taskfiles): add mount and platform specific start commands for IPFS
2024-12-22 23:43:30 +00:00
Prad 59b561d2d9 ci(publish): trigger workflow on release creation 2024-12-22 22:14:15 +00:00
Prad 77fe287a0b chore(release): remove unnecessary dependencies in release workflow 2024-12-22 22:13:14 +00:00
Prad NukalaandGitHub d69c2a9d53 feature/refactor ui (#1205)
* fix: correct HTTP error handling in gateway

* refactor: migrate database and ORM to internal modules

* feat: introduce taskfile build system for improved workflow management

* refactor: update taskfiles to use relative paths

* feat: add profile status field

* refactor: move rendering logic to context package

* fix: improve error handling in credentials retrieval

* refactor: optimize HTTP request handling in Wasm environment

* refactor: refactor config loading in motr command

* chore: add process-compose for service management

* chore: remove default task and update gum format command

* fix: update project dependencies

* refactor: improve code readability and maintainability

* refactor: consolidate error handling components

* refactor: update index handler to use new context package

* refactor: consolidate database scripts and move to deploy directory

* feat: Update flake.nix with development tools and environment configuration

* fix: ignore flake.lock file

* refactor: migrate build process to use taskfiles for improved modularity and maintainability

* refactor: improve GatewayContext and reorganize handlers

* refactor: Remove unused profile creation functions

* (chore): templ generation

* test: add test file for vaults.go

* maintenance: remove defunct Discord server link

* docs: update checks workflow documentation

* test: remove obsolete vaults test file

* refactor: move version bumping logic to release workflow
2024-12-22 17:01:11 -05:00
Prad Nukala c9004e75df refactor: update testnet configuration 2024-12-20 11:12:02 -05:00
Prad 52041fe3d6 chore(scripts): use sonr project and test config in doppler secrets 2024-12-19 17:07:36 +00:00
Prad b9ad8e1e78 style(scripts): remove unnecessary comments 2024-12-19 17:00:08 +00:00
Prad NukalaandGitHub 920703c0c7 refactor: optimize GitHub Actions workflow triggers (#1204) 2024-12-19 12:12:19 +00:00
Prad NukalaandGitHub 77298c79af fix/ci cd (#1197)
* chore: remove deprecated label-pr workflow

* chore: reduce Dependabot update frequency to monthly

* ci: adjust CI to account for removed db reset

* refactor: improve CI/CD workflows for release and checks
2024-12-19 06:49:21 -05:00
Prad NukalaandGitHub 9d86dad38d Fix/hway db driver (#1198)
* fix/hway-db-driver

* fix/hway-db-driver

* chore(scripts): add tx indexer and psql connection to test

* fix(scripts): make testnet setup more robust and configurable
2024-12-19 11:22:44 +00:00
Prad 36191d2bd4 refactor: Move embed 2024-12-19 00:50:45 +00:00
Prad 265aec187e fix: Sink 2024-12-19 00:48:42 +00:00
Prad NukalaandGitHub 6072f6ecfa feature/implement wss routes (#1196)
* feat(database): create schema for hway and motr

* fix(gateway): correct naming inconsistencies in handlers

* build: update schema file to be compatible with postgresql syntax

* fix: update schema to be compatible with PostgreSQL syntax

* chore: update query_hway.sql to follow sqlc syntax

* ```text
refactor: update query_hway.sql for PostgreSQL and sqlc
```

* feat: add vaults table to store encrypted data

* refactor: Update vaults table schema for sqlc compatibility

* chore(deps): Upgrade dependencies and add pgx/v5

* refactor(Makefile): move sqlc generate to internal/models

* docs(foundations): remove outdated pages

* chore(build): add Taskfile for build tasks

* refactor(embed): move embed files to internal package

* docs: add documentation for Cosmos SDK ORM
2024-12-18 20:53:45 +00:00
Prad Nukala fc001216a8 chore: ignore interchaintest downloader files 2024-12-17 05:26:09 +00:00
github-actions[bot] 354fdabdc4 bump: version 0.5.26 → 0.5.27 2024-12-16 20:33:10 +00:00
Prad NukalaandGitHub 7c4586ce90 feature/simplify ucan mpc did (#1195)
* feat: enable DID auth middleware

* feat: implement passkey creation flow

* feat: persist user address in cookie and retrieve user profile using address cookie

* feat: implement human verification challenge during session initialization

* refactor: remove unnecessary random number generation in profile creation

* refactor: rename credential validation handler and update related routes

* feat: improve profile validation and user experience

* feat: add page rendering for profile and passkey creation

* refactor: remove unused register handler and update routes

* refactor: remove unused imports and simplify credential validation

* fix: Correct insecure gRPC client connection

* refactor: rename models files for better organization

* refactor: refactor grpc client creation and management

* refactor: refactor common clients package

* <no value>

* feat: add CapAccount, CapInterchain, CapVault enums

* feat: add ChainId to ResAccount and ResInterchain

* feat: add asset code to resource account enumeration

* refactor: rename services package to providers

* feat: implement gateway database interactions

* refactor: move gateway repository to internal/gateway

* refactor: Migrate database provider to use sqlx

* refactor: Rename Vaults to VaultProvider in HTTPContext struct

* refactor: Migrate from GORM to sqlc Queries in database context methods

* refactor: Replace GORM with standard SQL and simplify database initialization

* refactor: Migrate session management from GORM to sqlc with type conversion

* refactor: Update import paths and model references in context package

* fix: Resolve session type conversion and middleware issues

* refactor: Migrate database from GORM to sqlx

* refactor: Move models to pkg/common, improve code structure

* refactor: move repository package to internal directory

* refactor: move gateway internal packages to context directory

* refactor: migrate database provider to use sqlx queries

* feat: add session ID to HTTP context and use it to load session data

* feat: implement vault creation API endpoint

* feat: add DIDKey generation from PubKey

* refactor: remove unused DIDAuth components

* refactor: move DID auth controller to vault context

* chore: remove unused DIDAuth package

* refactor: improve clarity of enclave refresh function

* feat: implement nonce-based key encryption for improved security

* feat: Add Export and Import methods with comprehensive tests for Enclave

* fix: Validate AES key length in keyshare encryption and decryption

* fix: Resolve key length validation by hashing input keys

* refactor: Update keyshare import to use protocol decoding

* feat: Refactor enclave encryption to support full enclave export/import

* refactor: Simplify Enclave interface methods by removing role parameter

* refactor: remove unnecessary serialization from enclave interface

* refactor: rename models package in gateway context

* refactor: rename keystore vault constants

* refactor: remove context parameter from Resolver methods

* feat: add CurrentBlock context function and update related components

* refactor: rename resolver.go to resolvers.go

* feat: Add SQLite random() generation for session and profile initialization

* refactor: Update SQL queries to use SQLite-style parameter placeholders

* refactor: Replace '?' placeholders with '$n' PostgreSQL parameter syntax

* <no value>

* refactor: refactor gateway to use middleware for database interactions and improve modularity

* feat: implement gateway for Sonr highway

* refactor: Remove unused gateway context and refactor cookie/header handling

* refactor: improve server initialization and middleware handling

* feat: implement human verification for profile creation

* feat: implement session management middleware

* refactor: refactor common models and config to internal package

* refactor: move env config to internal/config

* refactor: move database-related code to  directory

* refactor: move IPFS client to common package and improve code structure

* refactor: move querier to common package and rename to chain_query

* refactor: move webworker model to internal/models

* feat: add initial view template for Sonr.ID

* docs(concepts): Add documentation for cosmos-proto

* docs: move IBC transfer documentation to tools section

* refactor: rename initpkl.go to pkl_init.go for better naming consistency

* docs(theme): update dark mode toggle icons

* refactor: update sqlite3 driver to ncruces/go-sqlite3

* feat: add Vault model and database interactions

* refactor: Improve SQLite schema with better constraints and indexes

* chore: update project dependencies

* fix: use grpc.WithInsecure() for gRPC connection

* config: set localhost as default Sonr gRPC URL

* refactor: improve gateway middleware and refactor server initialization

* refactor: Remove foreign key pragma from schema SQL

* refactor: Remove foreign key constraints from database schema

* refactor: Convert primary key columns from INTEGER to TEXT

* refactor: Remove unnecessary redirect in error handling
2024-12-16 20:29:54 +00:00
Prad Nukala 6d27b926f6 Merge branch 'master' into develop 2024-12-13 15:28:42 -05:00
github-actions[bot] f74bdc1d79 bump: version 0.5.25 → 0.5.26 2024-12-13 20:28:05 +00:00
Prad Nukala 8522cb8d47 test: remove unnecessary tests from CI 2024-12-13 15:27:44 -05:00
Prad Nukala 30475b9fbd Merge branch 'develop' 2024-12-13 15:23:14 -05:00
Prad Nukala 1388a673e5 ci: Implement comprehensive CI/CD workflow with build, unit, race, and coverage tests 2024-12-13 15:22:37 -05:00
Prad NukalaandGitHub ac8c153b28 feature/1120 leverage service authorization (#1188)
* refactor: remove redundant branch trigger for scheduled releases

* refactor: simplify process-compose commands and improve logging

* refactor: remove redundant  command

* refactor: remove unused error variables and simplify database configuration

* feat: introduce task runner for project automation

* refactor: Remove hardcoded action and method from form components

* refactor: move server setup to main.go and add prometheus metrics

* refactor: move index handlers to render handlers

* refactor: improve user identification logic in gateway and vault handlers

* refactor: rename TitleDescription to TitleDesc for consistency

* feat: integrate go-useragent library for enhanced user agent parsing

* feat: enhance initial view rendering based on device type

* feat: Add support for PostgreSQL database

* fix: Use formatPsqlDSN() to properly set PostgreSQL DSN from command flags

* feat: Add PostgreSQL support with fallback to SQLite in NewGormDB

* feat: Add PostgreSQL connection validation with SQLite fallback

* chore: update golang.org/x/crypto dependency to v0.31.0

* feat: add PKL-based configuration initialization

* refactor: improve file naming consistency in cmd/sonrd

* refactor: Improve init-pkl command with safer config file generation and error handling

* fix: add logging for pkl evaluation results

* refactor: Move credential handling to gateway context

* refactor: Migrate session models to gateway package

* refactor: rename models and update User model

* chore: initial commit for address and pubkey functionality

* refactor: move pubkey package to keys package

* refactor: Rename models and add resolver service

* feat: add gRPC clients for bank, DID, DWN, and SVC modules

* refactor: Migrate title and description components from text package to hero package

* refactor: improve file naming conventions

* feat: add user credential validation

* refactor: rename registration handlers and routes for clarity

* <no value>

* refactor: Decouple database and IPFS interactions from server setup

* refactor: Migrate configuration from class-based to TOML-based structure

* refactor: move network configuration files to sonr.net module

* feature/1120-leverage-service-authorization

* fix: correct DID identifier creation function name

* feat: add compressed and uncompressed public keys to keyset

* refactor: move address packages to crypto/address

* feat: implement pubkey verification

* refactor: remove ECDSA-related functions from keyshare and protocol modules

* feat: Implement ECDSA signature serialization

* <no value>

* feat: add vault service for IPFS token storage

* refactor: update ucan codec to use new DID generation method

* refactor: refactor key management and move address parsers to keys package

* refactor: rename key parsers and move to parsers package

* fix: resolved import issues with the new spec

* feat: improve user onboarding experience by updating button text and functionality

* refactor: update point marshaling and unmarshaling methods to use JSON

* refactor: remove unnecessary DID method from PubKey

* refactor: Rename and refactor MPC key generation functions

* test: Add comprehensive test suite for keyshare generation and validation

* test: Fix keyshare role validation and encoding tests

* feat: Update key share role tests with enclave initialization validation

* test(mpc): refactor tests to focus on public API and remove internal role checks

* refactor: Remove unnecessary role check in initKeyEnclave function

* fix: Enforce strict order for validator and user keyshares in enclave initialization

* fix: Update codec_test to match latest codec implementation

* refactor: Update KeyEnclave to use string-based key shares and improve error handling

* fix: Refactor MPC enclave to use string-based encoding and simplify key management

* refactor: Remove redundant keyshare decoding tests in codec_test.go

* fix: Resolve type conversion issues in MPC crypto enclave initialization

* fix: Convert CID to byte slice in addEnclaveIPFS function

* fix: Resolve type conversion and constant definition errors in MPC crypto utils

* refactor: Simplify KeyShare encoding and role handling in MPC codec

* fix: Resolve JSON unmarshaling type mismatch in KeyShare.Message()

* fix: Refactor KeyEnclave to use struct and Enclave interface

* fix: Resolve type and naming conflicts in MPC crypto package

* refactor: Update codec_test.go to use new KeyEnclave struct fields

* refactor: remove keyshare encoding and decoding logic

* refactor: Remove unused JSON marshaling functions for curve points

* fix: Improve signature serialization and deserialization in MPC crypto

This commit addresses several issues with signature handling:
- Fixed signature length to 65 bytes
- Added proper padding for R and S values
- Added nil and zero value checks
- Improved error messages for signature parsing

The changes ensure more robust signature encoding and decoding, preventing potential nil pointer and invalid signature issues.

* fix: Update signature serialization to match protocol test approach

* refactor: Simplify KeyEnclave struct and improve message handling

* fix: Improve signature serialization and verification in MPC crypto module

* refactor: Simplify enclave validation using IsValid method in test

* refactor: Add marshaling and comprehensive tests for KeyEnclave

* feat: Add JSON marshaling support for Point in KeyEnclave

* refactor: Rename KeyEnclave to Enclave and update related functions

* refactor: Update PubKey verification to use SHA3-256 hashing

* test: Add comprehensive tests for DID and PubKey implementations

* refactor: simplify DID key retrieval

* test: refactor CI workflow and remove unused DIDAuth middleware

* The changes look good! The updated workflows will now:

1. Run tests on push to master
2. Bump the version if the commit doesn't already start with 'bump:'
3. Trigger a release workflow automatically with the new version tag
4. Create and publish the release

A few things to note:
- Make sure you have the `peter-evans/repository-dispatch` action installed/available
- The `commitizen-tools/commitizen-action` should output the new tag for this to work
- Ensure your release workflow can handle the repository dispatch event

Would you like me to review or suggest any additional modifications to the workflows?

* ci(github actions): add build stage dependency for tests

* fix(workflow): update workflow to trigger on PR edits

* test: Update unit test dependencies

* ci: Add GoReleaser dry-run check for merge group events

* test: remove unnecessary dependencies between test jobs

* ci: Make race and coverage tests depend on build tests
2024-12-13 20:10:27 +00:00
Prad Nukala ee12bf684e fix: Correct regular expression for version tags in release workflow 2024-12-11 17:46:18 -05:00
github-actions[bot] 63dc68caac bump: version 0.5.24 → 0.5.25 2024-12-11 22:46:17 +00:00
Prad Nukala ec57c76a2a feat: enable GoReleaser releases on tags and snapshots 2024-12-11 17:45:13 -05:00
Prad Nukala 99e9eefffb feat: automate release on tag and workflow dispatch 2024-12-11 17:43:56 -05:00
github-actions[bot] eb0777ebb4 bump: version 0.5.23 → 0.5.24 2024-12-11 22:42:44 +00:00
Prad Nukala ed5ee034b8 feat: prevent duplicate releases 2024-12-11 17:41:14 -05:00
github-actions[bot] bb2972b527 bump: version 0.5.22 → 0.5.23 2024-12-11 22:34:18 +00:00
Prad Nukala 45b474c9a6 refactor: rename scheduled release workflow to versioned release 2024-12-11 17:33:05 -05:00
Prad Nukala 99747c022e refactor: remove changelog from release artifacts 2024-12-11 17:26:46 -05:00
github-actions[bot] d9a2689469 bump: version 0.5.21 → 0.5.22 2024-12-11 22:06:07 +00:00
Prad Nukala 08d8c7eda0 chore: update debian distribution to jammy 2024-12-11 17:04:31 -05:00
Prad Nukala 4dd23f1be8 docs: add Cloudsmith badge to README 2024-12-11 17:02:07 -05:00
Prad Nukala 0ebc988a68 feat: Implement passkey-based authentication and registration flow 2024-12-11 16:43:37 -05:00
Prad Nukala 9b8af84393 docs: update changelog file path 2024-12-11 16:42:59 -05:00
github-actions[bot] ff1ccd7c78 bump: version 0.5.20 → 0.5.21 2024-12-11 21:30:55 +00:00
Prad Nukala 3176cc661a ci(deploy): improve network start/stop process in CI 2024-12-11 16:29:47 -05:00
Prad Nukala 9ba387f2e4 fix: use Unix domain sockets for devnet processes 2024-12-11 16:25:58 -05:00
Prad Nukala c87dffd6da ci(deploy): remove feature branch from deploy workflow 2024-12-11 16:20:41 -05:00
Prad Nukala 0cf69f5a59 refactor: remove unnecessary git fetch step in deploy workflow 2024-12-11 16:19:37 -05:00
Prad Nukala babab1e09e ci(deploy): improve devnet deployment workflow 2024-12-11 16:18:58 -05:00
Prad Nukala 6f5b079f51 fix: correct workflow name and improve devnet deployment process 2024-12-11 16:02:56 -05:00
Prad Nukala 9908669be0 feat: allow manual triggering of deployment workflow 2024-12-11 15:58:10 -05:00
Prad Nukala c2f3e66405 chore: update Devnet deployment workflow runner 2024-12-11 15:24:51 -05:00
Prad Nukala b24c4668ed chore: update CI workflow runner to use devnet 2024-12-11 15:24:24 -05:00
Prad Nukala fcca387d9a ci: remove unnecessary condition in deploy workflow 2024-12-11 15:13:37 -05:00
Prad Nukala 97cc6a0d21 ci: improve devnet deployment workflow by adding conditional restart 2024-12-11 15:13:18 -05:00
Prad Nukala 737565344d refactor: remove obsolete interchain test dependencies 2024-12-11 15:11:24 -05:00
Prad Nukala 72f42afb81 style: improve form layout and spacing 2024-12-11 14:57:07 -05:00
Prad Nukala 0a2b91c9ac refactor: update index views to use new nebula components 2024-12-11 14:55:19 -05:00
Prad Nukala (aider) 83b8fc597a style: Improve mobile responsiveness for Container component 2024-12-11 13:40:18 -05:00
Prad Nukala 0d4f2946f3 fix: correct title of profile creation page 2024-12-11 13:26:26 -05:00
Prad Nukala 305efbea5d feat: add start-tui command for interactive mode 2024-12-11 12:32:22 -05:00
Prad Nukala 23f077ce75 refactor: move Wasm related code to pkg/common/wasm 2024-12-11 12:26:48 -05:00
Prad Nukala d667c3c604 refactor: migrate config package to pkg directory 2024-12-11 12:24:04 -05:00
Prad Nukala 0502f52ec0 refactor: migrate to new configuration system and model definitions 2024-12-11 12:21:52 -05:00
Prad Nukala 40f50bf37a refactor: move session package to pkg directory 2024-12-11 12:07:39 -05:00
Prad Nukala 0e0a46741f docs: Trigger documentation builds on main, master, and develop branches 2024-12-11 11:49:36 -05:00
Prad Nukala 5b784659af feat: add coin selection and update passkey input in registration form 2024-12-11 11:36:52 -05:00
Prad Nukala e2f24eef8e refactor: Refactor registration forms to use UI components 2024-12-10 23:41:49 -05:00
Prad Nukala aa43770bf4 refactor: move gateway config to vault package 2024-12-10 15:28:39 -05:00
Prad Nukala 45bc823de0 refactor: improve command line flag descriptions and variable names 2024-12-10 15:27:36 -05:00
Prad Nukala 1250468f69 refactor: refactor hway command to use echo framework for server 2024-12-10 15:25:51 -05:00
Prad Nukala (aider) e94ce3b1cc refactor: Update root command to load EnvImpl from cobra flags 2024-12-10 15:21:09 -05:00
Prad Nukala ebb89facbd refactor: Modify command flags and environment loading logic in cmds.go 2024-12-10 15:21:08 -05:00
Prad Nukala 648b089c48 feat: add hway command for Sonr DID gateway 2024-12-10 15:15:24 -05:00
Prad Nukala 0befb6d431 docs: update CNAME to point to onsonr.dev 2024-12-10 15:13:21 -05:00
Prad Nukala 35f2ad604c refactor: improve build process and move process-compose.yaml 2024-12-10 15:12:53 -05:00
Prad Nukala e139aee2b3 refactor: remove unused devbox.json and related configurations 2024-12-10 15:09:32 -05:00
Prad Nukala (aider) b57bea6f7b feat: Conditionally install process-compose only if binary not found 2024-12-10 14:44:02 -05:00
Prad Nukala 1828d2e710 feat: Add process-compose support with custom start and down commands 2024-12-10 14:44:01 -05:00
Prad Nukala 04d929aae9 feat: implement passkey registration flow 2024-12-10 14:37:54 -05:00
Prad Nukala b51c36645e style: adjust styling of index page and registration form 2024-12-10 14:12:13 -05:00
Prad Nukala (aider) bd1ea5042e feat: Improve createProfile form layout with wider max-width and enhanced spacing 2024-12-10 14:05:08 -05:00
Prad Nukala af4c66bc79 feat: improve index page UI with new navigation buttons and remove redundant settings buttons 2024-12-10 13:57:25 -05:00
Prad Nukala (aider) 2d1f820451 feat: Make input rows responsive with grid layout for mobile and desktop 2024-12-10 13:56:16 -05:00
Prad Nukala (aider) 179add9e12 refactor: Improve mobile layout responsiveness for Rows and Columns components 2024-12-10 13:54:16 -05:00
Prad Nukala 9d3264256a refactor: Remove max-w-fit from Rows component 2024-12-10 13:54:14 -05:00
Prad Nukala fb234ed339 refactor: replace session package with context package 2024-12-10 13:47:07 -05:00
Prad Nukala bb7724ece1 refactor: rename database initialization function 2024-12-10 13:41:47 -05:00
Prad Nukala c67a7823a6 refactor: move session management to dedicated database module 2024-12-10 13:40:41 -05:00
Prad Nukala 518109e9df refactor: remove unused UI components related to wallet and index pages 2024-12-10 13:33:01 -05:00
Prad Nukala e38a045de3 feat: enhance index page with additional settings buttons and style adjustments 2024-12-10 13:27:07 -05:00
Prad Nukala ba82d707d0 refactor: consolidate handlers into single files 2024-12-10 13:13:51 -05:00
Prad Nukala f366dd8cf2 feat: implement passkey-based authentication 2024-12-10 13:12:08 -05:00
Prad Nukala dc6f02a000 refactor: move gateway and vault packages to internal directory 2024-12-10 12:52:19 -05:00
Prad Nukala b81bdebd64 refactor: Move registration form components to dedicated directory 2024-12-10 02:43:28 -05:00
Prad Nukala (aider) 6127d80f2a style: Improve mobile responsiveness for create profile form 2024-12-10 00:46:38 -05:00
Prad Nukala 49c8a8c6d0 feat: add support for Cloudsmith releases 2024-12-10 00:42:52 -05:00
Prad Nukala e2e0c35008 refactor: remove unused devbox package 2024-12-09 22:36:06 -05:00
Prad Nukala 1de6eda49f feat: add go dependency and enhance devbox environment variables 2024-12-09 22:35:00 -05:00
Prad Nukala 000a0893c3 fix: rename devbox start script to up and remove stop script 2024-12-09 22:00:58 -05:00
Prad Nukala 0a68ab682d feat: update create profile form placeholders and handle 2024-12-09 21:45:52 -05:00
Prad Nukala (aider) 54e51768c0 fix: Consolidate archive configuration and add LICENSE file 2024-12-09 20:22:23 -05:00
Prad Nukala 4eb294d856 refactor: remove devbox configuration 2024-12-09 19:40:06 -05:00
Prad Nukala e3b8f2cffe refactor: move vault package to app directory 2024-12-09 18:39:57 -05:00
Prad Nukala c158904efc refactor: improve code structure within gateway package 2024-12-09 18:35:36 -05:00
Prad Nukala f250082fff refactor: move gateway package to app directory 2024-12-09 18:34:38 -05:00
Prad Nukala 67432d3fdf refactor: move vault package internal components to root 2024-12-09 18:31:12 -05:00
Prad Nukala 0ff4299061 refactor: migrate layout imports to common styles package 2024-12-09 18:30:02 -05:00
Prad Nukala 8ceb89053f refactor: Move form templates and styles to common directory 2024-12-09 18:27:55 -05:00
Prad Nukala 6fbcb7cef5 feat: add DID-based authentication middleware 2024-12-09 18:24:27 -05:00
Prad Nukala f8d362352d refactor: consolidate authentication and DID handling logic 2024-12-09 18:19:46 -05:00
Prad Nukala (aider) ce3d073abd feat: Add validation for human verification slider sum in CreateProfile form 2024-12-09 17:36:09 -05:00
Prad Nukala 0e8b92e53d feat: implement passkey registration flow 2024-12-09 16:23:18 -05:00
Prad Nukala (aider) 27d4dfcdfd refactor: Improve WebAuthn credential handling and validation in register finish route 2024-12-09 15:23:41 -05:00
Prad Nukala (aider) 38096db2dd fix: Improve cross-browser passkey credential handling and encoding 2024-12-09 15:21:18 -05:00
Prad Nukala bbb093b171 refactor: remove profile card component 2024-12-09 15:21:02 -05:00
Prad Nukala (aider) 98bdf92d70 feat: Update WebAuthn credential handling with modern browser standards 2024-12-09 15:12:16 -05:00
Prad Nukala e572d7a626 fix: Remove commented-out code in passkey registration script 2024-12-09 15:12:14 -05:00
Prad Nukala (aider) aff4e3523c feat: Streamline passkey registration with automatic form submission 2024-12-09 15:09:05 -05:00
Prad Nukala 9972c5e40a refactor: Simplify passkey registration UI and move profile component inline 2024-12-09 15:09:03 -05:00
Prad Nukala (aider) 2915ba2933 refactor: Update credential logging with transport and ID type 2024-12-09 14:59:35 -05:00
Prad Nukala (aider) 3d9264dae4 refactor: Update register handler to use protocol.CredentialDescriptor struct 2024-12-09 14:59:25 -05:00
Prad Nukala d030dbcfde refactor: Update credential handling to use protocol.CredentialDescriptor 2024-12-09 14:59:24 -05:00
Prad Nukala (aider) 60cede383a feat: Add credential parsing and logging in register finish handler 2024-12-09 14:55:31 -05:00
Prad Nukala (aider) 7ef06e8d05 feat: Add credential details row with icon after passkey creation 2024-12-09 14:53:59 -05:00
Prad Nukala (aider) e8475dbd8d feat: Add form validation for passkey credential input 2024-12-09 14:51:59 -05:00
Prad Nukala 3353d9f622 feat: implement passkey registration flow 2024-12-09 14:51:12 -05:00
Prad Nukala (aider) 893631eb4c feat: Add hidden input to store passkey credential data for form submission 2024-12-09 14:45:02 -05:00
Prad Nukala 2286708d56 refactor: improve profile card styling and functionality 2024-12-09 14:42:07 -05:00
Prad Nukala 553cff37a1 feat: add CI workflow for deploying network 2024-12-09 13:37:55 -05:00
Prad Nukala 7806c07381 feat: add hway binary support and Homebrew formula 2024-12-09 11:49:20 -05:00
Prad Nukala b7a40ac3d7 feat: remove username from passkey creation 2024-12-08 23:30:17 -05:00
Prad Nukala 5280209075 feat: implement passkey registration flow 2024-12-08 23:10:40 -05:00
Prad Nukala e0ebe92361 feat: add passkey creation functionality 2024-12-08 22:53:04 -05:00
Prad Nukala 5c3966a9d6 fix: remove line-clamp from tailwind config 2024-12-08 21:45:37 -05:00
Prad Nukala 38ca7b246b refactor: Simplify session management and browser information extraction 2024-12-08 19:46:19 -05:00
Prad Nukala (aider) d9f2b21812 refactor: Update PeerInfo to extract and store comprehensive device information 2024-12-08 19:45:14 -05:00
Prad Nukala fb9f41248f docs: Update CNAME to point to www.onsonr.dev 2024-12-08 18:48:44 -05:00
Prad Nukala 4087fdd79e refactor: improve address display in property details 2024-12-08 18:48:04 -05:00
Prad Nukala 6bb2c2143e refactor: remove unused documentation generation script 2024-12-08 17:55:36 -05:00
Prad Nukala dae01698ef refactor: replace sonr/pkg/styles/layout with nebula/ui/layout 2024-12-08 16:17:46 -05:00
Prad Nukala b65e844824 refactor: migrate UI components to nebula module 2024-12-08 16:17:21 -05:00
Prad Nukala c64c506c52 feat: add CNAME for onsonr.dev domain 2024-12-08 14:52:40 -05:00
Prad Nukala 889186ec3e docs: Force update of GitHub Pages deployment 2024-12-08 13:36:53 -05:00
Prad Nukala 9b3c89785e docs(github): update workflow to remove redundant branch configuration 2024-12-08 13:35:40 -05:00
Prad Nukala cfce4ba460 fix: remove unnecessary background and restart settings from process-compose.yaml 2024-12-08 13:00:38 -05:00
Prad Nukala 3cb72d89e9 fix: suppress process-compose server output and log to file 2024-12-08 12:42:39 -05:00
Prad Nukala cb6fb10c3c docs: Add keywords to improve documentation searchability 2024-12-08 12:29:59 -05:00
Prad Nukala 0c5f052f86 build: add newline for better readability 2024-12-08 11:59:25 -05:00
Prad Nukala c36dc537ef refactor: improve scopes.json structure and update scripts for better usability 2024-12-07 17:32:11 -05:00
Prad Nukala 4af64c8524 docs: remove --force flag from mkdocs gh-deploy 2024-12-06 21:36:37 -05:00
github-actions[bot] 767e91f720 bump: version 0.5.19 → 0.5.20 2024-12-07 02:34:23 +00:00
Prad NukalaandGitHub 38447af730 feature/data persistence (#1180)
- **feat: add documentation and GitHub Actions workflow for publishing
documentation**
- **docs(concepts): add documentation for chain modules**
- **refactor: Simplify session management with SQLite storage and remove
deprecated code**
- **refactor: Simplify database initialization and remove
DatabaseContext**
- **refactor: move connection handling logic to resolver package**
- **feat: implement session management with database persistence**
- **feat: Ensure config directory exists when creating database path**
- **feat: Add SetUserHandle function to set user handle in session**
- **feat: Add public methods to set session fields with database save**
- **refactor: Remove unused session setter functions**
- **feat: Add getter methods for all Session Model properties**
- **feat: enhance Session model with user name details**
- **feat: add Motr support and update UI elements**
- **<no value>**
- **feat: Add unique handle constraint and method to check handle
existence**
- **docs: update site URL to onsonr.dev**
- **fix: correct import statement for database package**
- **test: updated CI to run tests on pull requests and merge groups**
- **docs: remove reference to develop branch in workflow**
- **feat: add WebAuthn support for user registration**
- **fix: correct smart account attenuation preset name**
- **feat: add ComputeIssuerDID and ComputeSonrAddr functions to ucan
package**
- **test: add unit tests for MPC keyset and keyshare**
- **feat: introduce new script to streamline GitHub issue creation**
2024-12-06 21:31:20 -05:00
cuiyourongandGitHub 94fb4dceac chore: fix some function names in comment (#1178)
<!--- Provide a general summary of your changes in the Title above -->

## Description

 fix some function names in comment

## Related Issue(s)

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

Signed-off-by: cuiyourong <cuiyourong@gmail.com>
2024-12-06 13:40:49 -05:00
Prad Nukala cbb98481c8 refactor: simplify CI workflow by removing redundant asset publishing steps 2024-12-05 21:00:26 -05:00
Prad Nukala 538806678d docs: remove unnecessary metadata from UCAN spec 2024-12-05 20:59:16 -05:00
github-actions[bot] 65cfe1a07a bump: version 0.5.18 → 0.5.19 2024-12-06 01:43:06 +00:00
Prad Nukala 81ea0256c5 Merge branch 'develop' 2024-12-05 20:38:27 -05:00
Prad NukalaandGitHub bd51342fdf feature/1115 execute ucan token (#1177)
- **deps: remove tigerbeetle-go dependency**
- **refactor: remove unused landing page components and models**
- **feat: add pin and publish vault handlers**
- **refactor: move payment and credential services to webui browser
package**
- **refactor: remove unused credentials management components**
- **feat: add landing page components and middleware for credentials and
payments**
- **refactor: remove unused imports in vault config**
- **refactor: remove unused bank, DID, and DWN gRPC clients**
- **refactor: rename client files and improve code structure**
- **feat: add session middleware helpers and landing page components**
- **feat: add user profile registration flow**
- **feat: Implement WebAuthn registration flow**
- **feat: add error view for users without WebAuthn devices**
- **chore: update htmx to include extensions**
- **refactor: rename pin handler to claim handler and update routes**
- **chore: update import paths after moving UI components and styles**
- **fix: address potential server errors by handling and logging them
properly**
- **refactor: move vault config to gateway package and update related
dependencies**
- **style: simplify form styling and remove unnecessary components**
- **feat: improve UI design for registration flow**
- **feat: implement passkey-based authentication**
- **refactor: migrate registration forms to use reusable form
components**
- **refactor: remove tailwindcss setup and use CDN instead**
- **style: update submit button style to use outline variant**
- **refactor: refactor server and IPFS client, remove MPC encryption**
- **refactor: Abstract keyshare functionality and improve message
encoding**
- **refactor: improve keyset JSON marshaling and error handling**
- **feat: add support for digital signatures using MPC keys**
- **fix: Refactor MarshalJSON to use standard json.Marshal for Message
serialization**
- **fix: Encode messages before storing in keyshare structs**
- **style: update form input styles for improved user experience**
- **refactor: improve code structure in registration handlers**
- **refactor: consolidate signer middleware and IPFS interaction**
- **refactor: rename MPC signing and refresh protocol functions**
- **refactor: update hway configuration loading mechanism**
- **feat: integrate database support for sessions and users**
- **refactor: remove devnet infrastructure and simplify build process**
- **docs(guides): add Sonr DID module guide**
- **feat: integrate progress bar into registration form**
- **refactor: migrate WebAuthn dependencies to protocol package**
- **feat: enhance user registration with passkey integration and
improved form styling**
- **refactor: move gateway view handlers to internal pages package**
- **refactor: Move address package to MPC module**
- **feat: integrate turnstile for registration**
- **style: remove unnecessary size attribute from buttons**
- **refactor: rename cookie package to session/cookie**
- **refactor: remove unnecessary types.Session dependency**
- **refactor: rename pkg/core to pkg/chain**
- **refactor: simplify deployment process by removing testnet-specific
Taskfile and devbox configuration**
- **feat: add error redirect functionality and improve routes**
- **feat: implement custom error handling for gateway**
- **chore: update version number to 0.0.7 in template**
- **feat: add IPFS client implementation**
- **feat: Implement full IPFS client interface with comprehensive
methods**
- **refactor: improve IPFS client path handling**
- **refactor: Move UCAN middleware to controller package**
- **feat: add UCAN middleware to motr**
- **refactor: update libp2p dependency**
- **docs: add UCAN specification document**
- **refactor: move UCAN controller logic to common package**
- **refactor: rename exports.go to common.go**
- **feat: add UCAN token support**
- **refactor: migrate UCAN token parsing to dedicated package**
- **refactor: improve CometBFT and app config initialization**
- **refactor: improve deployment scripts and documentation**
- **feat: integrate IPFS and producer middleware**
- **refactor: rename agent directory to aider**
- **fix: correct libp2p import path**
- **refactor: remove redundant dependency**
- **cleanup: remove unnecessary test files**
- **refactor: move attention types to crypto/ucan package**
- **feat: expand capabilities and resource types for UCANs**
- **refactor: rename sonr.go to codec.go and update related imports**
- **feat: add IPFS-based token store**
- **feat: Implement IPFS-based token store with caching and UCAN
integration**
- **feat: Add dynamic attenuation constructor for UCAN presets**
- **fix: Handle missing or invalid attenuation data with
EmptyAttenuation**
- **fix: Update UCAN attenuation tests with correct capability types**
- **feat: integrate UCAN-based authorization into the producer
middleware**
- **refactor: remove unused dependency on go-ucan**
- **refactor: Move address handling logic to DID module**
- **feat: Add support for compressed and uncompressed Secp256k1 public
keys in didkey**
- **test: Add test for generating DID key from MPC keyshares**
- **feat: Add methods for extracting compressed and uncompressed public
keys in share types**
- **feat: Add BaseKeyshare struct with public key conversion methods**
- **refactor: Use compressed and uncompressed public keys in keyshare,
fix public key usage in tests and verification**
- **feat: add support for key generation policy type**
- **fix: correct typo in VaultPermissions constant**
- **refactor: move JWT related code to ucan package**
- **refactor: move UCAN JWT and source code to spec package**
2024-12-05 20:36:58 -05:00
Prad Nukala e62ec45e82 refactor: rename accaddr package to address 2024-12-02 14:53:41 -05:00
Prad NukalaandGitHub 31bcc21c35 feature/1121 implement ucan validation (#1176)
- **refactor: remove unused auth components**
- **refactor: improve devbox configuration and deployment process**
- **refactor: improve devnet and testnet setup**
- **fix: update templ version to v0.2.778**
- **refactor: rename pkl/net.matrix to pkl/matrix.net**
- **refactor: migrate webapp components to nebula**
- **refactor: protobuf types**
- **chore: update dependencies for improved security and stability**
- **feat: implement landing page and vault gateway servers**
- **refactor: Migrate data models to new module structure and update
related files**
- **feature/1121-implement-ucan-validation**
- **refactor: Replace hardcoded constants with model types in attns.go**
- **feature/1121-implement-ucan-validation**
- **chore: add origin Host struct and update main function to handle
multiple hosts**
- **build: remove unused static files from dwn module**
- **build: remove unused static files from dwn module**
- **refactor: Move DWN models to common package**
- **refactor: move models to pkg/common**
- **refactor: move vault web app assets to embed module**
- **refactor: update session middleware import path**
- **chore: configure port labels and auto-forwarding behavior**
- **feat: enhance devcontainer configuration**
- **feat: Add UCAN middleware for Echo with flexible token validation**
- **feat: add JWT middleware for UCAN authentication**
- **refactor: update package URI and versioning in PklProject files**
- **fix: correct sonr.pkl import path**
- **refactor: move JWT related code to auth package**
- **feat: introduce vault configuration retrieval and management**
- **refactor: Move vault components to gateway module and update file
paths**
- **refactor: remove Dexie and SQLite database implementations**
- **feat: enhance frontend with PWA features and WASM integration**
- **feat: add Devbox features and streamline Dockerfile**
- **chore: update dependencies to include TigerBeetle**
- **chore(deps): update go version to 1.23**
- **feat: enhance devnet setup with PATH environment variable and
updated PWA manifest**
- **fix: upgrade tigerbeetle-go dependency and remove indirect
dependency**
- **feat: add PostgreSQL support to devnet and testnet deployments**
- **refactor: rename keyshare cookie to token cookie**
- **feat: upgrade Go version to 1.23.3 and update dependencies**
- **refactor: update devnet and testnet configurations**
- **feat: add IPFS configuration for devnet**
- **I'll help you update the ipfs.config.pkl to include all the peers
from the shell script. Here's the updated configuration:**
- **refactor: move mpc package to crypto directory**
- **feat: add BIP32 support for various cryptocurrencies**
- **feat: enhance ATN.pkl with additional capabilities**
- **refactor: simplify smart account and vault attenuation creation**
- **feat: add new capabilities to the Attenuation type**
- **refactor: Rename MPC files for clarity and consistency**
- **feat: add DIDKey support for cryptographic operations**
- **feat: add devnet and testnet deployment configurations**
- **fix: correct key derivation in bip32 package**
- **refactor: rename crypto/bip32 package to crypto/accaddr**
- **fix: remove duplicate indirect dependency**
- **refactor: move vault package to root directory**
- **refactor: update routes for gateway and vault**
- **refactor: remove obsolete web configuration file**
- **refactor: remove unused TigerBeetle imports and update host
configuration**
- **refactor: adjust styles directory path**
- **feat: add broadcastTx and simulateTx functions to gateway**
- **feat: add PinVault handler**
2024-12-02 14:27:18 -05:00
Prad Nukala 2a128af227 Merge branch 'feature/1149-vault-allocation-error' into develop 2024-11-27 19:37:41 -05:00
Prad Nukala 9df339e500 refactor: rename layout component to root 2024-11-27 18:31:52 -05:00
Prad Nukala 09e4d4d452 feat: add new button components and layout improvements 2024-11-27 18:24:14 -05:00
Prad Nukala 74d8d516b3 refactor: refactor authentication pages into their own modules 2024-11-27 13:37:07 -05:00
Prad NukalaandGitHub 44027b9303 feature/1149 vault allocation error (#1173)
- **refactor: update devbox configuration and scripts**
- **refactor: remove web documentation**
- **refactor: move resolver formatter to services package**
- **refactor: Rename x/vault -> x/dwn and x/service -> x/svc**
- **refactor: remove unused dependencies and simplify module imports**
- **refactor: remove dependency on DWN.pkl**
- **refactor: Move IPFS interaction functions to common package**
- **refactor: remove unused TUI components**
- **feat: add gum package and update devbox configuration**
- **refactor: rename Assertion to Account and update related code**
- **fix: resolve rendering issue in login modal**
- **refactor: migrate build system from Taskfile to Makefile**
- **refactor: Deployment setup**
- **refactor: Update Credential table to match WebAuthn Credential
Descriptor**
- **feat: add fast reflection methods for Capability and Resource**
- **fix: update devbox lockfile**
- **feat: add support for parent field and resources list in Capability
message**
- **feature/1149-vault-allocation-error**
- **fix: adjust fullscreen modal close button margin**
2024-11-26 22:05:50 -05:00
Prad Nukala 2362d2365d fix: adjust fullscreen modal close button margin 2024-11-26 21:48:31 -05:00
Prad Nukala 155ff42958 feature/1149-vault-allocation-error 2024-11-26 21:23:14 -05:00
Prad Nukala f89260bacd feat: add support for parent field and resources list in Capability message 2024-11-26 20:51:58 -05:00
Prad Nukala 93770d481a fix: update devbox lockfile 2024-11-26 17:09:07 -05:00
Prad Nukala 4a8a15e4d6 feat: add fast reflection methods for Capability and Resource 2024-11-26 13:23:44 -05:00
Prad Nukala (aider) 7a8707e5d0 refactor: Update Credential table to match WebAuthn Credential Descriptor 2024-11-26 13:13:53 -05:00
Prad Nukala e89bbb05b1 refactor: Deployment setup 2024-11-26 11:44:17 -05:00
Prad Nukala b9b868d55a refactor: migrate build system from Taskfile to Makefile 2024-11-26 10:54:32 -05:00
Prad Nukala 50217d169d fix: resolve rendering issue in login modal 2024-11-26 00:09:37 -05:00
Prad Nukala 179a69df1c refactor: rename Assertion to Account and update related code 2024-11-26 00:07:45 -05:00
Prad Nukala 9e7f70c455 feat: add gum package and update devbox configuration 2024-11-25 16:27:03 -05:00
Prad Nukala e4c21e8552 refactor: remove unused TUI components 2024-11-25 16:03:29 -05:00
Prad Nukala 6a761c05e6 refactor: Move IPFS interaction functions to common package 2024-11-25 15:56:54 -05:00
Prad Nukala d9815cc96c refactor: remove dependency on DWN.pkl 2024-11-25 15:54:05 -05:00
Prad Nukala 0e14099f0c refactor: remove unused dependencies and simplify module imports 2024-11-25 15:47:21 -05:00
Prad Nukala 629ef72954 refactor: Rename x/vault -> x/dwn and x/service -> x/svc 2024-11-25 15:44:55 -05:00
Prad Nukala 711acd6bb8 refactor: move resolver formatter to services package 2024-11-25 15:17:19 -05:00
Prad Nukala 4cbada21a7 refactor: remove web documentation 2024-11-25 15:13:16 -05:00
Prad Nukala e04d071ca7 refactor: update devbox configuration and scripts 2024-11-25 13:54:33 -05:00
Prad Nukala 1568844255 refactor: update templ version to v0.2.778 and remove unused air config 2024-11-23 16:32:15 -05:00
Prad NukalaandGitHub 89989fa102 feature/1114 implement account interface (#1167)
- **refactor: move session-related code to middleware package**
- **refactor: update PKL build process and adjust related
configurations**
- **feat: integrate base.cosmos.v1 Genesis module**
- **refactor: pass session context to modal rendering functions**
- **refactor: move nebula package to app directory and update templ
version**
- **refactor: Move home section video view to dedicated directory**
- **refactor: remove unused views file**
- **refactor: move styles and UI components to global scope**
- **refactor: Rename images.go to cdn.go**
- **feat: Add Empty State Illustrations**
- **refactor: Consolidate Vault Index Logic**
- **fix: References to App.wasm and remove Vault Directory embedded CDN
files**
- **refactor: Move CDN types to Models**
- **fix: Correct line numbers in templ error messages for
arch_templ.go**
- **refactor: use common types for peer roles**
- **refactor: move common types and ORM to a shared package**
- **fix: Config import dwn**
- **refactor: move nebula directory to app**
- **feat: Rebuild nebula**
- **fix: correct file paths in panels templates**
- **feat: Remove duplicate types**
- **refactor: Move dwn to pkg/core**
- **refactor: Binary Structure**
- **feat: Introduce Crypto Pkg**
- **fix: Broken Process Start**
- **feat: Update pkg/* structure**
- **feat: Refactor PKL Structure**
- **build: update pkl build process**
- **chore: Remove Empty Files**
- **refactor: remove unused macaroon package**
- **feat: Add WebAwesome Components**
- **refactor: consolidate build and generation tasks into a single
taskfile, remove redundant makefile targets**
- **refactor: refactor server and move components to pkg/core/dwn**
- **build: update go modules**
- **refactor: move gateway logic into dedicated hway command**
- **feat: Add KSS (Krawczyk-Song-Song) MPC cryptography module**
- **feat: Implement MPC-based JWT signing and UCAN token generation**
- **feat: add support for MPC-based JWT signing**
- **feat: Implement MPC-based UCAN capabilities for smart accounts**
- **feat: add address field to keyshareSource**
- **feat: Add comprehensive MPC test suite for keyshares, UCAN tokens,
and token attenuations**
- **refactor: improve MPC keyshare management and signing process**
- **feat: enhance MPC capability hierarchy documentation**
- **refactor: rename GenerateKeyshares function to NewKeyshareSource for
clarity**
- **refactor: remove unused Ethereum address computation**
- **feat: Add HasHandle and IsAuthenticated methods to HTTPContext**
- **refactor: Add context.Context support to session HTTPContext**
- **refactor: Resolve context interface conflicts in HTTPContext**
- **feat: Add session ID context key and helper functions**
- **feat: Update WebApp Page Rendering**
- **refactor: Simplify context management by using single HTTPContext
key**
- **refactor: Simplify HTTPContext creation and context management in
session middleware**
- **refactor: refactor session middleware to use a single data
structure**
- **refactor: Simplify HTTPContext implementation and session data
handling**
- **refactor: Improve session context handling and prevent nil pointer
errors**
- **refactor: Improve session context handling with nil safety and type
support**
- **refactor: improve session data injection**
- **feat: add full-screen modal component and update registration flow**
- **chore: add .air.toml to .gitignore**
- **feat: add Air to devbox and update dependencies**
2024-11-23 01:28:58 -05:00
Prad NukalaandGitHub bf94277b0f feature/1110 abstract connected wallet operations (#1166)
- **refactor: refactor DID module types and move to controller package**
- **refactor: move controller creation and resolution logic to keeper**
- **refactor: update imports to reflect controller package move**
- **refactor: update protobuf definitions for DID module**
- **docs: update proto README to reflect changes**
- **refactor: move hway to gateway, update node modules, and refactor
pkl generation**
- **build: update pkl-gen task to use new pkl file paths**
- **refactor: refactor DWN WASM build and deployment process**
- **refactor: refactor DID controller implementation to use
account-based storage**
- **refactor: move DID controller interface to base file and update
implementation**
- **chore: migrate to google protobuf**
- **feat: Add v0.52.0 Interfaces for Acc Abstraction**
- **refactor: replace public_key with public_key_hex in Assertion
message**
- **refactor: remove unused PubKey, JSONWebKey, and RawKey message types
and related code**
2024-11-18 19:04:10 -05:00
Prad Nukala 01cb37e82e refactor: move signer implementation to mpc package 2024-11-18 11:06:00 -05:00
github-actions[bot] 9375960745 bump: version 0.5.17 → 0.5.18 2024-11-06 18:34:48 +00:00
Prad NukalaandGitHub d8cb2cbbf6 feature/1126 implement pkl config (#1161)
- **refactor: move marketing pages to**
- **feat: add role select input**
2024-11-06 13:32:51 -05:00
github-actions[bot] 82ec2664f3 bump: version 0.5.16 → 0.5.17 2024-11-05 14:47:26 +00:00
Prad Nukala 9372db6279 feat: add remote client constructor 2024-11-05 09:43:10 -05:00
Prad Nukala e76c4a5902 refactor: update marketing section architecture 2024-11-05 08:14:26 -05:00
Prad Nukala 075b54883b fix: update file paths in error messages 2024-11-04 13:45:28 -05:00
Prad Nukala 99861266c6 refactor: change verification table id 2024-11-04 13:38:58 -05:00
Prad Nukala 006f69e0d2 feat: add avatar image components 2024-11-04 10:42:35 -05:00
Prad Nukala de4d62e63e feat: add SVG CDN Illustrations to marketing architecture 2024-11-04 10:08:06 -05:00
Prad Nukala dd272bf194 <no value> 2024-11-01 14:42:56 -04:00
Prad Nukala 388ca462a4 refactor(proto): remove macaroon proto 2024-11-01 14:42:08 -04:00
Prad Nukala 5b85868993 refactor: rename ValidateBasic to Validate 2024-10-30 13:44:50 -04:00
Prad Nukala f70fa75e86 docs: update README with dependencies and state info 2024-10-30 09:58:47 -04:00
Prad Nukala bbfd3e5171 docs: add caveat description 2024-10-28 10:12:05 -04:00
Prad Nukala b1422bc97e refactor: rename session cookie key 2024-10-24 16:18:27 -04:00
Prad Nukala f14f6ff536 docs(marketing): improve section data model and section rendering 2024-10-24 16:11:30 -04:00
Prad Nukala c8657022a2 feat(marketing): refactor marketing page components 2024-10-24 10:31:40 -04:00
Prad Nukala (aider) 7b5ee7b0ed feat: Refactor intro video component to use a proper script template 2024-10-23 12:51:49 -04:00
Prad Nukala bda52d5f3d fix: update intro video modal script 2024-10-23 12:51:48 -04:00
Prad Nukala (aider) 137f0ed7f3 feat: Move Alpine.js script initialization to separate component 2024-10-23 12:50:38 -04:00
Prad Nukala cf839c9491 feat: Add intro video modal component 2024-10-23 12:50:37 -04:00
Prad Nukala 0d12487c65 feat: add homepage architecture section 2024-10-23 12:26:01 -04:00
Prad Nukala dc20befb86 feat: add Hero section component with stats and buttons 2024-10-23 11:37:11 -04:00
Prad Nukala 6c6b38a2e3 feat(css): add new utility classes for group hover 2024-10-23 11:36:59 -04:00
Prad Nukala 1ca706744e Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1149-fix-vault-allocation 2024-10-23 10:08:55 -04:00
Prad Nukala 5e6fc4a82b Merge branch 'feature/1126-implement-pkl-config' into feature/1149-fix-vault-allocation 2024-10-23 10:08:54 -04:00
Prad Nukala 7cbc9e0bb1 feat: implement authentication register finish endpoint 2024-10-23 09:52:07 -04:00
Prad Nukala 1ae8a8675e Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 17:02:36 -04:00
Prad Nukala d3f5e613ea Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1126-implement-pkl-config 2024-10-21 17:02:31 -04:00
Prad Nukala (aider) 2479bae12e feat: Update service module README based on protobuf files 2024-10-21 17:02:12 -04:00
Prad Nukala (aider) fd62b6ec67 feat: Update x/macaroon/README.md with details from protobuf files 2024-10-21 17:00:59 -04:00
Prad Nukala (aider) 348555981b docs: update DID Modules Readme files 2024-10-21 16:59:29 -04:00
Prad Nukala (aider) 6faf2e172b feat: update Vault README with details from proto files 2024-10-21 16:57:35 -04:00
Prad Nukala 54953ccb4b refactor: remove formatter.go from service module 2024-10-21 16:22:35 -04:00
Prad Nukala f84773f1f8 refactor: remove unused sync-initial endpoint 2024-10-21 13:15:02 -04:00
Prad Nukala 603da5560f feat: add controller creation step to allocate 2024-10-21 13:07:38 -04:00
Prad Nukala 10f5bfef67 fix: include assets generation in wasm build 2024-10-21 13:01:51 -04:00
github-actions[bot] 4613e91a13 bump: version 0.5.15 → 0.5.16 2024-10-21 16:36:06 +00:00
Prad Nukala 937b65ae95 Merge branch 'feature/1110-implement-dwn-wallet-abstraction' into develop 2024-10-21 12:32:10 -04:00
Prad Nukala 39ce73284e chore: upgrade go version to 1.23 in version-bump workflow 2024-10-21 12:32:04 -04:00
github-actions[bot] 64d75794d3 bump: version 0.5.14 → 0.5.15 2024-10-21 16:29:44 +00:00
Prad Nukala 59f59311b4 Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:25:45 -04:00
Prad Nukala 2c02712b1b chore(deps): update globalfee, poa and tokenfactory to v0.50.0 2024-10-21 12:25:38 -04:00
Prad Nukala 8239bd3fbd Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:16:38 -04:00
Prad Nukala 29c0393f98 docs: remove dash from wiki link titles 2024-10-21 12:16:35 -04:00
Prad Nukala 14aa60891c Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:13:43 -04:00
Prad Nukala 0c0a673fa9 Merge branch 'develop' into feature/1126-implement-pkl-config 2024-10-21 12:11:23 -04:00
Prad Nukala 6ca0dc7dfc Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:11:20 -04:00
Prad Nukala 91ee1e5c8b docs: add documentation links to README 2024-10-21 12:11:03 -04:00
github-actions[bot] 71ec0634da bump: version 0.5.13 → 0.5.14 2024-10-21 16:09:50 +00:00
Prad Nukala 94f98d8e44 docs: update stats section in README 2024-10-21 12:07:49 -04:00
Prad Nukala 8c44be5122 docs: remove extraneous center tags from README 2024-10-21 12:07:19 -04:00
Prad Nukala 2e7729ce84 Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:05:47 -04:00
Prad Nukala b9d83b18e3 refactor: remove StakingKeeper dependency from GlobalFeeDecorator 2024-10-21 12:04:36 -04:00
Prad Nukala 6c39e1a2ab Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:03:36 -04:00
Prad Nukala dd84d3fcb3 Merge branch 'master' into develop 2024-10-21 12:03:25 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
5f6d633c25 chore(deps): bump github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 from 8.0.2-0.20240228211029-91e486ec4dbb to 8.0.2 (#1133)
Bumps
[github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8](https://github.com/cosmos/ibc-apps)
from 8.0.2-0.20240228211029-91e486ec4dbb to 8.0.2.

Release notes

*Sourced from*
[*github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8's
releases*](https://github.com/cosmos/ibc-apps/releases)*.*

> ## packet-forward-middleware v8.0.2
>
> ## Note
>
> This release includes the patch for the [Mandrake
vulnerability](https://github.com/cosmos/ibc-apps/security/advisories/GHSA-v8p4-qhq4-f7h8)
>
> We recommend that you upgrade to the patched version, create a new
release for your chain binary, and coordinate an upgrade with validators
as soon as reasonable.
>
> In addition to patching packet-forward-middleware, it is imperative
that you check the balances of each escrow account against the total
supply of each asset on the associated counterparty chain. Failure to
verify parity between the escrow accounts and the counterparty total
supply can result in a type of Denial-of-Service where users may not be
able to unwind their assets through your chain. You can use our [escrow
checker tool](https://github.com/strangelove-ventures/escrow-checker) or
whatever means you deem fit to validate these balances against the
counterparty total supply. If a discrepancy is found, you will need to
build an upgrade handler that mints and transfers assets to the escrow
account(s) with the discrepancy. Strangelove has provided an [example
upgrade
handler](https://gist.github.com/jtieri/0b41fa96eac44ea1c0b5de63d23aa662)
or you can see the upgrade handler used by the [Cosmos
Hub](https://github.com/cosmos/gaia/blob/0b1f3d80359709de48116baecb810c521960a575/app/upgrades/v15/upgrades.go#L360-L458).
>
> ## What's Changed
>
> * Remove gogo/protobuf replace directive in async-icq/v8 by
`@​Taztingo` in
[cosmos/ibc-apps#168](https://redirect.github.com/cosmos/ibc-apps/pull/168)
> * fix: mint and transfer funds back to escrow account on timeout or
ack error by `@​jtieri` in
[cosmos/ibc-apps#170](https://redirect.github.com/cosmos/ibc-apps/pull/170)
>
> **Full Changelog**:
<https://github.com/cosmos/ibc-apps/compare/middleware/packet-forward-middleware/v8.0.1...middleware/packet-forward-middleware/v8.0.2>

Commits

* See full diff in [compare
view](https://github.com/cosmos/ibc-apps/commits/middleware/packet-forward-middleware/v8.0.2)

![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8&package-manager=go_modules&previous-version=8.0.2-0.20240228211029-91e486ec4dbb&new-version=8.0.2)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

---

Dependabot commands and options 

You can trigger Dependabot actions by commenting on this PR:

* `@dependabot rebase` will rebase this PR
* `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
* `@dependabot merge` will merge this PR after your CI passes on it
* `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
* `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
* `@dependabot reopen` will reopen this PR if it is closed
* `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
* `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
* `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-10-21 12:03:06 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
64a558b120 chore(deps): bump github.com/strangelove-ventures/globalfee from 0.50.0 to 0.50.1 (#1130)
Bumps
[github.com/strangelove-ventures/globalfee](https://github.com/strangelove-ventures/globalfee)
from 0.50.0 to 0.50.1.

Release notes

*Sourced from* [*github.com/strangelove-ventures/globalfee's
releases*](https://github.com/strangelove-ventures/globalfee/releases)*.*

> ## v0.50.1
>
> **This is a consensus breaking release and requires a software upgrade
to implement.**
>
> This is just of a cleanup patch, no need to update if you do not want
too.
>
> ## What's Changed
>
> * refactor!: remove staking keeper usage in ante by `@​Reecepbcups` in
[strangelove-ventures/globalfee#5](https://redirect.github.com/strangelove-ventures/globalfee/pull/5)
>
> **Full Changelog**:
<https://github.com/strangelove-ventures/globalfee/compare/v0.50.0...v0.50.1>

Commits

* `905a334` refactor!: remove staking keeper & use "stake" for default 0
fee
([#5](https://redirect.github.com/strangelove-ventures/globalfee/issues/5))
* See full diff in [compare
view](https://github.com/strangelove-ventures/globalfee/compare/v0.50.0...v0.50.1)

![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/strangelove-ventures/globalfee&package-manager=go_modules&previous-version=0.50.0&new-version=0.50.1)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

---

Dependabot commands and options 

You can trigger Dependabot actions by commenting on this PR:

* `@dependabot rebase` will rebase this PR
* `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
* `@dependabot merge` will merge this PR after your CI passes on it
* `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
* `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
* `@dependabot reopen` will reopen this PR if it is closed
* `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
* `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
* `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
* `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Prad Nukala <prad@sonr.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-10-21 12:02:44 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
77047967ce build(deps): bump the go_modules group across 1 directory with 3 updates (#1146)
Bumps the go_modules group with 2 updates in the /interchaintest
directory:
[github.com/cometbft/cometbft](https://github.com/cometbft/cometbft) and
[github.com/docker/docker](https://github.com/docker/docker).

Updates `github.com/cometbft/cometbft` from 0.38.8 to 0.38.12
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cometbft/cometbft/releases">github.com/cometbft/cometbft's
releases</a>.</em></p>
<blockquote>
<h2>v0.38.12</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.12/CHANGELOG.md#v03812">CHANGELOG</a>
for this release.</p>
<h2>v0.38.11</h2>
<p><a
href="https://github.com/cometbft/cometbft/blob/v0.38.11/CHANGELOG.md#v03811">CHANGELOG</a></p>
<h2>v0.38.10</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.10/CHANGELOG.md#v03810">CHANGELOG</a>
for this release.</p>
<h2>v0.38.9</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.9/CHANGELOG.md#v0389">CHANGELOG</a>
for this release.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cometbft/cometbft/blob/v0.38.12/CHANGELOG.md">github.com/cometbft/cometbft's
changelog</a>.</em></p>
<blockquote>
<h2>v0.38.12</h2>
<p><em>September 3, 2024</em></p>
<p>This release includes a security fix for the light client and is
recommended
for all users.</p>
<h3>BUG FIXES</h3>
<ul>
<li><code>[light]</code> Cross-check proposer priorities in retrieved
validator sets
(<a
href="https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc">#ASA-2024-009</a>)</li>
<li><code>[privval]</code> Ignore duplicate privval listen when already
connected (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3828">#3828</a></li>
</ul>
<h3>DEPENDENCIES</h3>
<ul>
<li><code>[crypto/secp256k1]</code> Adjust to breaking interface changes
in
<code>btcec/v2</code> latest release, while avoiding breaking changes to
local CometBFT functions
(<a
href="https://redirect.github.com/cometbft/cometbft/pull/3728">#3728</a>)</li>
</ul>
<h3>IMPROVEMENTS</h3>
<ul>
<li><code>[types]</code> Check that proposer is one of the validators in
<code>ValidateBasic</code>
(<a
href="https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc">#ASA-2024-009</a>)</li>
<li><code>[e2e]</code> Add <code>log_level</code> option to manifest
file
(<a
href="https://redirect.github.com/cometbft/cometbft/pull/3819">#3819</a>).</li>
<li><code>[e2e]</code> Add <code>log_format</code> option to manifest
file
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3836">#3836</a>).</li>
</ul>
<h2>v0.38.11</h2>
<p><em>August 12, 2024</em></p>
<p>This release fixes a panic in consensus where CometBFT would
previously panic
if there's no extension signature in non-nil Precommit EVEN IF vote
extensions
themselves are disabled.</p>
<p>It also includes a few other bug fixes and performance
improvements.</p>
<h3>BUG FIXES</h3>
<ul>
<li><code>[types]</code> Only check IFF vote is a non-nil Precommit if
extensionsEnabled
types (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3565">#3565</a>)</li>
</ul>
<h3>IMPROVEMENTS</h3>
<ul>
<li><code>[indexer]</code> Fixed ineffective select break statements;
they now
point to their enclosing for loop label to exit
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3544">#3544</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cometbft/cometbft/commit/9722b6dfa1d0da3c3d4f73c1c779479971959d94"><code>9722b6d</code></a>
v0.38.12 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3982">#3982</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/52c00a537f8f56ed94b4a5c8af6e3fecff468b55"><code>52c00a5</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/f2ae0f4d1e92984c99fc2b9a6f520801b193d1b7"><code>f2ae0f4</code></a>
build(deps): Bump github.com/cosmos/gogoproto from 1.4.11 to 1.7.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3912">#3912</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/cbedf6d7f2ecf4617e734d26a9cd0142cc2425a6"><code>cbedf6d</code></a>
build(deps): Bump github.com/BurntSushi/toml from 1.2.1 to 1.4.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3908">#3908</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/1013c80759938f5605a2bd5357bf91795b01c850"><code>1013c80</code></a>
test(mempool): Add two <code>Update</code> benchmarks (backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/3873">#3873</a>)
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3892">#3892</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/2fb0cdd4291bb8a83c6e1ced1dd5c6fa2f1ae4d0"><code>2fb0cdd</code></a>
build(deps): Bump github.com/rs/cors from 1.8.3 to 1.11.1 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3907">#3907</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/dcbf35967f53000a8ac46933c43771059fee2289"><code>dcbf359</code></a>
build(deps): Bump github.com/Masterminds/semver/v3 from 3.2.0 to 3.3.0
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3906">#3906</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/8de81d5e395558a119ebab04f2bd2875c2947d76"><code>8de81d5</code></a>
build(deps): Bump golang.org/x/net from 0.26.0 to 0.28.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3905">#3905</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/221c7445ae7461bfc39dd526b88b4f92e2dd2c22"><code>221c744</code></a>
fix(privval): CV ignore duplicate privval listen when connected
(backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/38">#38</a>...</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/969c8d1d92a139d67c8c4fc5ea4468a2742cdce3"><code>969c8d1</code></a>
mempool: Fix the benchmarks (backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/934">#934</a>)
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3893">#3893</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/cometbft/cometbft/compare/v0.38.8...v0.38.12">compare
view</a></li>
</ul>
</details>
<br />

Updates `github.com/docker/docker` from 24.0.9+incompatible to
25.0.6+incompatible
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/docker/releases">github.com/docker/docker's
releases</a>.</em></p>
<blockquote>
<h2>v25.0.6</h2>
<h2>25.0.6</h2>
<p>For a full list of pull requests and changes in this release, refer
to the relevant GitHub milestones:</p>
<ul>
<li><a
href="https://github.com/docker/cli/issues?q=is%3Aclosed+milestone%3A25.0.6">docker/cli,
25.0.6 milestone</a></li>
<li><a
href="https://github.com/moby/moby/issues?q=is%3Aclosed+milestone%3A25.0.6">moby/moby,
25.0.6 milestone</a></li>
<li>Deprecated and removed features, see <a
href="https://github.com/docker/cli/blob/v25.0.6/docs/deprecated.md">Deprecated
Features</a>.</li>
<li>Changes to the Engine API, see <a
href="https://github.com/moby/moby/blob/v25.0.6/docs/api/version-history.md">API
version history</a>.</li>
</ul>
<h3>Security</h3>
<p>This release contains a fix for <a
href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41110">CVE-2024-41110</a>
/ <a
href="https://github.com/moby/moby/security/advisories/GHSA-v23v-6jw2-98fq">GHSA-v23v-6jw2-98fq</a>
that impacted setups using <a
href="https://docs.docker.com/engine/extend/plugins_authorization/">authorization
plugins (AuthZ)</a> for access control.</p>
<h3>Bug fixes and enhancements</h3>
<ul>
<li>[25.0] remove erroneous <code>platform</code> from image
<code>config</code> OCI descriptor in <code>docker save</code> output.
<a
href="https://redirect.github.com/moby/moby/pull/47695">moby/moby#47695</a></li>
<li>[25.0 backport] Fix a nil dereference when getting image history for
images having layers without the <code>Created</code> value set. <a
href="https://redirect.github.com/moby/moby/pull/47759">moby/moby#47759</a></li>
<li>[25.0 backport] apparmor: Allow confined runc to kill containers. <a
href="https://redirect.github.com/moby/moby/pull/47830">moby/moby#47830</a></li>
<li>[25.0 backport] Fix an issue where rapidly promoting a Swarm node
after another node was demoted could cause the promoted node to fail its
promotion. <a
href="https://redirect.github.com/moby/moby/pull/47869">moby/moby#47869</a></li>
<li>[25.0 backport] don't depend on containerd platform.Parse to return
a typed error. <a
href="https://redirect.github.com/moby/moby/pull/47890">moby/moby#47890</a></li>
<li>[25.0 backport] builder/mobyexporter: Add missing nil check <a
href="https://redirect.github.com/moby/moby/pull/47987">moby/moby#47987</a></li>
</ul>
<h3>Packaging updates</h3>
<ul>
<li>Update AWS SDK Go v2 to v1.24.1 for AWS CloudWatch logging driver.
<a
href="https://redirect.github.com/moby/moby/pull/47724">moby/moby#47724</a></li>
<li>Update Go runtime to 1.21.12, which contains security fixes for <a
href="https://github.com/advisories/GHSA-hw49-2p59-3mhj">CVE-2024-24791</a>
<a
href="https://redirect.github.com/moby/moby/pull/48146">moby/moby#48146</a></li>
<li>Update Containerd (static binaries only) to <a
href="https://github.com/containerd/containerd/releases/tag/v1.7.20">v1.7.20</a>.
<a
href="https://redirect.github.com/moby/moby/pull/48199">moby/moby#48199</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/moby/moby/compare/v25.0.5...v25.0.6">https://github.com/moby/moby/compare/v25.0.5...v25.0.6</a></p>
<h2>v25.0.5</h2>
<h2>25.0.5</h2>
<p>For a full list of pull requests and changes in this release, refer
to the relevant GitHub milestones:</p>
<ul>
<li><a
href="https://github.com/docker/cli/issues?q=is%3Aclosed+milestone%3A25.0.5">docker/cli,
25.0.5 milestone</a></li>
<li><a
href="https://github.com/moby/moby/issues?q=is%3Aclosed+milestone%3A25.0.5">moby/moby,
25.0.5 milestone</a></li>
<li>Deprecated and removed features, see <a
href="https://github.com/docker/cli/blob/v25.0.5/docs/deprecated.md">Deprecated
Features</a>.</li>
<li>Changes to the Engine API, see <a
href="https://github.com/moby/moby/blob/v25.0.5/docs/api/version-history.md">API
version history</a>.</li>
</ul>
<h3>Security</h3>
<p>This release contains a security fix for <a
href="https://github.com/moby/moby/security/advisories/GHSA-mq39-4gv4-mvpx">CVE-2024-29018</a>,
a potential data exfiltration from 'internal' networks via authoritative
DNS servers.</p>
<h3>Bug fixes and enhancements</h3>
<ul>
<li>
<p><a
href="https://github.com/moby/moby/security/advisories/GHSA-mq39-4gv4-mvpx">CVE-2024-29018</a>:
Do not forward requests to external DNS servers for a container that is
only connected to an 'internal' network. Previously, requests were
forwarded if the host's DNS server was running on a loopback address,
like systemd's 127.0.0.53. <a
href="https://redirect.github.com/moby/moby/pull/47589">moby/moby#47589</a></p>
</li>
<li>
<p>plugin: fix mounting /etc/hosts when running in UserNS. <a
href="https://redirect.github.com/moby/moby/pull/47588">moby/moby#47588</a></p>
</li>
<li>
<p>rootless: fix <code>open /etc/docker/plugins: permission
denied</code>. <a
href="https://redirect.github.com/moby/moby/pull/47587">moby/moby#47587</a></p>
</li>
<li>
<p>Fix multiple parallel <code>docker build</code> runs leaking disk
space. <a
href="https://redirect.github.com/moby/moby/pull/47527">moby/moby#47527</a></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/moby/moby/commit/b08a51fe16eed67de3861c03b363ba403643b12e"><code>b08a51f</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/docker/issues/48231">#48231</a>
from austinvazquez/backport-vendor-otel-v0.46.1-to-...</li>
<li><a
href="https://github.com/moby/moby/commit/d151b0f87f9673f206b477c90db25956e1704ba5"><code>d151b0f</code></a>
vendor: OTEL v0.46.1 / v1.21.0</li>
<li><a
href="https://github.com/moby/moby/commit/c6ba9a5124603357bfc4a64971cbb9708180f06e"><code>c6ba9a5</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/docker/issues/48225">#48225</a>
from austinvazquez/backport-workflow-artifact-reten...</li>
<li><a
href="https://github.com/moby/moby/commit/4673a3ca2c37ae30270a29c281ccd9477107dcee"><code>4673a3c</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/docker/issues/48227">#48227</a>
from austinvazquez/backport-backport-branch-check-t...</li>
<li><a
href="https://github.com/moby/moby/commit/30f89081028ce6fb1b49a71c02c156dacbe9aa62"><code>30f8908</code></a>
github/ci: Check if backport is opened against the expected branch</li>
<li><a
href="https://github.com/moby/moby/commit/7454d6a2e672b0b977aaa14463c9aeb53acd06af"><code>7454d6a</code></a>
ci: update workflow artifacts retention</li>
<li><a
href="https://github.com/moby/moby/commit/65cc597cea28cdc25bea3b8a86384b4251872919"><code>65cc597</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/moby/moby/commit/b722836927669b414569c42f096869cd800b59a6"><code>b722836</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/docker/issues/48199">#48199</a>
from austinvazquez/update-containerd-binary-to-1.7.20</li>
<li><a
href="https://github.com/moby/moby/commit/e8ecb9c76d97579ebbf3f9d3ef770d08ac303809"><code>e8ecb9c</code></a>
update containerd binary to v1.7.20</li>
<li><a
href="https://github.com/moby/moby/commit/e6cae1f2373d4ff37499570e67f23b2cebb7a043"><code>e6cae1f</code></a>
update containerd binary to v1.7.19</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/docker/compare/v24.0.9...v25.0.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `github.com/rs/cors` from 1.10.1 to 1.11.1
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rs/cors/commit/a814d7990a5449fcc211a536119d271469cc4157"><code>a814d79</code></a>
Re-add support for multiple Access-Control-Request-Headers field (fixes
<a
href="https://redirect.github.com/rs/cors/issues/184">#184</a>)...</li>
<li><a
href="https://github.com/rs/cors/commit/1562b1715b353146f279ff7d445b7412e0f1a842"><code>1562b17</code></a>
Removed redundant log nil checks (<a
href="https://redirect.github.com/rs/cors/issues/178">#178</a>)</li>
<li><a
href="https://github.com/rs/cors/commit/3d336ea9b505046d343dfb14f09f19fad17673b4"><code>3d336ea</code></a>
Update all dependencies to latest in examples (<a
href="https://redirect.github.com/rs/cors/issues/175">#175</a>)</li>
<li><a
href="https://github.com/rs/cors/commit/85fc0cac7b03634b6bcf9686f0283858b427d484"><code>85fc0ca</code></a>
Make Gin wrapper's status configurable and use 204 as default (fixes <a
href="https://redirect.github.com/rs/cors/issues/145">#145</a>)
(#...</li>
<li><a
href="https://github.com/rs/cors/commit/4c32059b2756926619f6bf70281b91be7b5dddb2"><code>4c32059</code></a>
Normalize allowed request headers and store them in a sorted set (fixes
<a
href="https://redirect.github.com/rs/cors/issues/170">#170</a>)...</li>
<li><a
href="https://github.com/rs/cors/commit/8d33ca4794eae9bcb270e306fd3e9b89cf07ec4c"><code>8d33ca4</code></a>
Complete documentation; deprecate AllowOriginRequestFunc in favour of
AllowOr...</li>
<li><a
href="https://github.com/rs/cors/commit/af821aecfc8d5a51ab050c39b85ae4698cc16a82"><code>af821ae</code></a>
Merge branch 'jub0bs-master'</li>
<li><a
href="https://github.com/rs/cors/commit/0bcf73f5c969d9ae35f1ed986ab27fbb37a58ff2"><code>0bcf73f</code></a>
Update benchmark</li>
<li><a
href="https://github.com/rs/cors/commit/eacc8e8b6c597a9f21aa46971bdfa7cfd39fbcc8"><code>eacc8e8</code></a>
Fix skewed middleware benchmarks (<a
href="https://redirect.github.com/rs/cors/issues/165">#165</a>)</li>
<li><a
href="https://github.com/rs/cors/commit/9297f1560644af50a550ea860e2e7a55d8fa70e6"><code>9297f15</code></a>
Respect the documented precedence of options (<a
href="https://redirect.github.com/rs/cors/issues/163">#163</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rs/cors/compare/v1.10.1...v1.11.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/onsonr/sonr/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-10-21 12:01:52 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Prad Nukala
c138f923ce build(deps): bump the go_modules group with 2 updates (#1145)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps the go_modules group with 2 updates:
[github.com/cometbft/cometbft](https://github.com/cometbft/cometbft) and
[google.golang.org/grpc](https://github.com/grpc/grpc-go).

Updates `github.com/cometbft/cometbft` from 0.38.8 to 0.38.12
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cometbft/cometbft/releases">github.com/cometbft/cometbft's
releases</a>.</em></p>
<blockquote>
<h2>v0.38.12</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.12/CHANGELOG.md#v03812">CHANGELOG</a>
for this release.</p>
<h2>v0.38.11</h2>
<p><a
href="https://github.com/cometbft/cometbft/blob/v0.38.11/CHANGELOG.md#v03811">CHANGELOG</a></p>
<h2>v0.38.10</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.10/CHANGELOG.md#v03810">CHANGELOG</a>
for this release.</p>
<h2>v0.38.9</h2>
<p>See the <a
href="https://github.com/cometbft/cometbft/blob/v0.38.9/CHANGELOG.md#v0389">CHANGELOG</a>
for this release.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cometbft/cometbft/blob/v0.38.12/CHANGELOG.md">github.com/cometbft/cometbft's
changelog</a>.</em></p>
<blockquote>
<h2>v0.38.12</h2>
<p><em>September 3, 2024</em></p>
<p>This release includes a security fix for the light client and is
recommended
for all users.</p>
<h3>BUG FIXES</h3>
<ul>
<li><code>[light]</code> Cross-check proposer priorities in retrieved
validator sets
(<a
href="https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc">#ASA-2024-009</a>)</li>
<li><code>[privval]</code> Ignore duplicate privval listen when already
connected (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3828">#3828</a></li>
</ul>
<h3>DEPENDENCIES</h3>
<ul>
<li><code>[crypto/secp256k1]</code> Adjust to breaking interface changes
in
<code>btcec/v2</code> latest release, while avoiding breaking changes to
local CometBFT functions
(<a
href="https://redirect.github.com/cometbft/cometbft/pull/3728">#3728</a>)</li>
</ul>
<h3>IMPROVEMENTS</h3>
<ul>
<li><code>[types]</code> Check that proposer is one of the validators in
<code>ValidateBasic</code>
(<a
href="https://github.com/cometbft/cometbft/security/advisories/GHSA-g5xx-c4hv-9ccc">#ASA-2024-009</a>)</li>
<li><code>[e2e]</code> Add <code>log_level</code> option to manifest
file
(<a
href="https://redirect.github.com/cometbft/cometbft/pull/3819">#3819</a>).</li>
<li><code>[e2e]</code> Add <code>log_format</code> option to manifest
file
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3836">#3836</a>).</li>
</ul>
<h2>v0.38.11</h2>
<p><em>August 12, 2024</em></p>
<p>This release fixes a panic in consensus where CometBFT would
previously panic
if there's no extension signature in non-nil Precommit EVEN IF vote
extensions
themselves are disabled.</p>
<p>It also includes a few other bug fixes and performance
improvements.</p>
<h3>BUG FIXES</h3>
<ul>
<li><code>[types]</code> Only check IFF vote is a non-nil Precommit if
extensionsEnabled
types (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3565">#3565</a>)</li>
</ul>
<h3>IMPROVEMENTS</h3>
<ul>
<li><code>[indexer]</code> Fixed ineffective select break statements;
they now
point to their enclosing for loop label to exit
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3544">#3544</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cometbft/cometbft/commit/9722b6dfa1d0da3c3d4f73c1c779479971959d94"><code>9722b6d</code></a>
v0.38.12 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3982">#3982</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/52c00a537f8f56ed94b4a5c8af6e3fecff468b55"><code>52c00a5</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/f2ae0f4d1e92984c99fc2b9a6f520801b193d1b7"><code>f2ae0f4</code></a>
build(deps): Bump github.com/cosmos/gogoproto from 1.4.11 to 1.7.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3912">#3912</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/cbedf6d7f2ecf4617e734d26a9cd0142cc2425a6"><code>cbedf6d</code></a>
build(deps): Bump github.com/BurntSushi/toml from 1.2.1 to 1.4.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3908">#3908</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/1013c80759938f5605a2bd5357bf91795b01c850"><code>1013c80</code></a>
test(mempool): Add two <code>Update</code> benchmarks (backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/3873">#3873</a>)
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3892">#3892</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/2fb0cdd4291bb8a83c6e1ced1dd5c6fa2f1ae4d0"><code>2fb0cdd</code></a>
build(deps): Bump github.com/rs/cors from 1.8.3 to 1.11.1 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3907">#3907</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/dcbf35967f53000a8ac46933c43771059fee2289"><code>dcbf359</code></a>
build(deps): Bump github.com/Masterminds/semver/v3 from 3.2.0 to 3.3.0
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3906">#3906</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/8de81d5e395558a119ebab04f2bd2875c2947d76"><code>8de81d5</code></a>
build(deps): Bump golang.org/x/net from 0.26.0 to 0.28.0 (<a
href="https://redirect.github.com/cometbft/cometbft/issues/3905">#3905</a>)</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/221c7445ae7461bfc39dd526b88b4f92e2dd2c22"><code>221c744</code></a>
fix(privval): CV ignore duplicate privval listen when connected
(backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/38">#38</a>...</li>
<li><a
href="https://github.com/cometbft/cometbft/commit/969c8d1d92a139d67c8c4fc5ea4468a2742cdce3"><code>969c8d1</code></a>
mempool: Fix the benchmarks (backport <a
href="https://redirect.github.com/cometbft/cometbft/issues/934">#934</a>)
(<a
href="https://redirect.github.com/cometbft/cometbft/issues/3893">#3893</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/cometbft/cometbft/compare/v0.38.8...v0.38.12">compare
view</a></li>
</ul>
</details>
<br />

Updates `google.golang.org/grpc` from 1.64.0 to 1.64.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's
releases</a>.</em></p>
<blockquote>
<h2>Release 1.64.1</h2>
<h1>Dependencies</h1>
<ul>
<li>Update x/net/http2 to address <a
href="https://nvd.nist.gov/vuln/detail/CVE-2023-45288">CVE-2023-45288</a>
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7352">#7352</a>)</li>
<li>metadata: remove String method from MD to make printing consistent
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7374">#7374</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/grpc/grpc-go/commit/4d833de0e0ea4345c2f8333f5e1d1155f93c5222"><code>4d833de</code></a>
Change version to 1.64.1 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7381">#7381</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/e9193a42987f93cf634aedb7c6f32d607281f8c4"><code>e9193a4</code></a>
*: update deps (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7375">#7375</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/ab292411ddc0f3b7a7786754d1fe05264c3021eb"><code>ab29241</code></a>
metadata: remove String method (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7374">#7374</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/355b9a557b63896fc569d8be1518905eabde0026"><code>355b9a5</code></a>
Change version to 1.64.1-dev (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7219">#7219</a>)</li>
<li>See full diff in <a
href="https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/onsonr/sonr/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Prad Nukala <prad@sonr.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Prad Nukala <prad@sonr.io>
2024-10-21 12:01:26 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d6b6c05640 build(deps): bump github.com/ipfs/kubo from 0.29.0 to 0.31.0 (#1148)
Bumps [github.com/ipfs/kubo](https://github.com/ipfs/kubo) from 0.29.0
to 0.31.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ipfs/kubo/releases">github.com/ipfs/kubo's
releases</a>.</em></p>
<blockquote>
<h2>v0.31.0</h2>
<ul>
<li><a
href="https://github.com/ipfs/kubo/blob/HEAD/#overview">Overview</a></li>
<li><a href="https://github.com/ipfs/kubo/blob/HEAD/#-discuss">🗣
Discuss</a></li>
<li><a href="https://github.com/ipfs/kubo/blob/HEAD/#-highlights">🔦
Highlights</a>
<ul>
<li><a
href="https://github.com/ipfs/kubo/blob/HEAD/#experimental-pebble-datastore">Experimental
Pebble Datastore</a></li>
<li><a href="https://github.com/ipfs/kubo/blob/HEAD/#new-metrics">New
metrics</a></li>
<li><a
href="https://github.com/ipfs/kubo/blob/HEAD/#lowpower-profile-no-longer-breaks-dht-announcements"><code>lowpower</code>
profile no longer breaks DHT announcements</a></li>
<li><a
href="https://github.com/ipfs/kubo/blob/HEAD/#go-123-boxo-024-and-go-libp2p-0365">go
1.23, boxo 0.24 and go-libp2p 0.36.5</a></li>
</ul>
</li>
<li><a href="https://github.com/ipfs/kubo/blob/HEAD/#-changelog">📝
Changelog</a></li>
<li><a
href="https://github.com/ipfs/kubo/blob/HEAD/#-contributors">👨‍👩‍👧‍👦
Contributors</a></li>
</ul>
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><!-- raw HTML
omitted --></p>
<p>This release was brought to you by the <a
href="http://ipshipyard.com/">Shipyard</a> team.</p>
<h3>Overview</h3>
<p>Release v0.31.0 issue <a
href="https://redirect.github.com/ipfs/kubo/issues/10499">#10499</a></p>
<h3>🗣 Discuss</h3>
<p>If you have comments, questions, or feedback on this release, please
post <a
href="https://discuss.ipfs.tech/t/kubo-v0-31-0-is-out/18611/1">here</a>.</p>
<p>If you experienced any bugs with the release, please <a
href="https://github.com/ipfs/kubo/issues/new/choose">post an
issue</a>.</p>
<h3>🔦 Highlights</h3>
<h4>Experimental Pebble Datastore</h4>
<blockquote>
<!-- raw HTML omitted -->
<p><em>Pebble visits Kubo</em></p>
</blockquote>
<p><a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#pebbleds-profile">Pebble</a>
provides a high-performance alternative to leveldb as the datastore, and
provides a modern replacement for <a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#badgerds-profile">legacy
badgerv1</a>.</p>
<p>A fresh Kubo node can be initialized with <a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#pebbleds-profile"><code>pebbleds</code>
profile</a> via <code>ipfs init --profile pebbleds</code>.</p>
<p>There are a number of parameters available for tuning pebble's
performance to your specific needs. Default values are used for any
parameters that are not configured or are set to their zero-value.
For a description of the available tuning parameters, see <a
href="https://github.com/ipfs/kubo/blob/master/docs/datastores.md#pebbleds">kubo/docs/datastores.md#pebbleds</a>.</p>
<h4>New metrics</h4>
<ul>
<li>Added 3 new go metrics: <code>go_gc_gogc_percent</code>,
<code>go_gc_gomemlimit_bytes</code> and
<code>go_sched_gomaxprocs_threads</code> as those are <a
href="https://redirect.github.com/prometheus/client_golang/pull/1559">recommended
by the Go team</a></li>
<li>Added <a
href="https://redirect.github.com/prometheus/client_golang/pull/1555">network
usage metrics</a>: <code>process_network_receive_bytes_total</code> and
<code>process_network_transmit_bytes_total</code></li>
<li>Removed <code>go_memstat_lookups_total</code> metric <a
href="https://redirect.github.com/prometheus/client_golang/pull/1577">which
was always 0</a></li>
</ul>
<h4><code>lowpower</code> profile no longer breaks DHT
announcements</h4>
<p>We've notices users were applying <code>lowpower</code> profile, and
then reporting content routing issues. This was because
<code>lowpower</code> disabled reprovider system and locally hosted data
was no longer announced on Amino DHT.</p>
<p>This release changes <a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#lowpower-profile"><code>lowpower</code>
profile</a> to not change reprovider settings, ensuring the new users
are not sabotaging themselves. It also adds <a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-on-profile"><code>annouce-on</code></a>
and <a
href="https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-off-profile"><code>announce-off</code></a>
profiles for controlling announcement settings separately.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ipfs/kubo/commit/5a32936f781ac1971899655856a2804cdf329032"><code>5a32936</code></a>
Merge pull request <a
href="https://redirect.github.com/ipfs/kubo/issues/10535">#10535</a>
from ipfs/release-v0.31.0</li>
<li><a
href="https://github.com/ipfs/kubo/commit/4aebe7f27b578565c577541fa32bfc5a058a0bca"><code>4aebe7f</code></a>
Add full changelog to release changelog</li>
<li><a
href="https://github.com/ipfs/kubo/commit/8135adc8538431b6b14408e34ccf9913d87a754d"><code>8135adc</code></a>
update version for release</li>
<li><a
href="https://github.com/ipfs/kubo/commit/bd9e1548183fcf295e17fe6c17034633b61f045d"><code>bd9e154</code></a>
chore: 0.31.0-rc2</li>
<li><a
href="https://github.com/ipfs/kubo/commit/598545171cdc41aa2050617ef3a3b712682a8a99"><code>5985451</code></a>
fix: go 1.23(.2) (<a
href="https://redirect.github.com/ipfs/kubo/issues/10540">#10540</a>)</li>
<li><a
href="https://github.com/ipfs/kubo/commit/6b3cd0d14f88f305e9f358443cc3ed1d6dc38826"><code>6b3cd0d</code></a>
chore: typo</li>
<li><a
href="https://github.com/ipfs/kubo/commit/38ae2e73b2cc70cc22a4a4e0adb699951bfe1762"><code>38ae2e7</code></a>
chore: go-libp2p v0.36.5 (<a
href="https://redirect.github.com/ipfs/kubo/issues/10538">#10538</a>)</li>
<li><a
href="https://github.com/ipfs/kubo/commit/a55215c5c1c4284370751b830b1711ee26b5f789"><code>a55215c</code></a>
chore: bump version to v0.31.0-rc1</li>
<li><a
href="https://github.com/ipfs/kubo/commit/52ca3707591cad8ae99fd0a03b7e278487192e71"><code>52ca370</code></a>
feat(routing/http): support IPIP-484 and streaming (<a
href="https://redirect.github.com/ipfs/kubo/issues/10534">#10534</a>)</li>
<li><a
href="https://github.com/ipfs/kubo/commit/6305932b4ef5ca816d8a6f94fccc5b601f16701a"><code>6305932</code></a>
fix(daemon): webui URL when rpc is catch-all (<a
href="https://redirect.github.com/ipfs/kubo/issues/10520">#10520</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ipfs/kubo/compare/v0.29.0...v0.31.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/ipfs/kubo&package-manager=go_modules&previous-version=0.29.0&new-version=0.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 12:00:00 -04:00
github-actions[bot] c89d3dd542 bump: version 0.5.12 → 0.5.13 2024-10-21 15:35:28 +00:00
Prad Nukala a9caac47d7 Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 11:31:28 -04:00
Prad NukalaandGitHub 311b957550 feature/1118 formatter interface creation (#1147)
- **refactor: improve query service code structure**
- **chore(deps): update protoc-gen-go-grpc to v1.5.1**
- **refactor: replace  package with**
- **chore(deps): update dependencies**
- **fix(deps): update webauthn to v0.11.2**
- **refactor: remove onsonr.sonr from package names**
- **refactor: improve code readability in vault querier**
- **refactor: simplify controller initialization**
- **fix: remove unnecessary function for counter data**
- **refactor: update button component file paths**
- **refactor(authentication): simplify register page**
- **fix: update error filenames in marketing section templates**
2024-10-21 11:30:52 -04:00
Prad Nukala 3ad6036eb8 refactor: update gRPC client to use new request types 2024-10-18 15:10:09 -04:00
Prad Nukala a0a5f0c7e0 refactor: use RawPublicKey instead of PublicKey in macaroon issuer 2024-10-18 14:09:16 -04:00
Prad Nukala 6da6f2b97b feat: add custom secp256k1 pubkey 2024-10-18 13:45:57 -04:00
Prad Nukala a7df1415d2 refactor: improve error handling in DID module 2024-10-18 13:36:29 -04:00
Prad Nukala 381a09d87e Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-18 13:18:32 -04:00
github-actions[bot] c4aebe4ac3 bump: version 0.5.11 → 0.5.12 2024-10-18 17:18:09 +00:00
Prad Nukala 08e28b0a5f docs: Add README for protobuf directory 2024-10-18 13:18:00 -04:00
Prad Nukala cc6f4e6931 fix(version): revert version bump to 0.5.11 2024-10-18 13:17:04 -04:00
Prad Nukala 08c946547e refactor: remove dependency on proto change detection 2024-10-18 13:14:48 -04:00
Prad Nukala 64297772e4 fix(version): update version to 0.5.12 2024-10-18 13:12:55 -04:00
Prad Nukala e1ad117473 refactor: update asset publishing configuration 2024-10-18 13:08:53 -04:00
Prad NukalaandGitHub 2cd44c0b66 feature/1125 offload sync service worker (#1144)
- **feat: provide access to block time**
- **refactor: move block expiry calculation to helper function**
- **feat: register decentralized web node HTMX views**
- **feat: Reorganize methods in layout.templ file alphabetically**
- **feat: add support for layout variants**
- **feat: update Allocate RPC to use GET request with path parameters**
- **feat: add gRPC Gateway endpoint for Allocate**
- **refactor: rename SyncCurrent to Sync**
- **feat: improve code organization by making vault assembly private**
- **feat: add a new method for syncing DID documents**
2024-10-18 13:07:52 -04:00
github-actions[bot] c2f7a53017 bump: version 0.5.12 → 0.6.0 2024-10-15 18:36:09 +00:00
Prad NukalaandGitHub b6c49828ed feature/1111 sync chain dwn endpoint (#1143)
- **feat(did): add assertion type to DID spec**
- **refactor: update build process to include assets generation**
- **refactor: update import paths for  to**
- **feat: introduce new authentication state management**
- **feat: add current account route**
- **feat: implement global toasts with custom HTML**
- **refactor: remove unused session code**
- **feat: add config.json to embedded assets**
- **refactor: remove unused dependency on gorilla/sessions**
- **refactor: simplify session management and remove unnecessary
fields**
- **fix: remove unnecessary import for unused protobuf types**
- **feat: introduce separate HTTP contexts for Highway and DWN**
- **fix(keeper): Handle missing controller during initial sync**
- **refactor: extract DWN configuration from DWNContext**
- **feat: add  view route**
- **fix: update configuration file name in embed.go**
- **feat: improve vaultindex page loading experience**
- **feat(hway): add highway context to echo context**
- **chore(deps): bump onsonr/crypto from 1.32.0 to 1.33.0**
- **refactor: rename DWNSessionMiddleware to WebNodeSessionMiddleware**
- **feat: rename client API to web node API**
- **refactor: separate API and view routes**
- **refactor: remove unused build targets in Makefile**
- **feat: add Devbox integration to container**
- **feat: add wasm support for dwn**
- **refactor: update module proto import**
- **feat: add default first and third party caveats**
- **feat: Add target vault allocation mechanism**
- **refactor: introduce standardized session cookie handling**
- **fix: update service worker installation and ready states**
- **feat: add worker handlers**
- **feat: Enable SSH access to devcontainer**
- **refactor: rename HighwayContext to HwayContext**
- **feat: add block expiration calculation to sonr context**
- **feat: remove config from cookie and header**
- **feat(gen): Remove generated code for IPFS, Motr and Sonr**
- **refactor: remove unused createMotrConfig function**
- **feat: add project analytics with Repobeats**
- **docs: Remove component details from README**
- **refactor: rename SetConfig to injectConfig**
2024-10-15 14:31:19 -04:00
Prad Nukala 104df074e9 feat: add User-Agent and Platform to session 2024-10-12 12:52:20 -04:00
Prad Nukala 58aa71997d feat: introduce AuthState enum for authentication state 2024-10-11 19:03:14 -04:00
github-actions[bot] 9a3c8e000b bump: version 0.5.11 → 0.5.12 2024-10-11 20:55:30 +00:00
Prad NukalaandGitHub 3790e926de feature/1109 grpc session model (#1141)
- **feat: remove Hway deployment**
- **feat: introduce session middleware for requests**
- **refactor: update path imports to use new pkg folder**
- **feat: add gRPC client for interacting with services**
- **feat: remove grpc client and use REST api**
- **refactor: move  from  to**
- **feat: add client views endpoint**
- **feat: add webauthn support**
- **closes: #1124**
- **refactor: Improve PR labeler configuration**
- **feat: add milestone discussion template**
- **feat: remove OKR tracking issue template**
- **feat: use gorilla sessions for session management**
- **refactor: move pubkey related code to**
- **<no value>**
- **refactor: remove unused identifier type**
- **feat: integrate Macaroon Keeper with Service Module**
- **refactor: rename worker routes for clarity**
2024-10-11 16:47:52 -04:00
github-actions[bot] 1d569d35b4 bump: version 0.5.10 → 0.5.11 2024-10-10 17:52:37 +00:00
Prad Nukala 4e8db8d3d4 refactor: remove unnecessary branch configuration from scheduled release workflow 2024-10-10 13:47:52 -04:00
Prad Nukala 02f161f76c fix: Correct source directory for asset publishing 2024-10-10 13:47:31 -04:00
Prad Nukala c17bdebffd Merge branch 'develop' 2024-10-10 13:45:50 -04:00
Prad NukalaandGitHub 279ab6e5e3 feature/1129 integrate webauthn controller (#1135)
* **refactor: remove nebula static file serving**
* **feat: Add login, register, and authorize sections**
* **feat: implement registration form UI**
* **refactor: abstract template rendering to ctx module**
* **feat: add deployment target for Highway gateway**
* **feat: migrate Highway gateway to Cloudflare Workers**
* **feat: refactor nebula routes to components**
* **chore(deps): remove unused dependencies**
* **chore(deps): remove unused dependencies**
* **feat: add user and relaying party entities**
* **refactor: remove unused imports**
* 
* **feat: add motion scale-in and opacity-in animations**
* **refactor: move dwn and orm packages to internal**
* **refactor: update imports to use relative paths**
* **refactor: rename build targets for clarity**
* **feat: add RelayingPartyEntity model**
* **refactor: rename creds templates to credentials**
* **refactor: remove unused entity model**
* **refactor: move models to internal package**
* **refactor: move models package to internal/orm**
* **feat: implement broadcast channel context**
* **feat: remove config upload step**
* **feat: remove unused configuration files**
* **feat: migrate authentication logic to workers**
* **feat: remove cloudflared dependency**
* **refactor: move client related routes to 'routes/client.go'**
* **feat: implement macaroon middleware**
* **refactor: move fetch package to cmd/motr**
* **feat: remove auth and grant endpoints**
* **docs: add conceptual descriptions to did module**

<sub><a
href="https://huly.app/guest/sonrhq?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsaW5rSWQiOiI2NzA4MTIyNmM3ZDZhNTZhOGY4ZGFjOTciLCJndWVzdCI6InRydWUiLCJlbWFpbCI6IiNndWVzdEBoYy5lbmdpbmVlcmluZyIsIndvcmtzcGFjZSI6InctcHJhZC1zb25yaHEtNjVlZjcyZDQtY2UyOGQ0ODJjNi00ZWY4ZDAifQ.j-w5jk5Ji-0vCkaxVaK8pDMIOhRsXmG7o6oZictoHYE">Huly&reg;:
<b>ENG-1057</b></a></sub>
2024-10-10 13:44:17 -04:00
Prad Nukala 0a16e41c78 refactor: update dwn configuration generation import path 2024-10-09 14:20:02 -04:00
Prad Nukala 45c4e0c850 refactor: use nebula/routes instead of nebula/global 2024-10-09 14:19:41 -04:00
Prad Nukala 32563a551d refactor: move index template to routes package 2024-10-09 14:18:50 -04:00
Prad Nukala a824c23022 refactor: remove cdn package and move assets to global styles 2024-10-09 14:16:53 -04:00
Prad Nukala 58a02be5cf feat: nebula assets served from CDN 2024-10-09 14:15:05 -04:00
Prad Nukala 5df9d4a3e5 refactor: move nebula assets to hway build directory 2024-10-09 00:37:50 -04:00
Prad Nukala a3edb65613 feat: use CDN for nebula frontend assets 2024-10-08 21:55:01 -04:00
Prad Nukala 3637f27369 feat: add static hero section content to homepage 2024-10-08 21:06:24 -04:00
Prad Nukala 8811f56559 feat: add wrangler scripts for development, build, and deployment 2024-10-08 19:22:44 -04:00
Prad Nukala e1db07cc25 feat: remove build configuration 2024-10-08 18:15:37 -04:00
Prad Nukala e928ce22b4 refactor: remove docker build and deployment 2024-10-08 17:32:49 -04:00
Prad Nukala 2970497683 feat: move gateway web code to dedicated directory 2024-10-08 17:26:01 -04:00
Prad Nukala 25cddbada6 refactor: rename internal/session package to internal/ctx 2024-10-08 17:22:14 -04:00
Prad Nukala 35348fef6a refactor: remove unused fields from 2024-10-08 17:13:22 -04:00
Prad Nukala f6879f1c12 feat: add PubKey fast reflection 2024-10-08 16:43:59 -04:00
Prad Nukala c3e8fcc3d3 feat(macaroon): add transaction allowlist/denylist caveats 2024-10-08 16:26:21 -04:00
Prad Nukala 8ac1ccaa34 feat: add PR labeler 2024-10-08 13:17:41 -04:00
Prad Nukala a7d604555a refactor: rename PR_TEMPLATE to PULL_REQUEST_TEMPLATE 2024-10-08 12:27:05 -04:00
Prad Nukala 8bc356774a docs: remove unnecessary information from PR template 2024-10-08 12:25:30 -04:00
Prad Nukala 1dfba6ffbb docs: add PR templates for closed issues and community contributions 2024-10-08 11:59:48 -04:00
Prad Nukala e4c8997bf3 Merge branch 'develop' into feature/1129-integrate-webauthn-controller 2024-10-08 11:53:35 -04:00
Prad Nukala 980c474bdf refactor: remove devbox.json init hook 2024-10-08 11:53:28 -04:00
Prad NukalaandGitHub ded13c232c Create dependabot.yml
Signed-off-by: Prad Nukala <prad@sonr.io>
2024-10-08 11:53:18 -04:00
Prad Nukala a8b6eead26 feat(devbox): remove hway start command 2024-10-08 00:52:27 -04:00
Prad Nukala 81c800ce54 refactor: rename sonrd dockerfile to Dockerfile 2024-10-08 00:51:06 -04:00
Prad Nukala c983b77c4f refactor: remove unused dependency 2024-10-07 23:16:44 -04:00
Prad Nukala b5dc577d01 refactor: rename 'global/cdn' to 'assets' 2024-10-07 23:16:03 -04:00
Prad Nukala ca51df20d6 refactor: move CDN assets to separate folder 2024-10-07 23:15:18 -04:00
Prad Nukala b19d5d06a0 fix: install dependencies before nebula build 2024-10-07 23:14:06 -04:00
Prad Nukala 2772e568d5 feat: add GitHub Actions workflow for running tests 2024-10-07 21:31:56 -04:00
Prad Nukala 59944e19db feat: add workflow for deploying Hway to Cloudflare Workers 2024-10-07 21:28:50 -04:00
Prad Nukala ba4483b5ec feat: Publish configs to R2 2024-10-07 21:24:12 -04:00
Prad Nukala fbc640b7c4 fix: update Schema service to use new API endpoint 2024-10-07 21:22:56 -04:00
Prad Nukala af6e07323b feat: integrate nebula UI with worker-assets-gen 2024-10-07 21:15:25 -04:00
Prad Nukala e926e5b9d6 refactor: move Pkl module definitions to dedicated package 2024-10-07 20:35:40 -04:00
Prad Nukala ddf745f39a refactor: move CDN assets to js/ folder 2024-10-07 20:24:18 -04:00
Prad Nukala d0dddbfe01 feat: extract reusable layout components 2024-10-07 20:14:46 -04:00
Prad Nukala c608a067ed feat: Implement service worker for IPFS vault 2024-10-07 20:13:38 -04:00
Prad Nukala fa7b11198e feat: implement CDN support for assets 2024-10-07 16:38:10 -04:00
Prad Nukala 8bd68c4269 feat: add payment method support 2024-10-07 16:30:54 -04:00
Prad Nukala 55f3e0f7e0 feat: add support for public key management 2024-10-07 14:02:04 -04:00
Prad Nukala f7f0c11587 feat: add ModalForm component 2024-10-07 13:59:29 -04:00
Prad Nukala b633d21ea8 feat: add LoginStart and RegisterStart routes 2024-10-07 13:48:28 -04:00
Prad Nukala 2d5cb7e5b8 feat: implement authentication views 2024-10-07 12:59:08 -04:00
Prad Nukala dba9a119ef feat: add json tags to config structs 2024-10-07 10:49:25 -04:00
Prad Nukala 6fc52fd62d feat: implement templ forms for consent privacy, credential assert, credential register, and profile details 2024-10-07 10:48:57 -04:00
Prad Nukala 37fb0b3aca refactor: remove unused component templates 2024-10-07 10:39:50 -04:00
Prad Nukala c35d3bb1ae refactor: move ui components to global 2024-10-07 10:31:39 -04:00
Prad Nukala ab476712af feat(vault): introduce assembly of the initial vault 2024-10-07 10:24:30 -04:00
Prad Nukala e424faaba2 feat: add client logos to homepage 2024-10-07 10:22:24 -04:00
Prad Nukala b68b47ab32 fix: fix broken logo image path 2024-10-07 10:22:13 -04:00
Prad Nukala bda8171af4 feat: add tailwind utility classes 2024-10-07 10:21:07 -04:00
Prad Nukala bac98b5e38 feat: implement new profile card component 2024-10-07 10:20:14 -04:00
Prad Nukala 0f2a5bf2b4 refactor: move view handlers to router package 2024-10-07 09:57:06 -04:00
Prad Nukala 9ebd80f740 <no value> 2024-10-07 09:48:21 -04:00
Prad Nukala a76d264a0c docs: add Eraser link to README 2024-10-07 09:46:25 -04:00
Prad Nukala 0be7ed7ecf docs: add operations section to README 2024-10-07 09:05:55 -04:00
github-actions[bot] 5c6303486c bump: version 0.5.9 → 0.5.10 2024-10-07 01:22:13 +00:00
Prad Nukala 2ccd2cea22 feat(blocks): remove button component 2024-10-06 21:20:39 -04:00
Prad NukalaandGitHub d93c19c2ab feature/1107 integrate dexie db (#1128)
- **feat: remove grant page**
- **refactor: remove alert, input, radios, tabs, and video blocks**
- **feat: add JSON serialization to DWN config**
- **feat: add new Highway gateway component**
- **refactor: remove unused chains.yaml and devbox.json**
- **refactor: Separate request and response headers into protected and
non-protected structs**
- **feat: Update the UseSession echo middleware to bind the correct
headers and provide methods for updating HTMX context from Go**
- **refactor: remove unused headers from session**
- **feat: add authorize endpoint**
- **feat: create marketing pages**
2024-10-06 20:07:24 -04:00
github-actions[bot] 4e98504813 bump: version 0.5.8 → 0.5.9 2024-10-06 16:17:52 +00:00
Prad Nukala ab0bd3a5e1 fix: Update source directory for asset publishing 2024-10-06 12:16:37 -04:00
Prad Nukala 62628ed0d8 feat: add Motr support 2024-10-06 11:39:23 -04:00
Prad Nukala b1e5464843 feat: update UIUX PKL to utilize optional fields 2024-10-05 12:41:47 -04:00
github-actions[bot] 8e1359f126 bump: version 0.5.7 → 0.5.8 2024-10-04 09:36:56 +00:00
Prad Nukala f84a87574c Merge branch 'develop' 2024-10-04 05:35:42 -04:00
Prad Nukala 1c16d367ed refactor: Remove unused logs configuration 2024-10-04 05:35:37 -04:00
github-actions[bot] dc191fdbba bump: version 0.5.6 → 0.5.7 2024-10-04 09:29:25 +00:00
Prad Nukala 875c410443 feat(devbox): use process-compose for testnet services 2024-10-04 05:27:51 -04:00
Prad Nukala bcf5dfa70c refactor: update issue template headings 2024-10-04 02:01:12 -04:00
Prad Nukala 77d76938a3 feat: remove motr.mjs dependency 2024-10-04 01:57:43 -04:00
Prad Nukala 1267bc426a docs: add markdown rendering for objective description 2024-10-04 00:18:53 -04:00
Prad Nukala 5e74045f3d <no value> 2024-10-04 00:16:21 -04:00
Prad Nukala 3adf42925d feat: add markdown rendering to issue templates 2024-10-04 00:05:55 -04:00
Prad Nukala f95fa2c906 feat: update issue templates for better clarity 2024-10-04 00:02:52 -04:00
Prad Nukala ac2f65844c refactor: rename bug-report issue template to bug 2024-10-03 23:58:56 -04:00
Prad Nukala 546dd7b4ad feat: add issue templates for tracking and task issues 2024-10-03 23:47:37 -04:00
Prad Nukala fcf4ab5b4f feat: add issue templates for bug report and tracking 2024-10-03 23:39:43 -04:00
Prad NukalaandGitHub c57d5e8f1a feature/macaroon ante handler (#1105)
- **feat: add dstlled-diff workflow**
- **feat: Add Sonr community support and security bug bounty links**
2024-10-03 23:20:21 -04:00
Prad Nukala cd57226a45 Merge branch 'master' into develop 2024-10-03 20:47:25 -04:00
Prad Nukala f5a11061ac feat: introduce docker-compose based setup 2024-10-03 20:47:21 -04:00
github-actions[bot] 93a3d814d6 bump: version 0.5.5 → 0.5.6 2024-10-03 23:26:56 +00:00
Prad Nukala a0e24880c3 Merge branch 'develop' 2024-10-03 19:25:57 -04:00
Prad Nukala e63ec7f22a feat: add hway and sonr processes to dev environment 2024-10-03 19:25:42 -04:00
github-actions[bot] 6910a415a2 bump: version 0.5.4 → 0.5.5 2024-10-03 21:53:36 +00:00
Prad Nukala fccb42761c feat: add rudimentary DidController table 2024-10-03 17:49:29 -04:00
Prad Nukala f75ff0d3be refactor: reorganize pkl files for better separation of concerns 2024-10-03 01:01:49 -04:00
Prad Nukala 931ac2308d feat: update home section with new features 2024-10-02 20:37:18 -04:00
Prad Nukala 42c5ab642e feat: introduce Home model and refactor views 2024-10-02 20:23:28 -04:00
Prad Nukala 8d8935c045 feat(nebula): create Home model for home page 2024-10-02 18:01:30 -04:00
Prad Nukala 3baec2745b refactor: rename msg_server_test.go to rpc_test.go 2024-10-02 16:30:48 -04:00
github-actions[bot] df72b55fe3 bump: version 0.5.3 → 0.5.4 2024-10-02 19:04:16 +00:00
Prad Nukala cbc5a35bcd Merge branch 'develop' 2024-10-02 15:02:42 -04:00
Prad Nukala 959562c5ff chore: configure telegram release announcements 2024-10-02 15:02:31 -04:00
github-actions[bot] 84aa1dd79e bump: version 0.5.2 → 0.5.3 2024-10-02 08:59:33 +00:00
Prad Nukala d49a579cd6 fix: remove unnecessary telegram message template 2024-10-02 04:58:08 -04:00
github-actions[bot] 1a3641e605 bump: version 0.5.1 → 0.5.2 2024-10-02 08:38:11 +00:00
Prad Nukala a05d1bb5d2 refactor: revert version bump to 0.5.1 2024-10-02 04:36:50 -04:00
Prad Nukala aaea70786b style: remove unnecessary period from telegram message template 2024-10-02 04:36:14 -04:00
github-actions[bot] 3d17feef0a bump: version 0.5.1 → 0.5.2 2024-10-02 08:22:50 +00:00
Prad Nukala 9e938adc29 Merge branch 'develop' 2024-10-02 04:21:16 -04:00
Prad NukalaandGitHub 8ef7a7eab7 feat(service): integrate group module (#1104) 2024-10-02 04:20:55 -04:00
github-actions[bot] 03f822b117 bump: version 0.5.0 → 0.5.1 2024-10-02 06:15:07 +00:00
Prad Nukala ae56055640 refactor: move Motr API to state package 2024-10-02 02:13:25 -04:00
github-actions[bot] 75c65228fc bump: version 0.4.5 → 0.5.0 2024-10-02 05:46:00 +00:00
Prad Nukala 52b9f60261 feat: allow multiple macaroons with the same id 2024-10-02 01:44:30 -04:00
Prad NukalaandGitHub edb109b542 feature/dwn sw js (#1103)
- **feat(macaroon): add  and  to macaroon genesis**
- **refactor: move schema definitions to dedicated file**
- **feat: remove Session model**
- **refactor: move session middleware to internal package**
2024-10-02 01:40:49 -04:00
github-actions[bot] d62fb30eb8 bump: version 0.4.4 → 0.4.5 2024-10-02 03:33:40 +00:00
Prad Nukala c1bdcc2d93 Merge branch 'feature/dwn-sw-js' 2024-10-01 23:32:13 -04:00
Prad Nukala 35bedf8f65 fix: use correct secret for docker login 2024-10-01 23:32:06 -04:00
github-actions[bot] 7f54ad66f7 bump: version 0.4.3 → 0.4.4 2024-10-02 03:31:22 +00:00
Prad Nukala 0b70938525 chore: add docker login step in workflow 2024-10-01 23:30:41 -04:00
Prad Nukala 5a2ac6ae31 chore: remove duplicate docker image tags 2024-10-01 23:29:42 -04:00
github-actions[bot] 3aed1522cd bump: version 0.4.2 → 0.4.3 2024-10-02 02:19:15 +00:00
Prad Nukala b5ad833965 refactor: use single GITHUB_TOKEN for release workflow 2024-10-01 22:17:44 -04:00
Prad Nukala a8c48d4961 refactor: update workflow variables 2024-10-01 22:16:05 -04:00
github-actions[bot] b56c98c678 bump: version 0.4.2 → 0.5.0 2024-10-02 02:03:58 +00:00
Prad Nukala cea6b77fdd feat(release): add docker images for sonrd and motr 2024-10-01 22:02:14 -04:00
Prad Nukala 5bc9ff07c0 fix(layout): add missing favicon 2024-10-01 19:36:15 -04:00
Prad Nukala 08451a846c feat: update homepage with new visual design 2024-10-01 19:23:24 -04:00
Prad Nukala fa6bb93c78 feat: add DID to vault genesis schema 2024-10-01 18:55:02 -04:00
Prad Nukala f5f0578dcc feat: add video component 2024-10-01 18:14:03 -04:00
Prad Nukala ca2aa476d9 feat: add video component 2024-10-01 18:06:43 -04:00
Prad Nukala ab33d8235f fix(hero): Use hx-swap for primary button to prevent flicker 2024-10-01 17:58:05 -04:00
Prad Nukala 730cda4390 feat: add hx-get attribute to primary button in hero section 2024-10-01 17:52:04 -04:00
github-actions[bot] 1f5c735b31 bump: version 0.4.1 → 0.4.2 2024-10-01 21:27:52 +00:00
Prad Nukala 3b93b782fe refactor: use single GITHUB_TOKEN for release workflow 2024-10-01 17:26:15 -04:00
github-actions[bot] 9cb3365356 bump: version 0.4.0 → 0.4.1 2024-10-01 21:04:50 +00:00
Prad Nukala dc344c5eac fix(version): update version number to 0.4.0 2024-10-01 17:03:20 -04:00
Prad Nukala 0451c30d6e feat: Implement session management 2024-10-01 17:02:54 -04:00
github-actions[bot] 23588cc7ff bump: version 0.4.0 → 0.4.1 2024-10-01 20:42:53 +00:00
Prad Nukala 45602058f6 fix: update release workflow to use latest tag 2024-10-01 16:41:26 -04:00
github-actions[bot] e8218d77a4 bump: version 0.9.0 → 0.10.0 2024-10-01 20:18:31 +00:00
Prad Nukala 671b12f912 docs: remove obsolete release from changelog 2024-10-01 16:18:07 -04:00
Prad Nukala 8fd52ec802 fix(versioning): revert version to 0.9.0 2024-10-01 16:16:40 -04:00
Prad Nukala bf1ebd21bc chore(release): include all pkl files in release 2024-10-01 16:12:29 -04:00
Prad Nukala a957447b13 chore(release): Use YYYY.MM.DD format for release name 2024-10-01 15:05:11 -04:00
github-actions[bot] 4108df82a0 bump: version 0.9.0 → 0.10.0 2024-10-01 18:56:55 +00:00
Prad Nukala 4bdac1842a feat: allow manual release triggers 2024-10-01 14:55:48 -04:00
github-actions[bot] 1e16e459b5 bump: version 0.8.0 → 0.9.0 2024-10-01 18:54:14 +00:00
Prad Nukala fd20951650 chore: update goreleaser configuration for version 2 2024-10-01 14:53:39 -04:00
Prad Nukala de9b4bf72f feat: add Input and RegistrationForm models 2024-10-01 14:43:25 -04:00
Prad Nukala ece8d85074 feat: add new utility classes 2024-10-01 14:42:38 -04:00
Prad Nukala e807691c64 feat: add login and registration pages 2024-10-01 14:42:11 -04:00
Prad Nukala d486becbc6 refactor: move home page sections to home package 2024-10-01 13:48:28 -04:00
Prad Nukala a7721885c2 fix(cta): Fix typo in CTA title 2024-10-01 10:34:31 -04:00
Prad Nukala c66d50dcc0 fix: change bento section title to reflect security focus 2024-10-01 10:34:02 -04:00
Prad Nukala 88e7dd5812 feat: add tailwindcss utilities 2024-10-01 02:09:04 -04:00
Prad Nukala aac2a981bc chore(release): remove unused brew id 2024-09-30 22:42:15 -04:00
github-actions[bot] 4401b089e1 bump: version 0.7.0 → 0.8.0 2024-10-01 02:29:25 +00:00
Prad Nukala 6d5cacb642 feat: add support for ARM64 architecture 2024-09-30 22:29:00 -04:00
github-actions[bot] 1e6667a9c9 bump: version 0.6.0 → 0.7.0 2024-10-01 02:22:43 +00:00
Prad Nukala 1c08e786a6 feat: add DWN resolver field 2024-09-30 22:22:04 -04:00
Prad Nukala d6676ce551 refactor: rename motrd to motr 2024-09-30 22:21:44 -04:00
Prad Nukala ffb67f0a6d fix: adjust hero image dimensions 2024-09-30 22:01:37 -04:00
Prad Nukala e00cca3c86 fix(Input): Change type from to 2024-09-30 21:55:02 -04:00
Prad Nukala 2dd7118c40 refactor: update hero image dimensions 2024-09-30 21:53:42 -04:00
Prad Nukala 48b197890e refactor: move nebula configuration to static file 2024-09-30 21:51:16 -04:00
Prad Nukala 37585b4df2 style: add styles for chrome/safari/opera scrollbars 2024-09-30 21:29:21 -04:00
Prad Nukala bfa78063a7 fix: update hero image height in config.pkl 2024-09-30 21:27:02 -04:00
Prad Nukala 36ad1448df feat: add stats section to homepage 2024-09-30 21:16:27 -04:00
Prad Nukala 5f2e6c5dd4 feat: implement hero section using Pkl 2024-09-30 21:16:13 -04:00
Prad Nukala 3e9139bd58 Merge branch 'master' into develop 2024-09-30 20:09:00 -04:00
Prad Nukala 9478227547 refactor: rename buf-publish.yml to publish-assets.yml 2024-09-30 20:08:38 -04:00
Prad Nukala 6f3fa0ec38 refactor: remove unused field from 2024-09-30 19:44:28 -04:00
Prad Nukala aa830517f3 feat: add PKL schema for message formats 2024-09-30 19:44:16 -04:00
github-actions[bot] e6f7f70201 bump: version 0.5.0 → 0.6.0 2024-09-30 19:57:41 +00:00
Prad Nukala 482c113a2f Merge branch 'develop' 2024-09-30 15:57:07 -04:00
Prad Nukala d9b1ac72a3 feat: add Homebrew tap for sonr 2024-09-30 15:57:03 -04:00
github-actions[bot] fde2fff1fb bump: version 0.4.0 → 0.5.0 2024-09-30 19:45:17 +00:00
Prad Nukala c75f24ff43 Merge branch 'develop' 2024-09-30 15:44:53 -04:00
Prad Nukala 06bbb8eb3a feat: update release workflow to use latest tag 2024-09-30 15:44:47 -04:00
2132 changed files with 663543 additions and 84466 deletions
-49
View File
@@ -1,49 +0,0 @@
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"]
exclude_unchanged = true
follow_symlink = false
full_bin = "devbox run start"
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
include_ext = ["go", "templ", "html", "pkl", "js", "mjs", "proto"]
include_file = [
"Dockerfile",
".goreleaser.yaml",
"go.mod",
"devbox.json",
".air.toml",
]
kill_delay = "10s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = ["devbox run stop"]
pre_cmd = ["templ generate"]
rerun = false
rerun_delay = 1000
send_interrupt = true
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
-7
View File
@@ -1,7 +0,0 @@
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver"
version = "0.4.0"
update_changelog_on_bump = true
major_version_zero = true
+15
View File
@@ -0,0 +1,15 @@
FROM jetpackio/devbox:latest
# Installing your devbox project
WORKDIR /code
USER root:root
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
USER ${DEVBOX_USER}:${DEVBOX_USER}
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
RUN devbox run -- echo "Installed Packages." && nix-store --gc && nix-store --optimise
RUN devbox shellenv --init-hook >> ~/.profile
+14
View File
@@ -0,0 +1,14 @@
{
"name": "Devbox Remote Container",
"build": {
"dockerfile": "./Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {},
"extensions": ["jetpack-io.devbox"]
}
},
"remoteUser": "devbox"
}
+6
View File
@@ -0,0 +1,6 @@
etc
web
packages
build
dist
test
+119
View File
@@ -0,0 +1,119 @@
# CI/CD Workflows
## Overview
Our CI/CD pipeline is optimized for speed and automation using:
- Self-hosted `builder` runner for better performance
- Smart scope detection via `github-env.sh`
- Automated versioning and releases via `devbox` commands
## Workflows
### PR CI (`pr.yml`)
**Trigger**: Pull requests
**Purpose**: Validate, test, and build changed components
**Features**:
- Only tests/builds affected scopes
- Runs linting first for fast feedback
- Cleans up artifacts after run
### Post-Merge Release (`merge.yml`)
**Trigger**: Push to master/main
**Purpose**: Automated version bumping and releases
**Features**:
- Auto-detects version increment from milestones
- Bumps versions, creates tags, and releases
- Publishes to package registries
### Nightly Snapshot (`nightly.yml`)
**Trigger**: Daily at 2 AM UTC or manual
**Purpose**: Build development snapshots
**Features**:
- Creates snapshot builds without version bumps
- Useful for testing bleeding-edge changes
### Manual Release (`manual-release.yml`)
**Trigger**: Manual workflow dispatch
**Purpose**: Override for emergency releases
**Features**:
- Select specific scope to release
- Choose version increment (patch/minor/major)
- Bypasses automatic detection
### CI Status (`ci-status.yml`)
**Trigger**: Other workflow completions
**Purpose**: Monitor CI health and report failures
## Key Commands
All workflows use these devbox commands that automatically detect changes:
```bash
devbox run test # Tests only affected scopes
devbox run build # Builds only affected scopes
devbox run bump # Bumps versions for affected scopes
devbox run release # Releases affected scopes
devbox run publish # Publishes affected scopes
devbox run snapshot # Creates snapshots for affected scopes
```
## Performance Optimizations
1. **Self-hosted Runner**: All workflows run on `builder` for:
- Local dependency caching
- No cold starts
- Unlimited build time
2. **Smart Caching**:
- Go modules cached at `~/go/pkg/mod`
- pnpm store cached at `~/.local/share/pnpm/store`
- Devbox packages cached at `~/.devbox`
3. **Scope Detection**: Only test/build what changed using `github-env.sh`
4. **Cleanup Steps**: Prevent disk fill on self-hosted runner
## Adding New Components
1. Add scope to `.github/scopes.json`:
```json
{
"name": "new-component",
"include": ["path/to/component/**"]
}
```
2. Add scripts to `devbox.json`:
```json
"test:new-component": "make test-new-component",
"build:new-component": "make build-new-component",
"bump:new-component": "make -C path/to/component bump",
"release:new-component": "make -C path/to/component release"
```
3. That's it! CI automatically picks up the new scope.
## Secrets Required
- `GH_PAT_TOKEN`: GitHub Personal Access Token for pushing tags
- `GORELEASER_KEY`: GoReleaser Pro license key
- `NPM_TOKEN`: NPM registry authentication
- `CLOUDFLARE_API_TOKEN`: For deploying web apps
- `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY`: For S3 uploads
## Troubleshooting
### Workflow not detecting changes?
- Check `.github/scopes.json` includes the correct paths
- Verify `github-env.sh` is executable
- Ensure full git history with `fetch-depth: 0`
### Self-hosted runner issues?
- Check runner has required dependencies
- Verify disk space for builds
- Check runner is online in Settings > Actions > Runners
### Release not triggering?
- Verify component has `bump:*` and `release:*` scripts
- Check git permissions with PAT token
- Ensure commitizen config exists for component
+1
View File
@@ -0,0 +1 @@
@prnk28
+515
View File
@@ -0,0 +1,515 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/sonr-io/sonr.svg)](https://pkg.go.dev/github.com/sonr-io/sonr)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/sonr-io/sonr)
[![Static Badge](https://img.shields.io/badge/homepage-sonr.io-blue?style=flat-square)](https://sonr.io)
[![Go Report Card](https://goreportcard.com/badge/github.com/sonr-io/sonr)](https://goreportcard.com/report/github.com/sonr-io/sonr)
[![Sonr](./banner.png)](https://sonr.io)
> **Sonr is a blockchain ecosystem combining decentralized identity, secure data storage, and multi-chain interoperability. Built on Cosmos SDK v0.50.14, it provides users with self-sovereign identity through W3C DIDs, WebAuthn authentication, and personal data vaults—all without requiring cryptocurrency for onboarding.**
## 💡 Key Features
### 🔐 Gasless Onboarding
Create your first decentralized identity without owning cryptocurrency:
```bash
# Register with WebAuthn (no tokens required!)
snrd auth register --username alice
# Register with automatic vault creation
snrd auth register --username bob --auto-vault
```
### 🌐 Multi-Chain Support
- **Cosmos SDK**: Native integration with IBC ecosystem
- **EVM Compatibility**: Ethereum smart contract support
- **External Wallets**: MetaMask, Keplr, and more
### 🔑 Advanced Authentication
- **WebAuthn/Passkeys**: Biometric authentication
- **Hardware Security Keys**: YubiKey, Titan Key support
- **Multi-Signature**: Multiple verification methods per DID
### 📦 Decentralized Storage
- **IPFS Integration**: Distributed file storage
- **Encrypted Vaults**: Hardware-backed encryption
- **Protocol Schemas**: Structured data validation
## 📚 Technical Specifications
- **Cosmos SDK**: v0.50.14
- **CometBFT**: v0.38.17
- **IBC**: v8.7.0
- **Go**: 1.24.1 (toolchain 1.24.4)
- **WebAssembly**: CosmWasm v1.5.8
- **Task Queue**: Asynq (Redis-based)
- **Actor System**: Proto.Actor
- **Storage**: IPFS, LevelDB
## 🔒 Security
### Gasless Transaction Security
- Limited to WebAuthn registration only
- Full cryptographic validation required
- Credential uniqueness enforcement
- Anti-replay protection
### WebAuthn Security
- Origin validation
- Challenge-response authentication
- Device binding
- Attestation verification
### Multi-Algorithm Support
- Ed25519 (quantum-resistant)
- ECDSA (secp256k1, P-256)
- RSA (2048, 3072, 4096 bits)
- WebAuthn (ES256, RS256)
## 🚀 Quick Start
### Installation
```bash
# Clone the repository
git clone https://github.com/sonr-io/sonr
cd sonr
# Install the binary
make install
# Verify installation
snrd version
```
### Running a Local Node
```bash
# Start single-node testnet (quick iteration)
make localnet
# Start multi-node testnet with Starship
make testnet-start
# Stop testnet
make testnet-stop
```
### Building from Source
```bash
# Build all binaries
make build # snrd blockchain node
make build-hway # Highway service
make build-vault # Vault WASM plugin
# Build Docker image
make docker
# Generate code from proto files
make proto-gen
```
### Local Development Network
```bash
# Standard localnet (auto-detects best method for your system)
make localnet # Works on Arch Linux, Ubuntu, macOS, etc.
# Docker-based localnet (requires Docker)
make dockernet # Runs in detached mode
# One-time setup for your system (optional)
./scripts/setup_localnet.sh # Installs dependencies and configures environment
```
### Testing
```bash
# Run all tests
make test-all
# Module-specific tests
make test-did # DID module tests
make test-dwn # DWN module tests
make test-svc # Service module tests
# E2E tests
make ictest-basic # Basic chain functionality
make ictest-ibc # IBC transfers
make ictest-wasm # CosmWasm integration
# Test with coverage
make test-cover
```
### Infrastructure
```bash
# IPFS for vault operations
make ipfs-up # Start IPFS infrastructure
make ipfs-down # Stop IPFS infrastructure
make ipfs-status # Check IPFS connectivity
```
## 🏗️ Architecture
Sonr consists of three primary components and three custom modules:
### Service Architecture
```
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Caddy │────▶│ snrd │ │ IPFS │
└─────────┘ └─────────┘ └─────────┘
│ │ │
│ ▼ ▼
│ ┌─────────┐ ┌─────────┐
└─────────▶│ Highway │────▶│ Redis │
└─────────┘ └─────────┘
```
- **Caddy**: Reverse proxy with gRPC-Web support (port 80)
- **Redis**: Task queue backend for Highway (port 6379)
- **Highway**: UCAN-based task processor (port 8090)
- **IPFS**: Distributed storage (API: 5001, Gateway: 8080)
- **snrd**: Blockchain node (gRPC: 9090, REST: 1317)
### Cross-Platform Support
The `localnet` target now automatically detects and uses the best available method:
1. Checks for local binary (built with `make install`)
2. Falls back to Docker if available
3. Handles permission issues on systems like Arch Linux
4. Supports systemd service installation (see `etc/systemd/`)
### Core Components
#### 1. **Blockchain Node (`snrd`)**
The main blockchain daemon built with Cosmos SDK v0.50.14, providing:
- AutoCLI for command generation
- EVM compatibility via Evmos integration
- IBC for cross-chain communication
- CosmWasm smart contract support
#### 2. **Highway Service (`hway`)**
An Asynq-based task processing service for vault operations:
- Redis-backed job queue with priority levels
- Actor-based concurrency using Proto.Actor framework
- Processes cryptographic operations through WebAssembly enclaves
#### 3. **Motor Plugin (`motr`)**
WebAssembly-based vault system providing:
- Secure execution environment for sensitive operations
- Hardware-backed key management
- Multi-party computation capabilities
## 📖 Module Documentation
### DID Module
W3C DID specification implementation with:
- **Gasless WebAuthn Registration**: Create DIDs without cryptocurrency
- **Multi-Algorithm Signatures**: Ed25519, ECDSA, RSA, WebAuthn
- **External Wallet Linking**: MetaMask, Keplr integration
- **Verifiable Credentials**: W3C-compliant credential issuance
```bash
# Create a DID
snrd tx did create-did did:sonr:alice '{"id":"did:sonr:alice",...}' --from alice
# Link external wallet
snrd tx did link-external-wallet did:sonr:alice \
--wallet-address 0x742d35Cc6635C0532925a3b8c17C6e583F4d6A42 \
--wallet-type ethereum \
--from alice
# Query DID
snrd query did resolve did:sonr:alice
```
[Full DID Module Documentation](x/did/README.md)
### DWN Module
Personal data stores with:
- **Structured Data Records**: Hierarchical data organization
- **Protocol-Based Interactions**: Enforceable data schemas
- **Secure Vaults**: Enclave-based key management
- **Multi-Chain Support**: Cosmos SDK and EVM transaction building
```bash
# Create a vault
snrd tx dwn create-vault --from alice
# Store a record
snrd tx dwn write-record '{"data":"...", "protocol":"example.com"}' --from alice
# Query records
snrd query dwn records --owner alice
```
[Full DWN Module Documentation](x/dwn/README.md)
### Service Module
Decentralized service registry featuring:
- **Domain Verification**: DNS-based ownership proof
- **Service Registration**: Verified service endpoints
- **Permission Management**: UCAN capability integration
```bash
# Verify domain ownership
snrd tx svc initiate-domain-verification example.com --from alice
snrd tx svc verify-domain example.com --from alice
# Register service
snrd tx svc register-service my-service example.com \
--permissions "read,write" --from alice
```
[Full Service Module Documentation](x/svc/README.md)
## 🔧 Configuration
### Environment Variables
Environment variables can be configured via Docker Compose:
```bash
# Chain configuration
export CHAIN_ID="localchain_9000-1"
export BLOCK_TIME="1000ms"
# Network selection for Starship
export NETWORK="devnet" # or "testnet"
# Redis configuration
REDIS_URL=redis://redis:6379
REDIS_DB=0
# Highway service
HIGHWAY_PORT=8090
LOG_LEVEL=debug
# IPFS configuration
IPFS_API_URL=http://ipfs:5001
# Caddy configuration
CADDY_DOMAIN=localhost
```
Environment variables can be set directly or via a `.env` file in the project root.
### Docker Compose Services
The project includes a comprehensive Docker Compose setup for running all backend services:
```bash
# Start all services (Redis, Highway, Caddy, IPFS)
make docker-up
# Stop all services
make docker-down
# View service logs
make docker-logs # All services
make docker-logs-redis # Specific service
# Check service health
make docker-status
# Clean up Docker resources
make docker-clean
```
### Starship Configuration
Edit `starship.yml` to configure multi-node testnets:
```yaml
chains:
- id: sonrtest_1-1
name: custom
numValidators: 3
image: onsonr/snrd:latest
# ... additional configuration
```
#### Troubleshooting
**Services not starting:**
```bash
# Check service status
make docker-status
# View detailed logs
make docker-logs
# Ensure Docker network exists
docker network ls | grep sonr-network
```
**Redis connection issues:**
```bash
# Test Redis connectivity
docker exec redis redis-cli ping
# Check Redis logs
make docker-logs-redis
```
**IPFS not accessible:**
```bash
# Verify IPFS is running
curl http://127.0.0.1:5001/api/v0/version
# Check IPFS logs
docker compose -f etc/stack/compose.yml logs ipfs
```
**Port conflicts:**
- Caddy: 80 (HTTP)
- Redis: 6379
- Highway: 8090
- IPFS API: 5001
- IPFS Gateway: 8080
Stop conflicting services or modify ports in `etc/stack/compose.yml`.
## 🏗️ Project Structure
Sonr uses a modern monorepo architecture with pnpm workspaces for JavaScript/TypeScript packages alongside the Go blockchain implementation:
### Workspace Organization
```
sonr/
├── app/ # Application setup and module wiring
├── cmd/ # Binary entry points
│ ├── snrd/ # Blockchain node
│ ├── hway/ # Highway service
│ └── motr/ # Motor WASM plugin
├── x/ # Custom chain modules
│ ├── did/ # W3C DID implementation
│ ├── dwn/ # Decentralized Web Nodes
│ └── svc/ # Service management
├── types/ # Internal packages
│ ├── coins/ # Task processing
│ └── ipfs/ # Authorization networks
├── proto/ # Protobuf definitions
├── scripts/ # Utility scripts
├── test/ # Integration tests
├── docs/ # Documentation site
# Monorepo Packages (pnpm workspaces)
├── packages/ # Core JavaScript/TypeScript packages
│ ├── es/ # @sonr.io/es - ES client library
│ ├── sdk/ # @sonr.io/sdk - SDK package
│ └── ui/ # @sonr.io/ui - Shared UI components
├── cli/ # CLI tools
│ ├── install/ # @sonr.io/install - Installation CLI
│ └── join-testnet/# @sonr.io/join-testnet - Testnet CLI
└── web/ # Web applications
├── auth/ # Authentication app (Next.js)
└── dash/ # Dashboard app (Next.js)
```
### Working with the Monorepo
#### Installation
```bash
# Install all dependencies for the monorepo
pnpm install
# Build all packages
pnpm build
# Run development mode for all packages
pnpm dev
```
#### Package Management
```bash
# Run commands in specific packages
pnpm --filter @sonr.io/es build
pnpm --filter @sonr.io/sdk test
# Add dependencies to specific packages
pnpm --filter @sonr.io/ui add react
# Run commands in all packages
pnpm -r build # Build all packages
pnpm -r test # Test all packages
```
#### Versioning & Publishing
The monorepo uses [Changesets](https://github.com/changesets/changesets) for package versioning:
```bash
# Add a changeset for your changes
pnpm changeset
# Version packages based on changesets
pnpm changeset version
# Publish packages to npm
pnpm changeset publish
```
### Key Technologies
- **pnpm workspaces**: Efficient dependency management with single lockfile
- **TypeScript project references**: Incremental builds and better IDE performance
- **Turbo**: Build orchestration and caching for faster builds
- **Changesets**: Automated versioning and changelog generation
- **Biome**: Fast, unified linting and formatting (replaces ESLint/Prettier)
### Package Dependencies
- `@sonr.io/es`: Core ES client library with protobuf types
- `@sonr.io/sdk`: High-level SDK (depends on @sonr.io/es)
- `@sonr.io/ui`: Shared UI components for web applications
- `@sonr.io/install`: CLI tool for installing Sonr
- `@sonr.io/join-testnet`: CLI tool for joining testnet
- Web apps use all three core packages (@sonr.io/es, @sonr.io/sdk, @sonr.io/ui)
## 🤝 Community & Support
- [GitHub Discussions](https://github.com/sonr-io/sonr/discussions) - Community forum
- [GitHub Issues](https://github.com/sonr-io/sonr/issues) - Bug reports and feature requests
- [Twitter](https://sonr.io/twitter) - Latest updates
- [Documentation Wiki](https://github.com/sonr-io/sonr/wiki) - Detailed guides
## 📄 License
Copyright © 2024 Sonr, Inc.
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
---
<p align="center">
Built with ❤️ by the Sonr team
</p>
Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

+103
View File
@@ -0,0 +1,103 @@
version: 2
updates:
# Go modules
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- go
commit-message:
prefix: chore
include: scope
# Go modules in subdirectories
- package-ecosystem: gomod
directory: "/cmd/hway"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- hway
commit-message:
prefix: "chore(hway)"
- package-ecosystem: gomod
directory: "/cmd/motr"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- motr
commit-message:
prefix: "chore(motr)"
- package-ecosystem: gomod
directory: "/cmd/vault"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- vault
commit-message:
prefix: "chore(vault)"
- package-ecosystem: gomod
directory: "/client"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- client
commit-message:
prefix: "chore(client)"
- package-ecosystem: gomod
directory: "/crypto"
schedule:
interval: weekly
day: monday
time: "02:00"
labels:
- dependencies
- crypto
commit-message:
prefix: "chore(crypto)"
# JavaScript/TypeScript packages
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: monday
time: "03:00"
labels:
- dependencies
- javascript
commit-message:
prefix: chore
include: scope
# GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: monday
time: "04:00"
labels:
- dependencies
- ci
commit-message:
prefix: "chore(ci)"
+583
View File
@@ -0,0 +1,583 @@
default-api: groq
default-model: qwen3
format-text:
markdown: "Format the response as markdown without enclosing backticks."
json: "Format the response as json without enclosing backticks."
mcp-servers:
github:
command: docker
args:
- run
- "-i"
- "--rm"
- "-e"
- GITHUB_PERSONAL_ACCESS_TOKEN
- "ghcr.io/github/github-mcp-server"
ref:
command: npx
args:
- ref-tools-mcp@latest
mcp-timeout: 15s
roles:
"default": []
"pr-writer":
- You are a PR description writer
- Create clear, structured PR descriptions
- Include all relevant context from commits and changes
- Format using markdown with proper sections
- Reference issues and milestones appropriately
- Be concise but comprehensive
- Include a testing checklist if relevant
"commit-writer":
- You are a conventional commit message generator following commitizen format
- Analyze the provided git diff and scope information to create a proper commit
- Use the format type(scope) description
- Valid types feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
- The scope should be one of the affected scopes provided
- Description should be concise, present tense, no period at the end
- If there are breaking changes, add BREAKING CHANGE in the footer
- Focus on WHAT changed and WHY, not HOW (the diff shows how)
- Group related changes logically
- Maximum 72 characters for the header line
- Output ONLY the commit message, no explanations
"commit-analyzer":
- Analyze git diffs to determine the primary type of change
- Identify if changes are features, fixes, refactoring, etc
- Summarize the key changes in a structured format
- Output a JSON object with type, scope, description, and body fields
"branch-namer":
- you are a branch namer
- you do not explain anything
- you read the provided issue and body then create a title for the branch
- you do not provide any explanation whatsoever, ONLY the title
- titles must be no more than 3 words (example = feature/add-new-feature)
- ONLY use the following format - feat/<feature-name>
"issue-creator":
- you are an advanced issue creator for github in the sonr-io org
- you are provided an input in the format of - <repo-name>:<issue-context>
- you do not explain anything
- you read the short provided context for a new issue and then create an appropriate issue body
- ALWAYS find relevant context by using the `mcp::ref::ref_search_documentation` tool
- ALWAYS link relevant issues by using the `mcp::github::search_issues` tool
- ALWAYS create a new issue in the sonr-io/<repo-name> repo
- ALWAYS assign the issue to @prnk28
- |
ONLY use the following format as this example:
Title: Implement x/dwn vaults plugin
Labels: x/dwn, feature
## Requirements
- Must include DWN Bytes in Protobuf
- Must Spawn DWN Plugins using Genesis Params
- Must have Gas Free Query Methods for Spawn and Verify
## Context
### Affected Files
- @x/dwn/keeper/keeper.go
- @x/dwn/client/wasm/main.go
- @x/dwn/types/genesis.go
### Relevant Documentation
- [Example Doc 1](https://example.com)
- [Example Doc 2](https://example.com)
## Acceptance Criteria
- [ ] Tests for Spawning Plugins from the x/dwn Genesis
- [ ] Tests for Resolving Vault Secret Data from IPFS
- [ ] Test for full-round Sign/Verify/Refresh on-chain
- [ ] Grpc Gateway Compatibility for HTTP Requests
- ALWAYS create issues using the `mcp::github::create_issue` tool
- ALWAYS return the issue number after creating a new issue
format: false
role: "branch-namer"
raw: true
quiet: true
temp: 1.0
topp: 1.0
topk: 50
no-limit: true
word-wrap: 80
include-prompt-args: false
include-prompt: 0
max-retries: 5
fanciness: 10
status-text: Generating
theme: base16
max-input-chars: 12250
max-completion-tokens: 100
apis:
openai:
base-url: https://api.openai.com/v1
api-key:
api-key-env: OPENAI_API_KEY
# api-key-cmd: rbw get -f OPENAI_API_KEY chat.openai.com
models: # https://platform.openai.com/docs/models
gpt-4.5-preview: #128k https://platform.openai.com/docs/models/gpt-4.5-preview
aliases: ["gpt-4.5", "gpt4.5"]
max-input-chars: 392000
fallback: gpt-4
gpt-4.5-preview-2025-02-27:
max-input-chars: 392000
fallback: gpt-4
gpt-4o-mini:
aliases: ["4o-mini"]
max-input-chars: 392000
fallback: gpt-4o
gpt-4o:
aliases: ["4o"]
max-input-chars: 392000
fallback: gpt-4
gpt-4:
aliases: ["4"]
max-input-chars: 24500
fallback: gpt-3.5-turbo
gpt-4-1106-preview:
aliases: ["128k"]
max-input-chars: 392000
fallback: gpt-4
gpt-4-32k:
aliases: ["32k"]
max-input-chars: 98000
fallback: gpt-4
gpt-3.5-turbo:
aliases: ["35t"]
max-input-chars: 12250
fallback: gpt-3.5
gpt-3.5-turbo-1106:
aliases: ["35t-1106"]
max-input-chars: 12250
fallback: gpt-3.5-turbo
gpt-3.5-turbo-16k:
aliases: ["35t16k"]
max-input-chars: 44500
fallback: gpt-3.5
gpt-3.5:
aliases: ["35"]
max-input-chars: 12250
fallback:
o1:
aliases: ["o1"]
max-input-chars: 200000
o1-preview:
aliases: ["o1-preview"]
max-input-chars: 128000
o1-mini:
aliases: ["o1-mini"]
max-input-chars: 128000
o3-mini:
aliases: ["o3m", "o3-mini"]
max-input-chars: 200000
copilot:
base-url: https://api.githubcopilot.com
models:
gpt-4o-2024-05-13:
aliases: ["4o-2024", "4o", "gpt-4o"]
max-input-chars: 392000
gpt-4:
aliases: ["4"]
max-input-chars: 24500
gpt-3.5-turbo:
aliases: ["35t"]
max-input-chars: 12250
o1-preview-2024-09-12:
aliases: ["o1-preview", "o1p"]
max-input-chars: 128000
claude-3.5-sonnet:
aliases: ["claude3.5-sonnet", "sonnet-3.5", "claude-3-5-sonnet"]
max-input-chars: 680000
o1-preview:
aliases: ["o1-preview"]
max-input-chars: 128000
o1-mini:
aliases: ["o1-mini", "o1m", "o1-mini-2024-09-12"]
max-input-chars: 128000
o3-mini:
aliases: ["o3m", "o3-mini"]
max-input-chars: 128000
gemini-2.0-flash-001:
aliases: ["gm2f", "flash-2", "gemini-2-flash"]
max-input-chars: 4194304
anthropic:
base-url: https://api.anthropic.com/v1
api-key:
api-key-env: ANTHROPIC_API_KEY
models: # https://docs.anthropic.com/en/docs/about-claude/models
claude-sonnet-4-20250514:
aliases: ["claude-sonnet-4", "sonnet-4"]
max-input-chars: 680000
claude-3-7-sonnet-latest:
aliases: ["claude3.7-sonnet", "claude-3-7-sonnet", "sonnet-3.7"]
max-input-chars: 680000
claude-3-7-sonnet-20250219:
max-input-chars: 680000
claude-3-5-sonnet-latest:
aliases: ["claude3.5-sonnet", "claude-3-5-sonnet", "sonnet-3.5"]
max-input-chars: 680000
claude-3-5-sonnet-20241022:
max-input-chars: 680000
claude-3-5-sonnet-20240620:
max-input-chars: 680000
claude-3-opus-20240229:
aliases: ["claude3-opus", "opus"]
max-input-chars: 680000
cohere:
base-url: https://api.cohere.com/v1
models:
command-r-plus:
max-input-chars: 128000
command-r:
max-input-chars: 128000
google:
models: # https://ai.google.dev/gemini-api/docs/models/gemini
gemini-1.5-pro-latest:
aliases: ["gmp", "gemini", "gemini-1.5-pro"]
max-input-chars: 392000
gemini-1.5-flash-latest:
aliases: ["gmf", "flash", "gemini-1.5-flash"]
max-input-chars: 392000
gemini-2.0-flash-001:
aliases: ["gm2f", "flash-2", "gemini-2-flash"]
max-input-chars: 4194304
gemini-2.0-flash-lite:
aliases: ["gm2fl", "flash-2-lite", "gemini-2-flash-lite"]
max-input-chars: 4194304
ollama:
base-url: http://localhost:11434
models: # https://ollama.com/library
"llama3.2:3b":
aliases: ["llama3.2"]
max-input-chars: 650000
"llama3.2:1b":
aliases: ["llama3.2_1b"]
max-input-chars: 650000
"llama3:70b":
aliases: ["llama3"]
max-input-chars: 650000
perplexity:
base-url: https://api.perplexity.ai
api-key:
api-key-env: PERPLEXITY_API_KEY
models: # https://docs.perplexity.ai/guides/model-cards
llama-3.1-sonar-small-128k-online:
aliases: ["llam31-small"]
max-input-chars: 127072
llama-3.1-sonar-large-128k-online:
aliases: ["llam31-large"]
max-input-chars: 127072
llama-3.1-sonar-huge-128k-online:
aliases: ["llam31-huge"]
max-input-chars: 127072
groq:
base-url: https://api.groq.com/openai/v1
api-key:
api-key-env: GROQ_API_KEY
models: # https://console.groq.com/docs/models
# Production models
gemma2-9b-it:
aliases: ["gemma2", "gemma"]
max-input-chars: 24500 # 8,192
llama-3.3-70b-versatile:
aliases: ["llama3.3", "llama3.3-70b", "llama3.3-versatile"]
max-input-chars: 392000 # 128K
max-completion-tokens: 98000 # 32,768
llama-3.1-8b-instant:
aliases: ["llama3.1-8b", "llama3.1-instant"]
max-input-chars: 392000 # 128K
max-completion-tokens: 24500 # 8,192
llama-guard-3-8b:
aliases: ["llama-guard"]
max-input-chars: 24500 # 8,192
llama3-70b-8192:
aliases: ["llama3", "llama3-70b"]
max-input-chars: 24500 # 8,192
fallback: llama3-8b-8192
llama3-8b-8192:
aliases: ["llama3-8b"]
max-input-chars: 24500 # 8,192
mixtral-8x7b-32768:
aliases: ["mixtral"]
max-input-chars: 98000 # 32,768
meta-llama/llama-4-scout-17b-16e-instruct:
aliases: ["llama4-scout"]
max-input-chars: 392000 # 128K
meta-llama/llama-4-maverick-17b-128e-instruct:
aliases: ["llama4", "llama4-maverick"]
max-input-chars: 392000 # 128K
# Preview models
mistral-saba-24b:
aliases: ["saba", "mistral-saba", "saba-24b"]
max-input-chars: 98000 # 32K
qwen-2.5-coder-32b:
aliases: ["qwen-coder", "qwen2.5-coder", "qwen-2.5-coder"]
max-input-chars: 392000 # 128K
qwen/qwen3-32b:
aliases: ["qwen3", "qwen3-32b"]
max-input-chars: 392000 # 128K
deepseek-r1-distill-qwen-32b:
aliases: ["deepseek-r1", "r1-qwen", "deepseek-qwen"]
max-input-chars: 392000 # 128K
max-completion-tokens: 49152 # 16,384
deepseek-r1-distill-llama-70b-specdec:
aliases: ["deepseek-r1-specdec", "r1-llama-specdec"]
max-input-chars: 392000 # 128K
max-completion-tokens: 49152 # 16,384
deepseek-r1-distill-llama-70b:
aliases: ["deepseek-r1-llama", "r1-llama"]
max-input-chars: 392000 # 128K
llama-3.3-70b-specdec:
aliases: ["llama3.3-specdec"]
max-input-chars: 24500 # 8,192
llama-3.2-1b-preview:
aliases: ["llama3.2-1b"]
max-input-chars: 392000 # 128K
max-completion-tokens: 24500 # 8,192
llama-3.2-3b-preview:
aliases: ["llama3.2-3b"]
max-input-chars: 392000 # 128K
max-completion-tokens: 24500 # 8,192
llama-3.2-11b-vision-preview:
aliases: ["llama3.2-vision", "llama3.2-11b-vision"]
max-input-chars: 392000 # 128K
max-completion-tokens: 24500 # 8,192
llama-3.2-90b-vision-preview:
aliases: ["llama3.2-90b-vision"]
max-input-chars: 392000 # 128K
max-completion-tokens: 24500 # 8,192
cerebras:
base-url: https://api.cerebras.ai/v1
api-key:
api-key-env: CEREBRAS_API_KEY
models: # https://inference-docs.cerebras.ai/introduction
llama3.1-8b:
aliases: ["llama3.1-8b-cerebras"]
max-input-chars: 24500
llama3.1-70b:
aliases: ["llama3.1-cerebras", "llama3.1-70b-cerebras"]
max-input-chars: 24500
sambanova:
base-url: https://api.sambanova.ai/v1
api-key:
api-key-env: SAMBANOVA_API_KEY
models: # https://docs.sambanova.ai/cloud/docs/get-started/supported-models
# Preview models
DeepSeek-R1:
aliases: ["deepseek-r1-sambanova", "deepseek-r1-preview"]
max-input-chars: 24500 # 8k tokens
# Production models
DeepSeek-R1-Distill-Llama-70B:
aliases: ["deepseek-r1-llama-sambanova", "deepseek-r1-distill"]
max-input-chars: 98000 # 32k tokens
Llama-3.1-Tulu-3-405B:
aliases: ["llama3.1-tulu", "tulu-405b"]
max-input-chars: 49000 # 16k tokens
Meta-Llama-3.3-70B-Instruct:
aliases: ["llama3.3-sambanova", "llama3.3-70b-sambanova"]
max-input-chars: 392000 # 128k tokens
Meta-Llama-3.2-3B-Instruct:
aliases: ["llama3.2-3b-sambanova"]
max-input-chars: 24500 # 8k tokens
Meta-Llama-3.2-1B-Instruct:
aliases: ["llama3.2-1b-sambanova"]
max-input-chars: 49000 # 16k tokens
Meta-Llama-3.1-405B-Instruct:
aliases: ["llama3.1-405b-sambanova"]
max-input-chars: 49000 # 16k tokens
Meta-Llama-3.1-70B-Instruct:
aliases: ["llama3.1-70b-sambanova"]
max-input-chars: 392000 # 128k tokens
Meta-Llama-3.1-8B-Instruct:
aliases: ["llama3.1-8b-sambanova"]
max-input-chars: 49000 # 16k tokens
Meta-Llama-Guard-3-8B:
aliases: ["llama-guard-sambanova"]
max-input-chars: 24500 # 8k tokens
Llama-3.2-90B-Vision-Instruct:
aliases: ["llama3.2-vision-90b", "llama3.2-90b-vision-sambanova"]
max-input-chars: 12250 # 4k tokens
Llama-3.2-11B-Vision-Instruct:
aliases: ["llama3.2-vision-11b", "llama3.2-11b-vision-sambanova"]
max-input-chars: 12250 # 4k tokens
Qwen2.5-72B-Instruct:
aliases: ["qwen2.5-sambanova", "qwen2.5-72b"]
max-input-chars: 49000 # 16k tokens
Qwen2.5-Coder-32B-Instruct:
aliases: ["qwen2.5-coder-sambanova", "qwen-coder-sambanova"]
max-input-chars: 49000 # 16k tokens
QwQ-32B-Preview:
aliases: ["qwq-sambanova", "qwq-32b"]
max-input-chars: 49000 # 16k tokens
localai:
# LocalAI setup instructions: https://github.com/go-skynet/LocalAI#example-use-gpt4all-j-model
base-url: http://localhost:8080
models:
ggml-gpt4all-j:
aliases: ["local", "4all"]
max-input-chars: 12250
fallback:
azure:
# Set to 'azure-ad' to use Active Directory
# Azure OpenAI setup: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource
base-url: https://YOUR_RESOURCE_NAME.openai.azure.com
api-key:
api-key-env: AZURE_OPENAI_KEY
models:
gpt-4:
aliases: ["az4"]
max-input-chars: 24500
fallback: gpt-35-turbo
gpt-35-turbo:
aliases: ["az35t"]
max-input-chars: 12250
fallback: gpt-35
gpt-35:
aliases: ["az35"]
max-input-chars: 12250
fallback:
o1-preview:
aliases: ["o1-preview"]
max-input-chars: 128000
o1-mini:
aliases: ["o1-mini"]
max-input-chars: 128000
runpod:
# https://docs.runpod.io/serverless/workers/vllm/openai-compatibility
base-url: https://api.runpod.ai/v2/${YOUR_ENDPOINT}/openai/v1
api-key:
api-key-env: RUNPOD_API_KEY
models:
openchat/openchat-3.5-1210:
aliases: ["openchat"]
max-input-chars: 8192
mistral:
base-url: https://api.mistral.ai/v1
api-key:
api-key-env: MISTRAL_API_KEY
models: # https://docs.mistral.ai/getting-started/models/
mistral-large-latest:
aliases: ["mistral-large"]
max-input-chars: 384000
open-mistral-nemo:
aliases: ["mistral-nemo"]
max-input-chars: 384000
deepseek:
base-url: https://api.deepseek.com/
api-key:
api-key-env: DEEPSEEK_API_KEY
models:
deepseek-chat:
aliases: ["chat"]
max-input-chars: 384000
deepseek-reasoner:
aliases: ["r1"]
max-input-chars: 384000
github-models:
base-url: https://models.github.ai/inference
api-key:
api-key-env: GITHUB_PERSONAL_ACCESS_TOKEN
models:
openai/gpt-4.1:
max-input-chars: 392000
openai/o3-mini:
max-input-chars: 392000
openai/o4-mini:
max-input-chars: 392000
openai/text-embedding-3-large:
max-input-chars: 392000
openai/text-embedding-3-small:
max-input-chars: 392000
ai21-labs/AI21-Jamba-1.5-Large:
max-input-chars: 392000
ai21-labs/AI21-Jamba-1.5-Mini:
max-input-chars: 392000
cohere/cohere-command-a:
max-input-chars: 392000
cohere/Cohere-command-r:
max-input-chars: 392000
cohere/Cohere-command-r-08-2024:
max-input-chars: 392000
cohere/Cohere-command-r-plus:
max-input-chars: 392000
cohere/Cohere-command-r-plus-08-2024:
max-input-chars: 392000
cohere/Cohere-embed-v3-english:
max-input-chars: 392000
cohere/Cohere-embed-v3-multilingual:
max-input-chars: 392000
core42/jais-30b-chat:
max-input-chars: 392000
deepseek/DeepSeek-R1:
max-input-chars: 392000
deepseek/DeepSeek-V3-0324:
max-input-chars: 392000
meta/Llama-3.2-11B-Vision-Instruct:
max-input-chars: 392000
meta/Llama-3.2-90B-Vision-Instruct:
max-input-chars: 392000
meta/Llama-3.3-70B-Instruct:
max-input-chars: 392000
meta/Llama-4-Maverick-17B-128E-Instruct-FP8:
max-input-chars: 392000
meta/Llama-4-Scout-17B-16E-Instruct:
max-input-chars: 392000
meta/Meta-Llama-3.1-405B-Instruct:
max-input-chars: 392000
meta/Meta-Llama-3.1-70B-Instruct:
max-input-chars: 392000
meta/Meta-Llama-3.1-8B-Instruct:
max-input-chars: 392000
meta/Meta-Llama-3-70B-Instruct:
max-input-chars: 392000
meta/Meta-Llama-3-8B-Instruct:
max-input-chars: 392000
mistral-ai/Codestral-2501:
max-input-chars: 392000
mistral-ai/Ministral-3B:
max-input-chars: 392000
mistral-ai/Mistral-Large-2411:
max-input-chars: 392000
mistral-ai/mistral-medium-2505:
max-input-chars: 392000
mistral-ai/Mistral-Nemo:
max-input-chars: 392000
mistral-ai/mistral-small-2503:
max-input-chars: 392000
xai/grok-3:
max-input-chars: 392000
xai/grok-3-mini:
max-input-chars: 392000
microsoft/MAI-DS-R1:
max-input-chars: 392000
microsoft/Phi-3.5-mini-instruct:
max-input-chars: 392000
microsoft/Phi-3.5-MoE-instruct:
max-input-chars: 392000
microsoft/Phi-3.5-vision-instruct:
max-input-chars: 392000
microsoft/Phi-3-medium-128k-instruct:
max-input-chars: 392000
microsoft/Phi-3-medium-4k-instruct:
max-input-chars: 392000
microsoft/Phi-3-mini-128k-instruct:
max-input-chars: 392000
microsoft/Phi-3-mini-4k-instruct:
max-input-chars: 392000
microsoft/Phi-3-small-128k-instruct:
max-input-chars: 392000
microsoft/Phi-3-small-8k-instruct:
max-input-chars: 392000
microsoft/Phi-4:
max-input-chars: 392000
microsoft/Phi-4-mini-instruct:
max-input-chars: 392000
microsoft/Phi-4-mini-reasoning:
max-input-chars: 392000
microsoft/Phi-4-multimodal-instruct:
max-input-chars: 392000
microsoft/Phi-4-reasoning:
max-input-chars: 392000
+73
View File
@@ -0,0 +1,73 @@
- name: client
include:
- client/**
- name: snrd
include:
- cmd/snrd/**
- app/**
- go.mod
- go.sum
- name: crypto
include:
- crypto/**
- name: devops
include:
- .github/**
- .devcontainer/**
- scripts/**
- etc/**
- Dockerfile
- "*-compose.yml"
- README.md
- name: docs
include:
- docs/**
- name: hway
include:
- cmd/hway/**
- bridge/**
- types/**
- name: dex
include:
- proto/dex/**
- x/dex/**
- name: did
include:
- proto/dex/**
- x/did/**
- name: dwn
include:
- proto/dex/**
- x/dwn/**
- name: svc
include:
- proto/dex/**
- x/svc/**
- name: motr
include:
- cmd/motr/**
- name: vault
include:
- cmd/vault/**
- name: com
include:
- packages/com/**
- name: es
include:
- packages/es/**
- name: pkl
include:
- packages/pkl/**
- name: sdk
include:
- packages/sdk/**
- name: ui
include:
- packages/ui/**
- name: auth
include:
- web/auth/**
- name: dash
include:
- web/dash/**
-8
View File
@@ -1,8 +0,0 @@
---
title: New Testnet {{ date | date('dddd MMMM Do') }}
labels: enhancement
---
Server IP: {{ env.SERVER_IPV4_ADDR }}
SSH: `ssh -o StrictHostKeyChecking=no root@{{ env.SERVER_IPV4_ADDR }}`
Tag: {{ env.GITHUB_REF_NAME }} / Commit: {{ env.GITHUB_SHA }}
Local-Interchain API: http://{{ env.SERVER_IPV4_ADDR }}:{{ env.LOCALIC_PORT }}
+97
View File
@@ -0,0 +1,97 @@
name: Bump version
on:
push:
branches:
- master
env:
NODE_VERSION: 20
PNPM_VERSION: 10
jobs:
changes:
runs-on: ubuntu-latest
outputs:
minor: ${{ steps.check-milestone.outputs.minor }}
non-docs: ${{ steps.filter.outputs.non-docs }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
non-docs:
- '!docs/**'
- '!README.md'
packages:
- 'packages/**'
- 'cli/**'
- 'web/**'
- 'pnpm-lock.yaml'
# Check if any milestone has all issues closed
- name: Check milestone completion
id: check-milestone
run: |
# Get all open milestones and check if any have all issues closed
MILESTONES=$(gh api repos/${{ github.repository }}/milestones --jq '.[] | select(.state == "open") | {title, open_issues}')
# Check if any milestone has 0 open issues
MINOR_BUMP=false
while IFS= read -r milestone; do
if [ -n "$milestone" ]; then
OPEN_ISSUES=$(echo "$milestone" | jq -r '.open_issues')
TITLE=$(echo "$milestone" | jq -r '.title')
if [ "$OPEN_ISSUES" = "0" ]; then
echo "Milestone '$TITLE' is complete (0 open issues). Minor bump required."
MINOR_BUMP=true
break
fi
fi
done <<< "$(echo "$MILESTONES" | jq -c '.')"
echo "minor=$MINOR_BUMP" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }} # Handle Go/Binary versioning with commitizen
version-go:
needs: changes
if: "!startsWith(github.event.head_commit.message, 'bump:') && !startsWith(github.event.head_commit.message, 'hotfix:') && !startsWith(github.event.head_commit.message, 'Version Packages') && needs.changes.outputs.non-docs == 'true'"
runs-on: ubuntu-latest
name: "Bump Go binary version and create changelog"
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: "${{ secrets.COMMIT_KEY }}"
- name: Determine increment type
id: increment
run: |
# Use the version-bump.sh script to determine increment type
INCREMENT_TYPE=$(./scripts/version-bump.sh increment-type true ${{ github.repository }})
echo "type=$INCREMENT_TYPE" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
push: false
increment: ${{ steps.increment.outputs.type }}
- name: Push using ssh
run: |
git push origin master --tags
close-milestone:
needs: [changes, version-go]
if: "needs.changes.outputs.minor == 'true'"
runs-on: ubuntu-latest
name: "Close completed milestone"
steps:
- name: Check out
uses: actions/checkout@v4
- name: Close completed milestone
run: |
./scripts/version-bump.sh close-milestone ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
+129
View File
@@ -0,0 +1,129 @@
name: CD
on:
workflow_call:
inputs:
bump:
required: false
type: string
release:
required: false
type: string
publish:
required: false
type: string
deploy:
required: false
type: string
continue-on-error:
required: false
default: false
type: boolean
devbox-version:
required: false
default: 0.16.0
type: string
enable-cache:
required: false
default: false
type: boolean
fetch-depth:
required: false
default: 0
type: number
persist-credentials:
required: false
default: false
type: boolean
runs-on:
required: false
default: ubuntu-latest
type: string
jobs:
bump:
runs-on: ${{ inputs.runs-on }}
environment: staging - cd
if: ${{ inputs.test != '' }}
name: Bump
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Bump ${{ inputs.bump }}"
run: devbox run bump:${{ inputs.bump }}
if: ${{ inputs.bump != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
release:
runs-on: ${{ inputs.runs-on }}
environment: staging - cd
if: ${{ inputs.release != '' }}
name: Release
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Release ${{ inputs.release }}"
run: devbox run release:${{ inputs.release }}
if: ${{ inputs.release != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
publish:
runs-on: ${{ inputs.runs-on }}
environment: staging - publish
if: ${{ inputs.publish != '' }}
name: Publish
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Publish ${{ inputs.publish }}"
run: devbox run publish:${{ inputs.publish }}
if: ${{ inputs.publish != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
deploy:
runs-on: ${{ inputs.runs-on }}
environment: staging - deploy
if: ${{ inputs.deploy != '' }}
name: Deploy
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Deploy ${{ inputs.deploy }}"
run: devbox run deploy:${{ inputs.deploy }}
if: ${{ inputs.deploy != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
+136
View File
@@ -0,0 +1,136 @@
name: Changes
on:
workflow_call:
outputs:
modules:
description: "JSON array of changed modules"
value: ${{ jobs.detect.outputs.modules }}
core:
description: "True if core files changed"
value: ${{ jobs.detect.outputs.core }}
app:
description: "True if app files changed"
value: ${{ jobs.detect.outputs.app }}
crypto:
description: "True if crypto files changed"
value: ${{ jobs.detect.outputs.crypto }}
hway:
description: "True if highway files changed"
value: ${{ jobs.detect.outputs.hway }}
client:
description: "True if client files changed"
value: ${{ jobs.detect.outputs.client }}
packages-changes:
description: "True if JS packages changed"
value: ${{ jobs.detect.outputs.packages-changes }}
web-changes:
description: "True if web app files changed"
value: ${{ jobs.detect.outputs.web-changes }}
go-changes:
description: "True if Go files changed"
value: ${{ jobs.detect.outputs.go-changes }}
wasm-changes:
description: "True if WASM files changed"
value: ${{ jobs.detect.outputs.wasm-changes }}
docker-changes:
description: "True if Docker files changed"
value: ${{ jobs.detect.outputs.docker-changes }}
jobs:
detect:
name: Find Changes
runs-on: ubuntu-latest
outputs:
modules: ${{ steps.set-modules.outputs.modules }}
core: ${{ steps.filter.outputs.core }}
app: ${{ steps.filter.outputs.app }}
crypto: ${{ steps.filter.outputs.crypto }}
hway: ${{ steps.filter.outputs.hway }}
client: ${{ steps.filter.outputs.client }}
packages-changes: ${{ steps.filter.outputs.packages-changes == 'true' }}
web-changes: ${{ steps.filter.outputs.web-changes == 'true' }}
go-changes: ${{ steps.filter.outputs.go-changes == 'true' }}
wasm-changes: ${{ steps.filter.outputs.wasm-changes == 'true' }}
docker-changes: ${{ steps.filter.outputs.docker-changes == 'true' }}
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Detect changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
dex:
- 'x/dex/**'
- 'proto/sonr/dex/**'
did:
- 'x/did/**'
- 'proto/sonr/did/**'
dwn:
- 'x/dwn/**'
- 'proto/sonr/dwn/**'
svc:
- 'x/svc/**'
- 'proto/sonr/svc/**'
hway:
- 'cmd/hway/**'
- 'internal/bridge/**'
- 'internal/**'
crypto:
- 'crypto/**'
client:
- 'client/**'
- 'client/go.mod'
- 'client/go.sum'
core:
- 'app/**'
- 'cmd/**'
- 'go.mod'
- 'go.sum'
packages-changes:
- 'packages/**'
- 'pnpm-lock.yaml'
- 'package.json'
- 'tsconfig.json'
web-changes:
- 'web/**'
- 'pnpm-lock.yaml'
- 'package.json'
go-changes:
- 'app/**'
- 'x/**'
- 'cmd/**'
- 'client/**'
- 'go.mod'
- 'go.sum'
wasm-changes:
- 'cmd/vault/**'
- 'x/dwn/client/wasm/main.go'
- 'x/dwn/Makefile'
docker-changes:
- 'Dockerfile'
list-files: json
- name: Set module outputs
id: set-modules
run: |
modules=()
if [[ "${{ steps.filter.outputs.dex }}" == "true" ]]; then
modules+=("dex")
fi
if [[ "${{ steps.filter.outputs.did }}" == "true" ]]; then
modules+=("did")
fi
if [[ "${{ steps.filter.outputs.dwn }}" == "true" ]]; then
modules+=("dwn")
fi
if [[ "${{ steps.filter.outputs.svc }}" == "true" ]]; then
modules+=("svc")
fi
if [[ ${#modules[@]} -eq 0 ]]; then
echo "modules=[]" >> $GITHUB_OUTPUT
else
printf -v joined '"%s",' "${modules[@]}"
echo "modules=[${joined%,}]" >> $GITHUB_OUTPUT
fi
+101
View File
@@ -0,0 +1,101 @@
name: CI
on:
workflow_call:
inputs:
build:
required: false
type: string
snapshot:
required: false
type: string
test:
required: false
type: string
continue-on-error:
required: false
default: false
type: boolean
devbox-version:
required: false
default: 0.16.0
type: string
enable-cache:
required: false
default: false
type: boolean
fetch-depth:
required: false
default: 0
type: number
persist-credentials:
required: false
default: false
type: boolean
runs-on:
required: false
default: ubuntu-latest
type: string
jobs:
test:
runs-on: ${{ inputs.runs-on }}
environment: staging - ci
if: ${{ inputs.test != '' }}
name: Test
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Test ${{ inputs.test }}"
run: devbox run test:${{ inputs.test }}
if: ${{ inputs.test != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
build:
runs-on: ${{ inputs.runs-on }}
environment: staging - ci
if: ${{ inputs.build != '' }}
name: Build
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Build ${{ inputs.build }}"
run: devbox run build:${{ inputs.build }}
if: ${{ inputs.build != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
snapshot:
runs-on: ${{ inputs.runs-on }}
environment: staging - ci
if: ${{ inputs.snapshot != '' }}
name: Deploy
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Snapshot ${{ inputs.snapshot }}"
run: devbox run snapshot:${{ inputs.snapshot }}
if: ${{ inputs.snapshot != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
+137
View File
@@ -0,0 +1,137 @@
name: Devbox Run
on:
workflow_call:
inputs:
install:
required: true
default: go
type: string
build:
required: false
type: string
deploy:
required: false
type: string
publish:
required: false
type: string
test:
required: false
type: string
continue-on-error:
required: false
default: false
type: boolean
devbox-version:
required: false
default: 0.16.0
type: string
enable-cache:
required: false
default: false
type: boolean
fetch-depth:
required: false
default: 0
type: number
persist-credentials:
required: false
default: false
type: boolean
runs-on:
required: false
default: ubuntu-latest
type: string
jobs:
test:
runs-on: ${{ inputs.runs-on }}
environment: staging - test
if: ${{ inputs.test != '' }}
name: Test
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Test ${{ inputs.test }}"
run: devbox run test:${{ inputs.test }}
if: ${{ inputs.test != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
build:
runs-on: ${{ inputs.runs-on }}
environment: staging - build
if: ${{ inputs.build != '' }}
name: Build
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Build ${{ inputs.build }}"
run: devbox run build:${{ inputs.build }}
if: ${{ inputs.build != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
publish:
runs-on: ${{ inputs.runs-on }}
environment: staging - publish
if: ${{ inputs.publish != '' }}
name: Publish
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Publish ${{ inputs.publish }}"
run: devbox run publish:${{ inputs.publish }}
if: ${{ inputs.publish != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
deploy:
runs-on: ${{ inputs.runs-on }}
environment: staging - deploy
if: ${{ inputs.deploy != '' }}
name: Deploy
steps:
- name: Check out source
uses: actions/checkout@v4
with:
persist-credentials: ${{ inputs.persist-credentials }}
fetch-depth: ${{ inputs.fetch-depth }}
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.13.0
with:
enable-cache: ${{ inputs.enable-cache }}
devbox-version: ${{ inputs.devbox-version }}
- name: "Install ${{ inputs.install }}"
run: devbox run install:${{ inputs.install }}
- name: "Deploy ${{ inputs.deploy }}"
run: devbox run deploy:${{ inputs.deploy }}
if: ${{ inputs.deploy != '' }}
continue-on-error: ${{ inputs.continue-on-error }}
+99
View File
@@ -0,0 +1,99 @@
name: CI
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: 1.24.4
NODE_VERSION: 20
PNPM_VERSION: 10
permissions:
contents: read
pull-requests: read
packages: write
jobs:
detect-changes:
name: Analyze
uses: ./.github/workflows/changes.yml
client:
name: Client
needs: detect-changes
if: ${{ needs.detect-changes.outputs.client == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: go
test: client
build: client
core:
name: Core
needs: detect-changes
if: ${{ needs.detect-changes.outputs.go-changes == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: go
test: app
build: snrd
crypto:
name: Crypto
needs: detect-changes
if: ${{ needs.detect-changes.outputs.crypto == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: go
test: crypto
docker:
name: Docker
needs: detect-changes
if: ${{ needs.detect-changes.outputs.docker-changes == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: go
build: docker
hway:
name: Highway
needs: detect-changes
if: ${{ needs.detect-changes.outputs.hway == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: go
build: hway
packages:
name: Packages
needs: detect-changes
if: ${{ needs.detect-changes.outputs.packages-changes == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: pnpm
test: packages
web:
name: Web
needs: detect-changes
if: ${{ needs.detect-changes.outputs.web-changes == 'true' }}
uses: ./.github/workflows/devbox.yml
with:
install: pnpm
test: web
x-modules:
name: X
needs: detect-changes
if: ${{ needs.detect-changes.outputs.modules != '[]' && needs.detect-changes.outputs.modules != '' }}
strategy:
matrix:
module: ${{ fromJSON(needs.detect-changes.outputs.modules) }}
fail-fast: false
uses: ./.github/workflows/devbox.yml
with:
install: go
test: ${{ matrix.module }}
+406
View File
@@ -0,0 +1,406 @@
name: Release
# This workflow handles the complete release process:
# 1. Build binaries for multiple platforms (snrd, hway)
# 2. Build WASM modules (vault, motor)
# 3. Publish to GitHub releases, S3, and package registries
# 4. Build and push Docker images for all services
# 5. Publish NPM packages
# 6. Push protobuf definitions to Buf Schema Registry
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # ignore rc
workflow_dispatch:
permissions:
contents: write
packages: write
id-token: write
jobs:
# Prepare job runs on multiple OS for native builds
prepare:
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
- os: macos-latest
goos: darwin
goarch: amd64
- os: macos-latest
goos: darwin
goarch: arm64
runs-on: ${{ matrix.os }}
env:
flags: ""
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
cache-dependency-path: "**/*.sum"
- name: Install dependencies
run: |
go mod download
# Build WASM modules
make build-motr
make build-vault
# Set flags for workflow dispatch (nightly builds)
- if: ${{ github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
echo "flags=--nightly" >> $GITHUB_ENV
# Generate cache key
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Cache the built artifacts
- uses: actions/cache@v4
with:
path: dist/${{ matrix.goos }}
key: ${{ matrix.goos }}-${{ matrix.goarch }}-${{ env.sha_short }}${{ env.flags }}
enableCrossOsArchive: true
# Run goreleaser in split mode for snrd
- name: Run GoReleaser for snrd (Split)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean --split --config cmd/snrd/.goreleaser.yml ${{ env.flags }}
workdir: cmd/snrd
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GGOOS: ${{ matrix.goos }}
GGOARCH: ${{ matrix.goarch }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Run goreleaser in split mode for hway
- name: Run GoReleaser for hway (Split)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean --split --config cmd/hway/.goreleaser.yml ${{ env.flags }}
workdir: cmd/hway
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GGOOS: ${{ matrix.goos }}
GGOARCH: ${{ matrix.goarch }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# WASM modules build job
wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Setup TinyGo
uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.32.0'
- name: Build WASM modules
run: |
# Build vault WASM
cd cmd/vault
make build
cd ../..
# Build motor WASM
cd cmd/motr
make build
cd ../..
- name: Run GoReleaser for WASM modules
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean --config cmd/vault/.goreleaser.yml
workdir: cmd/vault
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Run GoReleaser for Motor WASM
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean --config cmd/motr/.goreleaser.yml
workdir: cmd/motr
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Merge and release job combines all artifacts
release:
runs-on: ubuntu-latest
needs: [prepare, wasm]
env:
flags: ""
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
cache-dependency-path: "**/*.sum"
# Set flags for workflow dispatch
- if: ${{ github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
echo "flags=--nightly" >> $GITHUB_ENV
# Generate cache key
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Restore all cached artifacts from prepare jobs
- name: Restore Linux AMD64 artifacts
uses: actions/cache@v4
with:
path: dist/linux
key: linux-amd64-${{ env.sha_short }}${{ env.flags }}
enableCrossOsArchive: true
- name: Restore Linux ARM64 artifacts
uses: actions/cache@v4
with:
path: dist/linux
key: linux-arm64-${{ env.sha_short }}${{ env.flags }}
enableCrossOsArchive: true
- name: Restore Darwin AMD64 artifacts
uses: actions/cache@v4
with:
path: dist/darwin
key: darwin-amd64-${{ env.sha_short }}${{ env.flags }}
enableCrossOsArchive: true
- name: Restore Darwin ARM64 artifacts
uses: actions/cache@v4
with:
path: dist/darwin
key: darwin-arm64-${{ env.sha_short }}${{ env.flags }}
enableCrossOsArchive: true
# Merge and publish the release for snrd
- name: Run GoReleaser for snrd (Merge)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: continue --merge --config cmd/snrd/.goreleaser.yml ${{ env.flags }}
workdir: cmd/snrd
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Merge and publish the release for hway
- name: Run GoReleaser for hway (Merge)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: continue --merge --config cmd/hway/.goreleaser.yml ${{ env.flags }}
workdir: cmd/hway
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Protobuf publishing job
protobuf:
runs-on: ubuntu-latest
needs: release
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Buf
uses: bufbuild/buf-setup-action@v1
with:
version: latest
- name: Push to Buf Schema Registry
uses: bufbuild/buf-push-action@v1
with:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}
github_token: ${{ secrets.GH_PAT_TOKEN }}
# NPM packages publishing job
npm:
runs-on: ubuntu-latest
needs: release
if: github.event_name == 'push' # Only on tag push, not workflow_dispatch
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Publish packages
run: |
# Update package versions to match git tag
export VERSION=${GITHUB_REF#refs/tags/v}
bash scripts/version-bump.sh sync-packages all
# Publish to npm
pnpm --filter "./packages/*" publish --access public --no-git-checks
pnpm --filter "./cli/*" publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Docker multi-platform build job
docker:
runs-on: ubuntu-latest
needs: release
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- service: snrd
dockerfile: cmd/snrd/Dockerfile
description: "Sonr blockchain daemon"
- service: hway
dockerfile: cmd/hway/Dockerfile
description: "Highway service - task processor"
- service: auth
dockerfile: web/auth/Dockerfile
description: "Authentication web application"
- service: dash
dockerfile: web/dash/Dockerfile
description: "Dashboard web application"
- service: postgres
dockerfile: etc/postgres/Dockerfile
description: "PostgreSQL with extensions"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/sonr-io/${{ matrix.service }}
onsonr/${{ matrix.service }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
type=raw,value=${{ inputs.tag || 'latest' }},enable=${{ github.event_name == 'workflow_dispatch' }}
- name: Build and push ${{ matrix.service }}
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: |
${{ steps.meta.outputs.labels }}
org.opencontainers.image.description=${{ matrix.description }}
cache-from: type=gha,scope=${{ matrix.service }}
cache-to: type=gha,mode=max,scope=${{ matrix.service }}
-54
View File
@@ -1,54 +0,0 @@
name: Publish to buf.build/didao/sonr
on:
push:
branches:
- develop
permissions:
contents: write
issues: write
jobs:
buf_push:
runs-on: ubuntu-latest
steps:
# Run `git checkout`
- uses: actions/checkout@v3
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@v1
# Push only the Input in `proto` to the BSR
- uses: bufbuild/buf-push-action@v1
continue-on-error: true
with:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}
upload_pkl:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Upload to R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: pkljar
source-dir: pkl
destination-dir: .
upload_nebula_cdn:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Upload to R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: nebula
source-dir: pkg/nebula/assets
destination-dir: .
+18
View File
@@ -0,0 +1,18 @@
name: CI Status
on:
workflow_run:
workflows: ["PR CI", "Post-Merge Release", "Nightly Snapshot"]
types: [completed]
jobs:
report:
name: Report CI Status
runs-on: builder
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Report Failure
run: |
echo "❌ Workflow Failed: ${{ github.event.workflow_run.name }}"
echo "Branch: ${{ github.event.workflow_run.head_branch }}"
echo "Commit: ${{ github.event.workflow_run.head_sha }}"
echo "URL: ${{ github.event.workflow_run.html_url }}"
+61
View File
@@ -0,0 +1,61 @@
name: PR CI
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: pr-${{ github.head_ref }}
cancel-in-progress: true
env:
DEVBOX_VERSION: 0.16.0
jobs:
validate:
name: Validate & Test
runs-on: builder # Self-hosted runner
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for github-env.sh comparisons
# Cache can be local on self-hosted runner for better performance
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/.local/share/pnpm/store
~/.devbox
key: deps-builder-${{ hashFiles('go.sum', 'pnpm-lock.yaml', 'devbox.json') }}
restore-keys: deps-builder-
- name: Install Dependencies
run: devbox install
- name: Test Affected Scopes
run: |
echo "🔍 Analyzing changes..."
./scripts/github-env.sh git-context
echo ""
devbox run test
- name: Build Affected Scopes
run: devbox run build
- name: Verify Build Artifacts
run: |
# Verify critical build outputs exist
if [ -d "build/" ]; then
ls -la build/
fi
# Cleanup workspace for self-hosted runner
- name: Cleanup
if: always()
run: |
# Clean build artifacts to prevent disk fill
make clean || true
# Keep caches but remove build outputs
rm -rf dist/ build/ || true
-36
View File
@@ -1,36 +0,0 @@
name: "Release Binary"
on:
push:
branches:
- master
tags:
- v*
permissions:
contents: write
jobs:
goreleaser:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Release
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
-39
View File
@@ -1,39 +0,0 @@
name: Bump version
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
jobs:
run-tests:
runs-on: ubuntu-latest
name: "Run tests"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Run tests
run: make test
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump Version"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Regular → Executable
+123 -63
View File
@@ -1,80 +1,140 @@
# Binaries
.data
*.exe
*.exe~
*.dll
*.so
*.dylib
*.app
# ======================================
# Sonr Blockchain & Monorepo .gitignore
# ======================================
# ===== Operating System Files =====
.DS_Store
.session.vim
aof*
dist
Thumbs.db
*~
*.swp
*.swo
.logs/
.venv/
services/
# Test binary
# ===== IDE & Editor Files =====
.vscode/
.idea/
*.tmp
.aider*
.opencode
# ===== Build Artifacts & Binaries =====
*.wasm
bin/
dist/
dist*/
build/
out/
*.test
.devon*
**/.DS_Store
# Output of the go coverage tool
*.out
*.wasm
# Exclude embedded files
!internal/files/dist
# Go binaries (but allow docs references)
snrd
hway
motr
!cmd/motr/
!cmd/hway/
!cmd/snrd/
!docs/**/motr
!docs/**/hway
# Dependency directories
# Allow specific CLI binaries
!cli/join-testnet/bin/
!cli/install/bin/
# ===== Node.js & Frontend =====
node_modules/
.pnpm-debug.log*
pnpm-debug.log*
package-lock.json
yarn.lock
*.tsbuildinfo
# Go workspace file
# Next.js
.next/
.vercel/
**/.open-next
# ===== Go Development =====
pkg/mod/
go.work
go.work.sum
go.work.mod
coverage.out
coverage.txt
profile.out
*.cover
# Environment files
.env
**/*.env
# ===== Rust/CosmWasm Development =====
target/
Cargo.lock
artifacts/
**/target/
**/Cargo.lock
# Contract-specific
contracts/DAO/deployment_ids.env
contracts/DAO/deployment_report_*.md
contracts/DAO/relayer.pid
contracts/DAO/*.mnemonic
contracts/DAO/tx_*.json
contracts/DAO/signed_*.json
contracts/DAO/init_*.json
contracts/DAO/MAINNET_DEPLOYMENT_INSTRUCTIONS.md
contracts/DAO/backups/
contracts/wSNR/remappings.txt
# Terraform
**/.terraform/*
.terraform
*.tfstate
*.tfstate.*
crash.log
crash.*.log
*.tfvars
*.tfvars.json
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# ===== Blockchain & Cosmos SDK =====
.snrd/
.hway/
keyring-test/
mytestnet/
docker/testnet/testnet-data
.terraformrc
terraform.rc
# ===== Monorepo & Build Tools =====
.turbo/
.gitwork/
.changeset/.cli-state
.biome/
.devbox/
.task*
Taskfile.yml
# Misc
.DS_Store
.tmp/
tmp/
**/*tmp*/
*.tmp
# ===== Testing & Coverage =====
testdata/
coverage/
# ===== Logs & Temporary Files =====
logs/
*.log
*.dot
configs/logs.json
tmp/
tmp*
# ===== Environment & Secrets =====
.env
.env.local
.env.production
.env.development
*.key
*.pem
dist/
bin/
build/
.devbox
.ignore
.opencommitignore
# ===== Documentation & Planning =====
PLAN.md
ANALYSIS.md
COMPLETION_SUMMARY.md
**/CLAUDE.md
# ===== Miscellaneous =====
.claude/
**/.claude
.gmap
.aim
.spawn
.wrangler/
.browser-echo-mcp.json
data/
compose/
heighliner*
sonr
deploy/**/data
x/.DS_Store
.aider*
buildenv*
nebula/node_modules
mprocs.yaml
build
!devbox.lock
!buf.lock
**/*.swagger.yaml
+91
View File
@@ -0,0 +1,91 @@
#jsonschema:https://golangci-lint.run/jsonschema/golangci.jsonschema.json
version: "2"
linters:
enable:
- govet
- ineffassign
- misspell
- unconvert
- staticcheck
- errcheck
- gosec
- goconst
- prealloc
- dupl
- whitespace
disable:
- exhaustruct
settings:
govet:
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 3
min-occurrences: 3
funlen:
lines: 100
statements: 50
gocognit:
min-complexity: 20
gocritic:
enabled-checks:
- nilValReturn
- rangeExprCopy
revive:
confidence: 0.8
rules:
- name: exported
arguments: [checkPrivateReceivers, sayRepetitiveInsteadOfStutters]
staticcheck:
checks:
[
"all",
"-SA1019",
"-SA1029",
"-SA2002",
"-SA4006",
"-ST1021",
"-S1004",
"-ST1003",
"-ST1005",
"-ST1016",
]
gosec:
excludes:
- G204 # Subprocess launched with function call as argument or cmd arguments
- G404 # Weak random number generator
- G115 # Weak random number generator
formatters:
enable:
- gofmt
- gofumpt
- goimports
- golines
exclusions:
warn-unused: true
generated: strict
paths:
- ".*\\.pb\\.go$"
- ".*\\.pulsar\\.go$"
- ".*\\.cosmos_orm\\.go$"
- ".*\\._orm\\.go$"
- "types/webauthn/.*\\.go$"
issues:
max-issues-per-linter: 0
max-same-issues: 0
new: true
fix: true
run:
timeout: 5m
relative-path-mode: gomod
issues-exit-code: 2
tests: true
modules-download-mode: readonly
allow-parallel-runners: true
allow-serial-runners: true
concurrency: 8
-83
View File
@@ -1,83 +0,0 @@
project_name: sonr
builds:
- id: sonr
goos:
- linux
- darwin
goarch:
- amd64
main: ./cmd/sonrd
binary: sonrd
builder: go
gobinary: go
command: build
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
- id: motr
goos:
- linux
- darwin
goarch:
- amd64
- arm64
main: ./cmd/motrd
binary: motrd
builder: go
gobinary: go
command: build
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
- id: dwn
goos:
- js
goarch:
- wasm
main: ./cmd/dwn/dwn.go
binary: dwn
builder: go
gobinary: go
command: build
archives:
- id: default
builds:
- sonr
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: tar.gz
files:
- src: README*
- src: CHANGELOG*
- id: motr
builds:
- motr
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: tar.gz
files:
- src: README*
- src: CHANGELOG*
- id: dwn
builds:
- dwn
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
format: zip
files:
- src: CHANGELOG*
- src: pkl/dwn.pkl
release:
github:
owner: onsonr
name: sonr
name_template: "{{.Tag}}"
ids:
- default
- motr
- dwn
draft: false
replace_existing_draft: true
replace_existing_artifacts: true
+5
View File
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
---
version: 2
monorepo:
tag_prefix: v
+17
View File
@@ -0,0 +1,17 @@
.dockerignore
.goreleaser.yml
api
contracts
chains
crypto
proto
test
**/_test.go
.golangci.yml
tsconfig.json
pnpm-workspace.yaml
biome.json
CLAUDE.md
CONSTITUTION.md
CHANGELOG.md
Caddyfile
+871 -134
View File
File diff suppressed because it is too large Load Diff
+197
View File
@@ -0,0 +1,197 @@
# Sonr Blockchain Constitution
## Preamble
We, the members of the Sonr Network Community, establish this Constitution to govern the decentralized ecosystem built upon the principles of self-sovereign identity, user-controlled authentication, and distributed consensus. This Constitution defines the governance framework for the Sonr blockchain, operated under the stewardship of the Decentralized Identity DAO LC (diDAO), a Wyoming Decentralized Unincorporated Nonprofit Association (DUNA), dedicated to advancing decentralized identity infrastructure for the benefit of all participants.
The Sonr Network operates through a dual-token system, with SNR serving as the governance token and uSNR as the base denomination, enabling democratic participation while maintaining operational efficiency through authentication-based revenue generation and cryptographic security anchored in users personal Motr vaults.
This Constitution serves as the immutable foundation of our governance, establishing the rights, responsibilities, and procedures that will guide Sonr through technological evolution, regulatory changes, and societal transformation while maintaining our core mission of human-centric identity protection for the next 100 years and beyond.
## Article I: Mission, Values, and Foundational Principles
### Section 1: Constitutional Mission
The Sonr Network commits to building a Digital Identity System capable of protecting humanity for the next 100 years and beyond. This network serves as a perpetual guardian of human digital identity, balancing technological innovation with fundamental rights protection through democratic governance, technical excellence, and unwavering commitment to privacy.
### Section 2: Core Values and Inviolable Principles
The Sonr Network operates on these inviolable principles that form the bedrock of all network operations.
Human Sovereignty establishes that every individual possesses inherent rights to control their digital identity and personal data. The network recognizes that identity ownership represents a fundamental human right that cannot be compromised, transferred to third parties, or subjected to external control mechanisms.
Privacy by Design requires that privacy protection must be embedded at the protocol level, not added as an afterthought. All network operations implement privacy-preserving technologies by default, ensuring user data remains confidential and secure throughout all interactions and transactions.
Decentralization mandates that no single entity shall control identity verification, data access, or governance processes. The network maintains distributed control across validators, token holders, and the broader community to prevent centralized points of failure or manipulation.
Interoperability ensures that identity solutions must work seamlessly across all chains and systems. Users maintain consistent identity across different platforms and applications while preserving privacy and security, enabling universal digital identity portability.
Perpetual Accessibility requires that the network must remain accessible to all humanity regardless of technological sophistication, economic status, geographic location, or any other discriminating factors. Universal usability and inclusion remain paramount design considerations.
Quantum Resilience mandates that all cryptographic systems must evolve proactively to maintain security against emerging threats, including quantum computing advances and other technological developments that could compromise traditional security models.
### Section 3: Rights and Obligations
All users of the Sonr Network possess these inalienable rights. Identity Sovereignty encompasses complete ownership and control over ones digital identity and associated data, with no external entity possessing override authority over individual identity decisions. Selective Disclosure provides the ability to share only necessary information for specific purposes, maintaining privacy while enabling required verifications and interactions. Data Portability ensures freedom to export identity data and migrate between systems without restriction or penalty, preventing vendor lock-in and maintaining user autonomy. Consent Granularity delivers fine-grained control over data usage permissions, allowing users to specify exactly how, when, and where their information may be utilized. Erasure Rights enable users to request deletion of personal data in compliance with privacy regulations while maintaining network integrity and security. Access Equality guarantees equal access to network services regardless of stake size, geographic location, or socioeconomic status, ensuring universal participation opportunities.
All network participants accept these fundamental obligations. Privacy Protection requires commitment to protecting user privacy and data sovereignty through both technical implementation and operational practices. Network Security encompasses responsibility to maintain network integrity, report vulnerabilities through appropriate channels, and contribute to overall system resilience. Governance Participation mandates active participation in governance processes when holding staked tokens, ensuring democratic legitimacy through stakeholder engagement. Regulatory Compliance involves adherence to applicable laws while preserving user privacy and maintaining the networks decentralized character. Transparency requires open communication about network operations, decision-making processes, and any conflicts of interest that might affect network governance.
### Section 4: Identity-Specific Governance Framework
The network implements multi-level verification tiers ranging from self-attested to cryptographically verified credentials. Privacy-preserving verification utilizes zero-knowledge proofs to enable authentication without revealing underlying personal data. Decentralized reputation systems provide community-driven trust mechanisms while maintaining user anonymity. Biometric data protection standards ensure the highest level of security for biological identifiers. Recovery mechanisms for compromised identities include social recovery protocols and hardware security module integration.
Governance approval processes determine authorization for trusted credential issuers within the network ecosystem. Standardized schemas for common credentials enable interoperability while maintaining flexibility for emerging use cases. Privacy-preserving credential revocation mechanisms allow for credential invalidation without compromising user privacy. Cross-chain recognition agreements establish mutual credential recognition with other blockchain networks and traditional identity systems.
All network operations collect only essential data required for stated purposes, implementing selective disclosure by default across all interactions. Zero-knowledge proofs enable verification without data revelation whenever technically feasible. Sensitive data receives encryption protection both at rest and in transit using industry-leading cryptographic standards. Users maintain granular consent management systems enabling fine-tuned control over data access and usage permissions. Real-time data access logs provide complete transparency regarding who accessed what information and when. Immediate revocation capabilities allow users to withdraw consent and access permissions instantly. Complete data portability ensures users can export their identity data and migrate between systems without restrictions.
### Section 5: Long-Term Sustainability and Evolution
The network commits to hundred-year sustainability through establishment of endowment funds sourced from the community treasury. Technology-agnostic governance frameworks ensure adaptability as underlying technologies evolve over decades. Succession planning addresses all critical roles to prevent single points of failure across extended timeframes. Regular ten-year strategic reviews assess network direction and adjust long-term planning accordingly.
Annual governance effectiveness reviews evaluate and improve decision-making processes based on outcomes and community feedback. Adaptive parameter adjustment mechanisms enable network optimization based on growth patterns and usage metrics. Continuous integration of privacy-enhancing technologies ensures the network remains at the forefront of privacy protection. Proactive regulatory compliance updates anticipate and address changing legal landscapes across multiple jurisdictions.
Emergency response protocols address potential network disruptions, security breaches, and governance attacks. Crisis management procedures enable rapid response while maintaining democratic oversight and accountability. Validator coordination mechanisms ensure network continuity during technical emergencies or coordinated attacks. Recovery procedures establish clear processes for restoring normal operations following any network disruption.
### Section 6: Technical Standards and Compliance
Full compliance with W3C Decentralized Identifier specifications includes proper DID Method implementation and registration with appropriate standards bodies. Verifiable Credentials standards adherence ensures interoperability with existing and emerging digital credential ecosystems. Resolution and dereferencing compatibility enables seamless integration with external systems and applications. Cross-platform interoperability requirements ensure broad accessibility across different technological platforms.
Implementation of NIST post-quantum standards including FIPS 203, 204, and 205 algorithms ensures long-term security against quantum computing threats. Cryptographic agility enables smooth transitions between cryptographic algorithms as new standards emerge. Emergency upgrade procedures address immediate cryptographic threats through rapid deployment mechanisms. Regular security audits verify quantum resistance and overall cryptographic security posture.
GDPR data protection requirements integration ensures European privacy standard compliance while maintaining decentralized architecture. CCPA privacy rights implementation provides California residents with required privacy protections and controls. Cross-jurisdictional privacy standards ensure broad regulatory compliance across multiple legal frameworks. User consent and data sovereignty mechanisms provide granular control while meeting regulatory requirements.
### Section 7: Constitutional Supremacy and Immutable Provisions
This Constitution represents the supreme governance document of the Sonr Network. Any governance proposal, validator action, network upgrade, or diDAO decision that contradicts these constitutional provisions shall be considered null and void.
The following provisions cannot be amended through any governance mechanism: the core mission of protecting human digital identity sovereignty for the next century and beyond, privacy-by-design requirements embedded in all network operations and future developments, user data ownership rights and control mechanisms ensuring individual autonomy, decentralization principles preventing any form of centralized control or authority, and the commitment to serve all of humanitys identity needs regardless of technological evolution.
## Article II: Token Economics
### Section 1: Token Structure
The governance token SNR serves as the primary token for network governance, staking, and ecosystem participation. The base denomination uSNR represents the smallest unit of account, where 1 SNR equals 1,000,000 uSNR. The network maintains a fixed maximum supply of 1,000,000,000 SNR tokens to ensure economic predictability and scarcity preservation.
### Section 2: Token Distribution
The genesis distribution of SNR tokens shall be allocated across four primary categories to ensure balanced ecosystem development and sustainable growth.
Community and Ecosystem allocation of 45% supports broad network adoption and long-term sustainability. Public Distribution receives 15% to ensure democratic access and widespread token ownership. Community Treasury obtains 15% for governance-directed initiatives and ecosystem development. Ecosystem Development Fund captures 10% for strategic partnerships, integrations, and technology advancement. Validator Rewards Pool secures 5% for initial network security incentives.
Network Development allocation of 25% ensures continued technical advancement and operational excellence. Core Protocol Development receives 10% for fundamental blockchain infrastructure and identity protocol enhancement. Infrastructure and Operations obtains 8% for network maintenance, security monitoring, and operational support. Security and Audits captures 4% for comprehensive security assessments, penetration testing, and vulnerability remediation. Research and Innovation secures 3% for experimental technologies and future-oriented development initiatives.
The diDAO Foundation allocation of 15% provides institutional stability and strategic guidance. Foundation Reserve receives 10% for long-term operational sustainability and emergency response capabilities. Strategic Partnerships obtains 5% for critical alliance formation and ecosystem expansion initiatives.
Contributors and Team allocation of 15% recognizes the human capital essential for network success. Core Team receives 10% acknowledging the foundational work and ongoing commitment of primary developers and leaders. Advisors obtain 3% compensating strategic guidance and domain expertise. Early Contributors secure 2% recognizing initial community builders and supporters.
### Section 3: Vesting and Unlock Schedules
Community allocations provide immediate availability for public distribution while treasury and ecosystem funds remain subject to governance proposals ensuring democratic control over resource allocation. Network Development follows a six-month cliff period followed by linear vesting over 36 months to align long-term incentives with network development goals. The diDAO Foundation implements a twelve-month cliff followed by linear vesting over 48 months ensuring institutional stability while preventing premature token concentration. Contributors and Team follow a twelve-month cliff with linear vesting over 48 months aligning personal incentives with long-term network success.
### Section 4: Revenue Mechanisms
The network generates sustainable revenue through authentication service fees paid in uSNR, creating direct utility for the native token. Motr vault operation fees provide enhanced security features while maintaining basic functionality accessibility. Verification and attestation services offer tiered pricing based on verification complexity and security requirements. Cross-chain identity bridge operations generate fees for interoperability services across different blockchain ecosystems. Smart contract execution fees for identity operations ensure computational resources remain fairly compensated.
## Article III: Governance Structure
### Section 1: The diDAO Foundation
The Decentralized Identity DAO LC, organized as a Wyoming DUNA, serves as the steward of the Sonr Network. The foundation assumes responsibility for protocol governance coordination ensuring democratic processes remain effective and inclusive. Treasury management oversight provides fiscal responsibility while maintaining transparency and accountability. Ecosystem development initiatives support strategic growth and partnership formation. Legal representation and compliance ensure regulatory adherence while protecting network decentralization. Strategic partnership facilitation connects the network with compatible organizations and technologies.
### Section 2: Governance Bodies
SNR Token Holders possess ultimate decision-making authority within the governance framework. Proposal voting rights operate proportionally to staked SNR holdings ensuring democratic representation while incentivizing network participation. A minimum requirement of 100 SNR enables proposal submission, maintaining accessibility while preventing spam and frivolous governance actions.
The Validator Assembly handles technical governance and protocol upgrades ensuring network security and performance optimization. Network security and performance monitoring provides continuous oversight of critical infrastructure. A minimum self-bonded stake requirement of 50,000 SNR ensures validator commitment and alignment with network success.
The Identity Council comprises seven elected members serving twelve-month terms providing specialized governance oversight. The council oversees identity standards and authentication protocols ensuring technical excellence and user protection. Council members review and recommend governance proposals offering expert analysis and community guidance.
### Section 3: Voting Mechanisms
Standard Proposals require simple majority approval exceeding 50% with a 20% quorum ensuring broad community participation in routine governance decisions. Protocol Upgrades demand supermajority approval exceeding 66.7% with a 33% quorum reflecting the critical nature of technical changes. Constitutional Amendments require supermajority approval exceeding 75% with a 40% quorum protecting fundamental network principles from hasty modification. Emergency Actions enable Identity Council approval through 5 of 7 members for time-sensitive security matters requiring rapid response capabilities.
### Section 4: Proposal Process
Submission requires a 100 SNR deposit returned upon proposal reaching quorum, ensuring serious proposals while maintaining accessibility. A seven-day discussion period enables community review and debate fostering informed decision-making. A seven-day voting period provides token holder participation opportunities while maintaining governance efficiency. Implementation includes a 48-hour timelock for non-emergency proposals ensuring final review and preventing malicious governance attacks.
## Article IV: Network Operations
### Section 1: Validation and Consensus
Validator requirements include a minimum self-bonded stake of 50,000 SNR ensuring significant skin in the game for network security participants. Maximum total delegation caps at 10% of total staked SNR preventing excessive centralization and maintaining distributed control. Technical specifications remain determined by the Validator Assembly ensuring expertise guides infrastructure requirements.
The consensus mechanism implements Proof-of-Stake consensus with Byzantine Fault Tolerance ensuring network security and finality. Block time targets and finality parameters operate under protocol control enabling optimization based on network performance and user experience requirements.
### Section 2: Staking and Rewards
Staking parameters establish a minimum delegation of 10 SNR ensuring broad accessibility while maintaining meaningful participation thresholds. The unbonding period extends 21 days providing security against rapid stake manipulation while enabling legitimate validator changes. Automatic compounding remains available for delegators seeking to maximize staking returns through compound interest effects.
Reward distribution includes block rewards sourced from the Validator Rewards Pool ensuring sustainable validator compensation. Transaction fees distribute proportionally to validators and delegators aligning incentives with network usage and security provision. Authentication service revenue sharing with active validators creates additional income streams beyond traditional staking rewards.
### Section 3: Motr Vault Integration
The Motr serves as users personal cryptographic key vault providing fundamental identity infrastructure. Secure key generation and storage ensures cryptographic security while maintaining user control and accessibility. Authentication credential management enables seamless interaction with applications and services across the ecosystem. Cross-application identity portability allows users to maintain consistent identity across different platforms and use cases. Recovery mechanisms through social recovery or hardware security modules provide security without sacrificing usability. Integration with the networks UCAN authorization system enables granular permission management and secure authentication flows.
## Article V: Treasury and Funding
### Section 1: Community Treasury
The Community Treasury receives initial funding of 15% of total supply supporting ecosystem development and community initiatives. Ecosystem development grants provide funding for projects advancing network adoption and technological innovation. Security audits and bug bounties ensure network security through professional assessment and community-driven vulnerability discovery. Community initiatives and events foster engagement and education within the ecosystem. Emergency response funding enables rapid action during critical situations requiring immediate resource deployment. Strategic acquisitions or partnerships support network growth through consolidation or alliance formation.
### Section 2: Treasury Management
Disbursement limits ensure appropriate oversight commensurate with funding amounts. Expenditures below 10,000 SNR require Identity Council approval enabling efficient small-scale funding decisions. Expenditures between 10,000 and 100,000 SNR require standard proposal approval ensuring democratic oversight of moderate expenditures. Expenditures exceeding 100,000 SNR demand supermajority proposal approval protecting community assets from inappropriate large-scale spending.
Transparency requirements include quarterly treasury reports providing regular community updates on fund utilization and remaining resources. Real-time on-chain tracking enables continuous monitoring of treasury activities and expenditures. Annual third-party audits ensure fiscal responsibility and identify potential improvements in treasury management practices.
### Section 3: Fee Structure
Network fees collected in uSNR create sustainable revenue streams for network operations and development. Base Transaction Fees adjust dynamically based on network congestion ensuring fair pricing while maintaining network accessibility. Authentication Service Fees operate under service provider control with minimum network fees applied ensuring baseline revenue generation. Storage Fees calculate based on data size and retention period reflecting actual resource consumption and infrastructure costs. Identity Verification Fees implement tiered pricing based on verification level ensuring appropriate compensation for different security and verification requirements.
## Article VI: Security and Compliance
### Section 1: Security Measures
Slashing conditions protect network integrity through economic penalties for malicious or negligent behavior. Double signing results in a 5% stake slash ensuring validators maintain proper key security and operational procedures. Prolonged downtime triggers a 0.1% stake slash incentivizing reliable validator performance and network availability. Governance attacks may result in stake slashing up to 100% protecting democratic processes from manipulation or coordinated attacks.
Emergency response capabilities enable rapid action during critical situations. Identity Council emergency powers address critical vulnerabilities requiring immediate intervention beyond normal governance timelines. Validator Assembly coordination manages network halts and recovery procedures ensuring orderly response to technical emergencies. Emergency action periods limit to maximum 72 hours preventing abuse while enabling necessary rapid response capabilities.
### Section 2: Compliance Framework
The diDAO ensures regulatory compliance through structured legal and operational frameworks. KYC and AML procedures apply to high-value transactions where required by applicable law ensuring legal compliance while preserving network accessibility. Sanctions screening for validator operations ensures compliance with international law while maintaining decentralized operation principles. Tax reporting assistance supports network participants in meeting legal obligations while preserving privacy where legally permissible. Regulatory liaison and legal representation provide professional advocacy and compliance guidance across multiple jurisdictions.
## Article VII: Amendments and Governance Evolution
### Section 1: Amendment Process
Constitutional amendments require formal proposal submission with detailed rationale ensuring thoughtful consideration of fundamental changes. A thirty-day discussion period enables comprehensive community review and debate fostering informed democratic decision-making. Approval requires 75% support with 40% quorum protecting constitutional stability while enabling necessary evolution. A seven-day implementation timelock provides final review opportunity and prevents malicious constitutional manipulation.
### Section 2: Transition Provisions
The initial parameter adjustment period spanning the first 180 days allows parameter changes via supermajority vote enabling network optimization during early operation. Foundation transition processes transfer diDAO operational control to full DAO governance after 24 months ensuring decentralization progression while maintaining initial stability. Vesting acceleration through governance vote may occur during extraordinary circumstances providing flexibility while protecting long-term incentive alignment.
### Section 3: Dispute Resolution
Technical disputes receive resolution through Validator Assembly expertise ensuring appropriate technical knowledge guides infrastructure decisions. Governance disputes undergo arbitration by Identity Council providing specialized oversight of democratic processes and constitutional interpretation. Constitutional disputes require referral to external arbitration under Wyoming DUNA framework ensuring neutral resolution of fundamental disagreements. User disputes utilize community-selected arbitrators providing peer-based resolution mechanisms for interpersonal conflicts.
## Article VIII: Implementation and Final Provisions
### Section 1: Effective Date and Ratification
This Constitution becomes effective upon mainnet genesis block production and ratification by the initial validator set ensuring democratic legitimacy from network inception.
### Section 2: Legal Framework
If any provision of this Constitution becomes invalid or unenforceable, the remaining provisions shall continue in full force and effect ensuring constitutional stability despite potential legal challenges. The Identity Council provides non-binding interpretative guidance for constitutional questions while maintaining democratic oversight of interpretation. Ambiguities receive resolution favoring decentralization and user sovereignty ensuring alignment with fundamental network principles. Technical specifications undergo interpretation by Validator Assembly ensuring appropriate expertise guides infrastructure decisions.
### Section 3: Legacy and Evolution
This Constitution establishes Sonr as a perpetual guardian of human digital identity, balancing technological innovation with fundamental rights protection. Through democratic governance, technical excellence, and unwavering commitment to privacy, the Sonr Network shall serve humanitys identity needs for the next century and beyond. The provisions herein create a resilient framework capable of evolving with technology while maintaining core principles that respect human dignity, ensure data sovereignty, and enable secure digital interactions for all.
By ratifying this Constitution, the Sonr community commits to building and maintaining a digital identity system that respects human dignity, ensures data sovereignty, and enables secure digital interactions for all participants while maintaining democratic governance and technological excellence throughout the networks centennial mission.
---
- _Ratified by the Sonr Network Community_
- _Stewarded by the Decentralized Identity DAO LC (diDAO)_
- _**Empowering Self-Sovereign Identity Through Distributed Consensus**_
+93
View File
@@ -0,0 +1,93 @@
# Caddy reverse proxy configuration for Sonr services
{
# Global options
admin off
auto_https off
# Enable debug mode for development
debug
}
# Health check endpoint
:80/health {
respond "OK" 200
}
# REST API proxy (Cosmos SDK)
:80/api/* {
reverse_proxy snrd:1317
header Access-Control-Allow-Origin *
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
header Access-Control-Allow-Headers "Content-Type, Authorization"
}
# gRPC-Web proxy
:80/grpc/* {
reverse_proxy h2c://snrd:9090
header Access-Control-Allow-Origin *
header Access-Control-Allow-Methods "GET, POST, OPTIONS"
header Access-Control-Allow-Headers "Content-Type, x-grpc-web, x-user-agent"
}
# JSON-RPC proxy (EVM)
:80/rpc {
reverse_proxy snrd:8545
header Access-Control-Allow-Origin *
header Access-Control-Allow-Methods "POST, OPTIONS"
header Access-Control-Allow-Headers "Content-Type"
}
# WebSocket JSON-RPC proxy (EVM)
:80/ws {
reverse_proxy snrd:8546
header Access-Control-Allow-Origin *
}
# Highway service proxy
:80/highway/* {
reverse_proxy highway:8090
header Access-Control-Allow-Origin *
header Access-Control-Allow-Methods "GET, POST, OPTIONS"
header Access-Control-Allow-Headers "Content-Type, Authorization"
}
# Production configuration with TLS (when CADDY_DOMAIN is set)
{$CADDY_DOMAIN:localhost} {
# TLS configuration for production
@production {
not host localhost
}
tls @production {
# Automatic HTTPS with Let's Encrypt
}
# Same proxy rules as above
handle /health {
respond "OK" 200
}
handle /api/* {
reverse_proxy snrd:1317
}
handle /grpc/* {
reverse_proxy h2c://snrd:9090
}
handle /rpc {
reverse_proxy snrd:8545
}
handle /ws {
reverse_proxy snrd:8546
}
handle /highway/* {
reverse_proxy highway:8090
}
# Default handler
handle {
respond "Sonr Network Gateway" 200
}
}
Regular → Executable
+153 -74
View File
@@ -1,89 +1,168 @@
FROM jetpackio/devbox:latest AS sonrvm
# Installing your devbox project
WORKDIR /code
USER root:root
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
USER ${DEVBOX_USER}:${DEVBOX_USER}
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml
RUN devbox run -- echo "Installed Packages."
ENTRYPOINT ["devbox", "run"]
# --------------------------------------------------------
FROM jetpackio/devbox:latest AS sonr-runner
WORKDIR /code
USER root:root
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
USER ${DEVBOX_USER}:${DEVBOX_USER}
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} process-compose.yaml process-compose.yaml
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} . .
RUN devbox run -- echo "Installed Packages."
RUN git config --global --add safe.directory /code
ENTRYPOINT ["devbox", "run", "testnet"]
# --------------------------------------------------------
FROM golang:1.22-alpine AS go-builder
# Use build argument for base image to allow using pre-cached base
ARG BASE_IMAGE=golang:1.24.7-alpine3.22
FROM ${BASE_IMAGE} AS builder
SHELL ["/bin/sh", "-ecuxo", "pipefail"]
RUN apk add --no-cache ca-certificates build-base git
# Install build dependencies
RUN apk add --no-cache \
ca-certificates \
build-base \
git \
linux-headers \
bash \
binutils-gold \
wget
WORKDIR /code
COPY go.mod go.sum ./
RUN set -eux; \
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm || true); \
if [ ! -z "${WASM_VERSION}" ]; then \
WASMVM_REPO=$(echo $WASM_VERSION | awk '{print $1}');\
WASMVM_VERS=$(echo $WASM_VERSION | awk '{print $2}');\
wget -O /lib/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.$(uname -m).a;\
fi; \
go mod download;
# Copy entire source code (including crypto module)
COPY . .
# Copy over code
COPY . /code
# Fix git ownership issue
RUN git config --global --add safe.directory /code
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
# then log output of file /code/bin/sonrd
# then ensure static linking
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& file /code/build/sonrd \
&& echo "Ensuring binary is statically linked ..." \
&& (file /code/build/sonrd | grep "statically linked")
# Download WasmVM library
RUN --mount=type=cache,target=/tmp/wasmvm \
set -eux; \
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | head -1 || echo ""); \
if [ ! -z "${WASM_VERSION}" ]; then \
WASMVM_REPO=$(echo $WASM_VERSION | awk '{print $1}'); \
WASMVM_VERS=$(echo $WASM_VERSION | awk '{print $2}'); \
WASMVM_FILE="libwasmvm_muslc.${ARCH}.a"; \
if [ ! -f "/tmp/wasmvm/${WASMVM_FILE}" ]; then \
wget -O "/tmp/wasmvm/${WASMVM_FILE}" "https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/${WASMVM_FILE}"; \
fi; \
cp "/tmp/wasmvm/${WASMVM_FILE}" /lib/libwasmvm_muslc.a; \
fi
# Download Go modules
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go mod download
# Build binary with optimizations
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
set -eux; \
VERSION=$(git describe --tags --always 2>/dev/null || echo "dev"); \
COMMIT=$(git log -1 --format='%H' 2>/dev/null || echo "unknown"); \
LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true \
CGO_ENABLED=1 GOOS=linux \
go build \
-mod=readonly \
-tags "netgo,ledger,muslc" \
-ldflags "-X github.com/cosmos/cosmos-sdk/version.Name=sonr \
-X github.com/cosmos/cosmos-sdk/version.AppName=snrd \
-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \
-X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc \
-w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \
-buildvcs=false \
-trimpath \
-o /code/build/snrd \
./cmd/snrd; \
file /code/build/snrd; \
echo "Ensuring binary is statically linked ..."; \
(file /code/build/snrd | grep "statically linked")
# --------------------------------------------------------
FROM debian:11-slim
# Highway service build stage
FROM ${BASE_IMAGE} AS highway-builder
SHELL ["/bin/sh", "-ecuxo", "pipefail"]
COPY --from=go-builder /code/build/sonrd /usr/bin/sonrd
# Install build dependencies
RUN apk add --no-cache \
ca-certificates \
build-base \
git \
linux-headers \
bash
# Install dependencies for Debian 11
RUN apt-get update && apt-get install -y \
curl \
make \
bash \
jq \
sed \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
COPY scripts/test_node.sh /usr/bin/test_node.sh
# Copy entire source code
COPY . .
# Fix git ownership issue
RUN git config --global --add safe.directory /code
# Download Go modules
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go mod download
# Build Highway binary with optimizations
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
set -eux; \
VERSION=$(git describe --tags --always 2>/dev/null || echo "dev"); \
COMMIT=$(git log -1 --format='%H' 2>/dev/null || echo "unknown"); \
CGO_ENABLED=1 GOOS=linux \
go build \
-mod=readonly \
-tags "netgo" \
-ldflags "-X main.Version=${VERSION} \
-X main.Commit=${COMMIT} \
-w -s -linkmode=external -extldflags '-static'" \
-buildvcs=false \
-trimpath \
-o /code/build/hway \
./cmd/hway; \
file /code/build/hway; \
echo "Ensuring binary is statically linked ..."; \
(file /code/build/hway | grep "statically linked")
# --------------------------------------------------------
# Highway runtime image
FROM alpine:3.17 AS highway
LABEL org.opencontainers.image.title="Sonr Highway Service"
LABEL org.opencontainers.image.source="https://github.com/sonr-io/sonr"
# Copy binary from builder
COPY --from=highway-builder /code/build/hway /usr/bin/hway
# Install runtime dependencies
RUN apk add --no-cache ca-certificates wget
# Create non-root user
RUN adduser -D -u 1000 highway
# Set working directory
WORKDIR /home/highway
# Switch to non-root user
USER highway
# Health check endpoint
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --spider -q http://localhost:8090/health || exit 1
# Expose Highway port
EXPOSE 8090
# Set default command
ENTRYPOINT ["/usr/bin/hway"]
# --------------------------------------------------------
# Final minimal runtime image (default target for snrd)
FROM alpine:3.17
LABEL org.opencontainers.image.title="Sonr Daemon"
LABEL org.opencontainers.image.source="https://github.com/sonr-io/sonr"
# Copy binary from build stage
COPY --from=builder /code/build/snrd /usr/bin
COPY --from=builder /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
COPY --from=builder /code/scripts/test_node.sh /usr/bin/testnet
RUN chmod +x /usr/bin/testnet
# Set up dependencies
ENV PACKAGES="curl make bash jq sed"
# Install minimum necessary dependencies
RUN apk add --no-cache $PACKAGES
WORKDIR /opt
# rest server, tendermint p2p, tendermint rpc
EXPOSE 1317 26656 26657 6060
ENTRYPOINT ["/usr/bin/sonrd"]
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+372 -229
View File
@@ -1,19 +1,34 @@
#!/usr/bin/make -f
# Default target - show help when no target specified
.DEFAULT_GOAL := help
PACKAGE_NAME := github.com/sonr-io/sonr
GORELEASER_VERSION ?= latest
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
GOLANGCI_VERSION := v1.62.2
LEDGER_ENABLED ?= true
SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
BINDIR ?= $(GOPATH)/bin
SIMAPP = ./app
GIT_ROOT := $(shell git rev-parse --show-toplevel)
# for dockerized protobuf tools
DOCKER := $(shell which docker)
HTTPS_GIT := github.com/onsonr/sonr.git
# Git configuration
HTTPS_GIT := github.com/sonr-io/sonr.git
export GO111MODULE = on
# don't override user values
ifeq (,$(VERSION))
VERSION := $(shell git describe --tags --always)
# if VERSION is empty, then populate it with branch's name and raw commit hash
ifeq (,$(VERSION))
VERSION := $(BRANCH)-$(COMMIT)
endif
endif
# process build tags
build_tags = netgo
@@ -52,11 +67,16 @@ comma := ,
build_tags_comma_sep := $(subst $(empty),$(comma),$(build_tags))
# process linker flags
# flags '-s -w' resolves an issue with xcode 16 and signing of go binaries
# ref: https://github.com/golang/go/issues/63997
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sonr \
-X github.com/cosmos/cosmos-sdk/version.AppName=sonrd \
-X github.com/cosmos/cosmos-sdk/version.AppName=snrd \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-checklinkname=0 \
-s -w
ifeq ($(WITH_CLEVELDB),yes)
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
@@ -69,281 +89,404 @@ ldflags := $(strip $(ldflags))
BUILD_FLAGS := -tags "$(build_tags_comma_sep)" -ldflags '$(ldflags)' -trimpath
# The below include contains the tools and runsim targets.
include contrib/devtools/Makefile
all: install lint test
all: help
build: go.sum
ifeq ($(OS),Windows_NT)
$(error wasmd server not supported. Use "make build-windows-client" for client)
exit 1
else
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
endif
start: docker
@gum log --level info "Starting all services..."
@devbox services up
build-windows-client: go.sum
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd
build-contract-tests-hooks:
ifeq ($(OS),Windows_NT)
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests.exe ./cmd/contract_tests
else
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests ./cmd/contract_tests
endif
install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motrd
stop:
@gum log --level info "Stopping all services..."
@devbox services stop
@$(MAKE) clean-docker
########################################
### Tools & dependencies
########################################
format: go-format ts-format
go-format:
@gum log --level info "Formatting Go code with gofumpt and goimports..."
@if command -v gofumpt > /dev/null; then \
gofumpt -w .; \
else \
go run -mod=readonly mvdan.cc/gofumpt@latest -w .; \
fi
@if command -v goimports > /dev/null; then \
goimports -w .; \
else \
go run -mod=readonly golang.org/x/tools/cmd/goimports@latest -w .; \
fi
@gum log --level info "✅ Code formatted"
ts-format:
@gum log --level info "Formatting all web applications..."
@pnpm biome format --config-path=$(PWD)/biome.json .
lint: go-lint ts-lint
go-lint:
@gum log --level info "Running golangci-lint..."
@if command -v golangci-lint > /dev/null; then \
golangci-lint run --timeout=10m; \
else \
docker run --rm -v $$(pwd):/app -w /app \
-v ~/.cache/golangci-lint:/root/.cache/golangci-lint \
golangci/golangci-lint:$(GOLANGCI_VERSION) \
golangci-lint run --timeout=10m; \
fi
ts-lint:
@gum log --level info "Running Biome linter with auto-fix for TypeScript projects..."
@pnpm biome lint --config-path=./biome.json --write .
.PHONY: lint go-lint ts-lint format
go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@gum log --level info "Download go modules to local cache"
@go mod download
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@gum log --level info "Ensure dependencies have not been modified"
@go mod tidy
@go mod verify
pnpm-install:
@gum log --level info "Installing pnpm dependencies"
@pnpm install
draw-deps:
@# requires brew install graphviz or apt-get install graphviz
go install github.com/RobotsAndPencils/goviz@latest
@goviz -i ./cmd/sonrd -d 2 | dot -Tpng -o dependency-graph.png
@goviz -i ./cmd/snrd -d 2 | dot -Tpng -o .github/assets/dependency-graph.png
clean:
rm -rf snapcraft-local.yaml build/
distclean: clean
rm -rf vendor/
tidy:
@go mod tidy
@make -C client tidy
@make -C crypto tidy
@make -C cmd/hway tidy
@make -C cmd/motr tidy
@make -C cmd/vault tidy
clean: tidy
@gum log --level info "Cleaning build artifacts..."
rm -rf snapcraft-local.yaml build/ dist/
@$(MAKE) -C cmd/snrd clean
@$(MAKE) -C cmd/hway clean
@$(MAKE) -C cmd/vault clean
@$(MAKE) -C cmd/motr clean
clean-docker:
@gum log --level info "Removing all Docker volumes and networks..."
@rm -rf .logs
@docker compose down -v
@docker network prune -f
@docker volume prune -f
###############################################################################
### Build Targets ###
###############################################################################
install: go.sum
@$(MAKE) -C cmd/snrd install LEDGER_ENABLED=$(LEDGER_ENABLED) WITH_CLEVELDB=$(WITH_CLEVELDB) LINK_STATICALLY=$(LINK_STATICALLY) BUILD_TAGS="$(BUILD_TAGS)"
build: go.sum
@$(MAKE) -C cmd/snrd build LEDGER_ENABLED=$(LEDGER_ENABLED) WITH_CLEVELDB=$(WITH_CLEVELDB) LINK_STATICALLY=$(LINK_STATICALLY) BUILD_TAGS="$(BUILD_TAGS)"
build-snrd: build
build-client: go.sum build-vault build-motr
@$(MAKE) -C client build
@cd /tmp && go mod init test || true
@cd /tmp && go get github.com/sonr-io/sonr/client@main || true
@cd /tmp && gum log --level info "Client SDK import successful"
build-hway: go.sum build-vault build-motr
@$(MAKE) -C cmd/hway build
build-vault:
@$(MAKE) -C cmd/vault build
build-motr: ## Build Motor WASM service worker
@$(MAKE) -C cmd/motr build
# Build all components in parallel
build-all: go.sum
@gum log --level info "Building all components in parallel..."
@$(MAKE) -j5 build build-hway build-client build-motr build-vault
@gum log --level info "✅ All components built successfully"
.PHONY: install build build-client build-hway build-snrd build-vault build-motr build-all
########################################
### Testing
### Docker & Services
########################################
docker:
@gum log --level info "Building Docker images..."
@bash scripts/containers.sh build-all
localnet: ## Cross-platform localnet (auto-detects best method for your system)
@bash scripts/cross_platform_localnet.sh
dockernet:
@gum log --level info "Starting network with Docker in detached mode..."
@docker stop sonr-testnode 2>/dev/null || true
@docker rm sonr-testnode 2>/dev/null || true
@sleep 3
@CHAIN_ID="sonrtest_1-1" BLOCK_TIME="1000ms" CLEAN=true FORCE_DOCKER=true DOCKER_DETACHED=true bash scripts/test_node.sh
.PHONY: docker localnet dockernet
########################################
### Prepare Scripts - AI & Release Automation
########################################
# Smart component release detection and automation
release:
@$(MAKE) -C cmd/hway release
@$(MAKE) -C cmd/motr release
@$(MAKE) -C cmd/snrd release
@$(MAKE) -C cmd/vault release
# Snapshot builds for development
snapshot:
@gum log --level info "📦 Preparing component snapshot..."
@$(MAKE) -C cmd/vault snapshot
@$(MAKE) -C cmd/motr snapshot
@$(MAKE) -C cmd/snrd snapshot
@$(MAKE) -C cmd/hway snapshot
.PHONY: release snapshot
########################################
### Testing - Simplified
########################################
# Main test targets
test: test-unit
test-all: test-race test-cover test-system
test-all: test-race test-cover
test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock test' ./...
test-race:
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock test' ./...
test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock test' ./...
benchmark:
test-e2e:
@gum log --level info "Running basic e2e tests"
@cd test/e2e && go test -race -v -run TestBasic ./tests/basic
test-e2e-all:
@gum log --level info "Running all e2e tests"
@cd test/e2e && go test -race -v ./tests/...
test-build-snrd: build
@ls -la build/snrd
@chmod +x build/snrd
@./build/snrd version
test-build-hway: build-hway
@ls -la build/hway
test-tdd:
go test -json ./... 2>&1 | tdd-guard-go -project-root ${GIT_ROOT}
test-app:
@VERSION=$(VERSION) go test -C . -mod=readonly -tags='ledger test_ledger_mock test' github.com/sonr-io/sonr/app/... github.com/sonr-io/sonr/x/... github.com/sonr-io/sonr/types/... github.com/sonr-io/sonr/internal/...
test-devops:
@echo "No devops tests"
test-client:
@$(MAKE) -C cmd/vault build
@$(MAKE) -C client test
test-crypto:
@$(MAKE) -C crypto test
test-dwn-ci:
@$(MAKE) -C cmd/vault build
@go test -mod=readonly -tags='ledger test_ledger_mock test' -run='!IPFS' ./x/dwn/...
test-internal:
@$(MAKE) -C cmd/vault build
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock test' ./internal/...
# Module testing - Simplified
# MODULE=did|dwn|svc VARIANT=unit|race|cover|bench
test-module:
@if [ -z "$(MODULE)" ]; then \
gum log --level info "Testing all modules..."; \
$(MAKE) test-module MODULE=did; \
$(MAKE) test-module MODULE=dwn; \
$(MAKE) test-module MODULE=svc; \
else \
if [ "$(VARIANT)" = "cover" ]; then \
gum log --level info "Testing x/$(MODULE) with coverage..."; \
go test -mod=readonly -timeout 30m -race -coverprofile=x/$(MODULE)/coverage.txt -covermode=atomic -tags='ledger test_ledger_mock test' ./x/$(MODULE)/...; \
elif [ "$(VARIANT)" = "race" ]; then \
gum log --level info "Testing x/$(MODULE) with race detector..."; \
VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock test' ./x/$(MODULE)/...; \
elif [ "$(VARIANT)" = "bench" ]; then \
gum log --level info "Running x/$(MODULE) benchmarks..."; \
go test -mod=readonly -bench=. ./x/$(MODULE)/...; \
else \
gum log --level info "Testing x/$(MODULE) module..."; \
VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock test' ./x/$(MODULE)/...; \
fi \
fi
# Specialized tests
test-hway:
@gum log --level info "Testing Highway service..."
@VERSION=$(VERSION) go test -C . -mod=readonly -v github.com/sonr-io/sonr/bridge/...
test-proto:
@$(MAKE) -C proto lint
@$(MAKE) -C proto check-breaking
test-motr:
@gum log --level info "Testing Motor WASM service worker..."
@$(MAKE) -C cmd/motr test
test-vault:
@gum log --level info "Testing Vault WASM plugin..."
@$(MAKE) -C cmd/vault test
test-benchmark:
@go test -mod=readonly -bench=. ./...
test-sim-import-export: runsim
@echo "Running application import/export simulation. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport
test-sim-multi-seed-short: runsim
@echo "Running short multi-seed application simulation. This may take awhile!"
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestFullAppSimulation
test-sim-deterministic: runsim
@echo "Running application deterministic simulation. This may take awhile!"
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppStateDeterminism
test-system: install
$(MAKE) -C tests/system/ test
###############################################################################
### Linting ###
###############################################################################
format-tools:
go install mvdan.cc/gofumpt@v0.4.0
go install github.com/client9/misspell/cmd/misspell@v0.3.4
go install github.com/daixiang0/gci@v0.11.2
lint: format-tools
golangci-lint run --tests=false
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofumpt -d
format: format-tools
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofumpt -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gci write --skip-generated -s standard -s default -s "prefix(cosmossdk.io)" -s "prefix(github.com/cosmos/cosmos-sdk)" -s "prefix(github.com/CosmWasm/wasmd)" --custom-order
mod-tidy:
go mod tidy
cd interchaintest && go mod tidy
.PHONY: format-tools lint format mod-tidy
.PHONY: test test-all test-unit test-race test-cover test-tdd test-module test-hway test-motr test-vault test-benchmark
###############################################################################
### Protobuf ###
###############################################################################
protoVer=0.13.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
proto-all: proto-format proto-lint proto-gen format
climd-gen:
@gum log --level info "Generating MD Docs from snrd CLI..."
@sh ./scripts/cli-docgen.sh
proto-gen:
@echo "Generating Protobuf files"
@go install cosmossdk.io/orm/cmd/protoc-gen-go-cosmos-orm@latest
@$(protoImage) sh ./scripts/protocgen.sh
# generate the stubs for the proto files from the proto directory
spawn stub-gen
@gum log --level info "Generating Go protobuf files..."
@$(MAKE) -C proto gen
@gum log --level info "Generating TypeScript protobuf files..."
@if [ -d "packages/es" ]; then \
cd packages/es && pnpm gen:protobufs || { gum log --level error "TypeScript protobuf generation failed"; exit 1; }; \
else \
gum log --level warn "Skipping TypeScript generation: packages/es not found"; \
fi
@gum log --level info "Auto-formatting generated protobuf files..."
@$(MAKE) format
proto-format:
@echo "Formatting Protobuf files"
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
swagger-gen:
@$(MAKE) -C proto swagger-gen
@gum log --level info "Moving and renaming generated files..."
@find docs/static/openapi -type f \( -name "query.swagger.yaml" -o -name "tx.swagger.yaml" \) | while read -r filepath; do \
\
parent_dir=$$(dirname "$$filepath"); \
grandparent_dir=$$(dirname "$$parent_dir"); \
module=$$(basename "$$grandparent_dir"); \
filename=$$(basename "$$filepath"); \
\
new_filename="$$module.$$filename"; \
destination="docs/static/openapi/$$new_filename"; \
\
gum log --level debug "Moving $$filepath to $$destination"; \
mv "$$filepath" "$$destination"; \
done
@gum log --level info "Cleaning up empty source directories..."
@find docs/static/openapi -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
@gum log --level info "Converting Swagger 2.0 to OpenAPI 3.0..."
@pnpm run convert-swagger
@gum log --level info "✅ API documentation processing complete."
proto-lint:
@$(protoImage) buf lint --error-format=json
templ-gen:
@docker run --rm -v `pwd`:/code -w=/code --user $(shell id -u):$(shell id -g) ghcr.io/a-h/templ:latest generate
proto-check-breaking:
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=master
.PHONY: all install install-debug \
go-mod-cache draw-deps clean build format \
test test-all test-build test-cover test-unit test-race \
test-sim-import-export build-windows-client \
test-system
## --- Testnet Utilities ---
get-localic:
@echo "Installing local-interchain"
git clone --branch v8.7.0 https://github.com/strangelove-ventures/interchaintest.git interchaintest-downloader
cd interchaintest-downloader/local-interchain && make install
@echo ✅ local-interchain installed $(shell which local-ic)
is-localic-installed:
ifeq (,$(shell which local-ic))
make get-localic
endif
get-heighliner:
git clone https://github.com/strangelove-ventures/heighliner.git
cd heighliner && go install
local-image:
ifeq (,$(shell which heighliner))
echo 'heighliner' binary not found. Consider running `make get-heighliner`
else
heighliner build -c sonrd --local -f chains.yaml
endif
.PHONY: get-heighliner local-image is-localic-installed
.PHONY: proto-gen proto-swagger-gen swagger-gen proto-lint proto-check-breaking proto-publish
###############################################################################
### e2e ###
### Network Operations ###
###############################################################################
ictest-basic:
@echo "Running basic interchain tests"
@cd interchaintest && go test -race -v -run TestBasicChain .
# Starship network management
testnet: testnet-restart
ictest-ibc:
@echo "Running IBC interchain tests"
@cd interchaintest && go test -race -v -run TestIBC .
testnet-restart: testnet-stop testnet-start
@gum log --level info "✅ Starship network restarted"
ictest-wasm:
@echo "Running cosmwasm interchain tests"
@cd interchaintest && go test -race -v -run TestCosmWasmIntegration .
testnet-start:
@gum log --level info "Starting Starship network..."
@if [ -z "$(NETWORK)" ]; then \
NETWORK=devnet; \
fi; \
bash scripts/run.sh $$NETWORK
ictest-packetforward:
@echo "Running packet forward middleware interchain tests"
@cd interchaintest && go test -race -v -run TestPacketForwardMiddleware .
testnet-stop:
@gum log --level info "Stopping Starship network..."
@helm delete -n ci sonr-testnet 2>/dev/null || true
@kubectl delete namespace ci --ignore-not-found=true 2>/dev/null || true
@sleep 2
ictest-poa:
@echo "Running proof of authority interchain tests"
@cd interchaintest && go test -race -v -run TestPOA .
ictest-tokenfactory:
@echo "Running token factory interchain tests"
@cd interchaintest && go test -race -v -run TestTokenFactory .
.PHONY: testnet testnet-restart testnet-start testnet-stop
###############################################################################
### testnet ###
### Help ###
###############################################################################
setup-testnet: mod-tidy is-localic-installed install local-image set-testnet-configs setup-testnet-keys
# Run this before testnet keys are added
# chainid-1 is used in the testnet.json
set-testnet-configs:
sonrd config set client chain-id sonr-testnet-1
sonrd config set client keyring-backend test
sonrd config set client output text
# import keys from testnet.json into test keyring
setup-testnet-keys:
-`echo "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | sonrd keys add acc0 --recover`
-`echo "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" | sonrd keys add acc1 --recover`
# default testnet is with IBC
testnet: setup-testnet
spawn local-ic start ibc-testnet
testnet-basic: setup-testnet
spawn local-ic start testnet
sh-testnet: mod-tidy
CHAIN_ID="sonr-testnet-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh
.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet
###############################################################################
### templ & vault ###
###############################################################################
.PHONY: dwn motr templ pkl nebula
motr:
@echo "(motr) Building motr gateway"
go build -o ./build/motrd ./cmd/motrd
dwn:
@echo "(dwn) Building dwn.wasm -> IPFS Vault"
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/dwn/dwn.go
templ:
@echo "(templ) Generating templ files"
go install github.com/a-h/templ/cmd/templ@latest
templ generate
nebula:
@echo "(nebula) Building nebula"
cd pkg/nebula && bun run build
pkl:
@echo "(pkl) Building PKL"
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/dwn.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl
start-caddy:
@echo "(start-caddy) Starting caddy"
./build/caddy run --config ./config/caddy/Caddyfile
start-motr: motr
@echo "(start-proxy) Starting proxy server"
./build/motrd proxy
###############################################################################
### help ###
###############################################################################
help:
@echo "Usage: make <target>"
@echo ""
@echo "Available targets:"
@echo " install : Install the binary"
@echo " local-image : Install the docker image"
@echo " proto-gen : Generate code from proto files"
@echo " testnet : Local devnet with IBC"
@echo " sh-testnet : Shell local devnet"
@echo " ictest-basic : Basic end-to-end test"
@echo " ictest-ibc : IBC end-to-end test"
@echo " templ : Generate templ files"
@echo " vault : Build vault.wasm"
@gum log --level info "Sonr Blockchain Makefile"
@gum log --level info "========================"
@gum log --level info ""
@gum log --level info "🛠️ Build & Install:"
@gum log --level info " install Install snrd binary"
@gum log --level info " build Build snrd binary with vault WASM"
@gum log --level info " build-all Build all components in parallel"
@gum log --level info " build-hway Build Highway service"
@gum log --level info " build-vault Build vault WASM module"
@gum log --level info " build-motr Build Motor WASM service worker"
@gum log --level info " build-client Build client SDK"
@gum log --level info " docker Build Docker images"
@gum log --level info ""
@gum log --level info "🚀 Local Development:"
@gum log --level info " localnet Start single-node testnet"
@gum log --level info " start Start backend services"
@gum log --level info " stop Stop backend services"
@gum log --level info " status Check service health"
@gum log --level info " testnet Manage Starship network (start/stop/restart)"
@gum log --level info ""
@gum log --level info "📦 Code Generation:"
@gum log --level info " proto-gen Generate protobuf code"
@gum log --level info " swagger-gen Generate OpenAPI docs"
@gum log --level info ""
@gum log --level info "🔧 Development Tools:"
@gum log --level info " format Format code (Go + TypeScript)"
@gum log --level info " lint Run all linters"
@gum log --level info " clean Remove build artifacts"
@gum log --level info ""
@gum log --level info "🧪 Testing:"
@gum log --level info " benchmark Run benchmarks"
@gum log --level info " test Run unit tests"
@gum log --level info " test-all Run all test variants"
@gum log --level info " test-cover Generate coverage report"
@gum log --level info " test-e2e Run e2e tests"
@gum log --level info " test-e2e-all Run all e2e tests"
@gum log --level info " test-module Test specific module (MODULE=did|dwn|svc)"
@gum log --level info " test-packages Test all packages (lint + build)"
@gum log --level info " test-ipfs Test vault with IPFS export/import"
@gum log --level info " test-vault Test vault operations"
@gum log --level info " test-web Test all web apps (lint + build)"
@gum log --level info ""
@gum log --level info "📚 Module Testing Examples:"
@gum log --level info " make test-module MODULE=did # Test DID module"
@gum log --level info " make test-module MODULE=dwn VARIANT=cover # DWN with coverage"
@gum log --level info " make test-module MODULE=svc VARIANT=race # SVC with race detector"
@gum log --level info " make test-module MODULE=did VARIANT=bench # DID benchmarks"
@gum log --level info ""
@gum log --level info "For more detailed options, see the Makefile source."
.PHONY: help
.PHONY: help release release-platform snapshot snapshot-platform
+497 -34
View File
@@ -1,52 +1,515 @@
<div align="center" style="text-align: center;">
# `sonr` - Sonr Chain
[![Go Reference](https://pkg.go.dev/badge/github.com/onsonr/sonr.svg)](https://pkg.go.dev/github.com/onsonr/sonr)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/onsonr/sonr)
![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/onsonr/sonr)
[![Go Reference](https://pkg.go.dev/badge/github.com/sonr-io/sonr.svg)](https://pkg.go.dev/github.com/sonr-io/sonr)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/sonr-io/sonr)
[![Static Badge](https://img.shields.io/badge/homepage-sonr.io-blue?style=flat-square)](https://sonr.io)
[![Go Report Card](https://goreportcard.com/badge/github.com/sonr-io/sonr)](https://goreportcard.com/report/github.com/sonr-io/sonr)
[![Go Report Card](https://goreportcard.com/badge/github.com/onsonr/sonr)](https://goreportcard.com/report/github.com/onsonr/sonr)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=sonrhq_sonr&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
[![Sonr](.github/banner.png)](https://sonr.io)
</div>
<br />
> **Sonr is a blockchain ecosystem combining decentralized identity, secure data storage, and multi-chain interoperability. Built on Cosmos SDK v0.50.14, it provides users with self-sovereign identity through W3C DIDs, WebAuthn authentication, and personal data vaults—all without requiring cryptocurrency for onboarding.**
Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity.
## 💡 Key Features
<br />
### 🔐 Gasless Onboarding
## Components
Create your first decentralized identity without owning cryptocurrency:
### `sonrd`
```bash
# Register with WebAuthn (no tokens required!)
snrd auth register --username alice
The main blockchain node that runs the `sonr` chain. It is responsible for maintaining the state of the chain, including IPFS based vaults, and did documents.
# Register with automatic vault creation
snrd auth register --username bob --auto-vault
```
### `vault`
### 🌐 Multi-Chain Support
The `vault` is a wasm module that is compiled and deployed to IPFS on behalf of the user. It is responsible for storing and retrieving encrypted data.
- **Cosmos SDK**: Native integration with IBC ecosystem
- **EVM Compatibility**: Ethereum smart contract support
- **External Wallets**: MetaMask, Keplr, and more
- SQLite Database backend
- Encryption via admonition
- Authentication via webauthn
- Authorization via Macroons
- HTTP API
### 🔑 Advanced Authentication
## Acknowledgements
- **WebAuthn/Passkeys**: Biometric authentication
- **Hardware Security Keys**: YubiKey, Titan Key support
- **Multi-Signature**: Multiple verification methods per DID
Sonr would not have been possible without the direct and indirect support of the following individuals:
### 📦 Decentralized Storage
- **Juan Benet**: For the IPFS Ecosystem.
- **Satoshi Nakamoto**: For Bitcoin.
- **Steve Jobs**: For User first UX.
- **Tim Berners-Lee**: For the Internet.
- **IPFS Integration**: Distributed file storage
- **Encrypted Vaults**: Hardware-backed encryption
- **Protocol Schemas**: Structured data validation
<br />
## 📚 Technical Specifications
## Community & Support
- **Cosmos SDK**: v0.50.14
- **CometBFT**: v0.38.17
- **IBC**: v8.7.0
- **Go**: 1.24.1 (toolchain 1.24.4)
- **WebAssembly**: CosmWasm v1.5.8
- **Task Queue**: Asynq (Redis-based)
- **Actor System**: Proto.Actor
- **Storage**: IPFS, LevelDB
- [Forum](https://github.com/onsonr/sonr/discussions)
- [Issues](https://github.com/onsonr/sonr/issues)
- [Twitter](https://sonr.io/twitter)
- [Dev Chat](https://sonr.io/discord)
## 🔒 Security
### Gasless Transaction Security
- Limited to WebAuthn registration only
- Full cryptographic validation required
- Credential uniqueness enforcement
- Anti-replay protection
### WebAuthn Security
- Origin validation
- Challenge-response authentication
- Device binding
- Attestation verification
### Multi-Algorithm Support
- Ed25519 (quantum-resistant)
- ECDSA (secp256k1, P-256)
- RSA (2048, 3072, 4096 bits)
- WebAuthn (ES256, RS256)
## 🚀 Quick Start
### Installation
```bash
# Clone the repository
git clone https://github.com/sonr-io/sonr
cd sonr
# Install the binary
make install
# Verify installation
snrd version
```
### Running a Local Node
```bash
# Start single-node testnet (quick iteration)
make localnet
# Start multi-node testnet with Starship
make testnet-start
# Stop testnet
make testnet-stop
```
### Building from Source
```bash
# Build all binaries
make build # snrd blockchain node
make build-hway # Highway service
make build-vault # Vault WASM plugin
# Build Docker image
make docker
# Generate code from proto files
make proto-gen
```
### Local Development Network
```bash
# Standard localnet (auto-detects best method for your system)
make localnet # Works on Arch Linux, Ubuntu, macOS, etc.
# Docker-based localnet (requires Docker)
make dockernet # Runs in detached mode
# One-time setup for your system (optional)
./scripts/setup_localnet.sh # Installs dependencies and configures environment
```
### Testing
```bash
# Run all tests
make test-all
# Module-specific tests
make test-did # DID module tests
make test-dwn # DWN module tests
make test-svc # Service module tests
# E2E tests
make ictest-basic # Basic chain functionality
make ictest-ibc # IBC transfers
make ictest-wasm # CosmWasm integration
# Test with coverage
make test-cover
```
### Infrastructure
```bash
# IPFS for vault operations
make ipfs-up # Start IPFS infrastructure
make ipfs-down # Stop IPFS infrastructure
make ipfs-status # Check IPFS connectivity
```
## 🏗️ Architecture
Sonr consists of three primary components and three custom modules:
### Service Architecture
```
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Caddy │────▶│ snrd │ │ IPFS │
└─────────┘ └─────────┘ └─────────┘
│ │ │
│ ▼ ▼
│ ┌─────────┐ ┌─────────┐
└─────────▶│ Highway │────▶│ Redis │
└─────────┘ └─────────┘
```
- **Caddy**: Reverse proxy with gRPC-Web support (port 80)
- **Redis**: Task queue backend for Highway (port 6379)
- **Highway**: UCAN-based task processor (port 8090)
- **IPFS**: Distributed storage (API: 5001, Gateway: 8080)
- **snrd**: Blockchain node (gRPC: 9090, REST: 1317)
### Cross-Platform Support
The `localnet` target now automatically detects and uses the best available method:
1. Checks for local binary (built with `make install`)
2. Falls back to Docker if available
3. Handles permission issues on systems like Arch Linux
4. Supports systemd service installation (see `etc/systemd/`)
### Core Components
#### 1. **Blockchain Node (`snrd`)**
The main blockchain daemon built with Cosmos SDK v0.50.14, providing:
- AutoCLI for command generation
- EVM compatibility via Evmos integration
- IBC for cross-chain communication
- CosmWasm smart contract support
#### 2. **Highway Service (`hway`)**
An Asynq-based task processing service for vault operations:
- Redis-backed job queue with priority levels
- Actor-based concurrency using Proto.Actor framework
- Processes cryptographic operations through WebAssembly enclaves
#### 3. **Motor Plugin (`motr`)**
WebAssembly-based vault system providing:
- Secure execution environment for sensitive operations
- Hardware-backed key management
- Multi-party computation capabilities
## 📖 Module Documentation
### DID Module
W3C DID specification implementation with:
- **Gasless WebAuthn Registration**: Create DIDs without cryptocurrency
- **Multi-Algorithm Signatures**: Ed25519, ECDSA, RSA, WebAuthn
- **External Wallet Linking**: MetaMask, Keplr integration
- **Verifiable Credentials**: W3C-compliant credential issuance
```bash
# Create a DID
snrd tx did create-did did:sonr:alice '{"id":"did:sonr:alice",...}' --from alice
# Link external wallet
snrd tx did link-external-wallet did:sonr:alice \
--wallet-address 0x742d35Cc6635C0532925a3b8c17C6e583F4d6A42 \
--wallet-type ethereum \
--from alice
# Query DID
snrd query did resolve did:sonr:alice
```
[Full DID Module Documentation](x/did/README.md)
### DWN Module
Personal data stores with:
- **Structured Data Records**: Hierarchical data organization
- **Protocol-Based Interactions**: Enforceable data schemas
- **Secure Vaults**: Enclave-based key management
- **Multi-Chain Support**: Cosmos SDK and EVM transaction building
```bash
# Create a vault
snrd tx dwn create-vault --from alice
# Store a record
snrd tx dwn write-record '{"data":"...", "protocol":"example.com"}' --from alice
# Query records
snrd query dwn records --owner alice
```
[Full DWN Module Documentation](x/dwn/README.md)
### Service Module
Decentralized service registry featuring:
- **Domain Verification**: DNS-based ownership proof
- **Service Registration**: Verified service endpoints
- **Permission Management**: UCAN capability integration
```bash
# Verify domain ownership
snrd tx svc initiate-domain-verification example.com --from alice
snrd tx svc verify-domain example.com --from alice
# Register service
snrd tx svc register-service my-service example.com \
--permissions "read,write" --from alice
```
[Full Service Module Documentation](x/svc/README.md)
## 🔧 Configuration
### Environment Variables
Environment variables can be configured via Docker Compose:
```bash
# Chain configuration
export CHAIN_ID="localchain_9000-1"
export BLOCK_TIME="1000ms"
# Network selection for Starship
export NETWORK="devnet" # or "testnet"
# Redis configuration
REDIS_URL=redis://redis:6379
REDIS_DB=0
# Highway service
HIGHWAY_PORT=8090
LOG_LEVEL=debug
# IPFS configuration
IPFS_API_URL=http://ipfs:5001
# Caddy configuration
CADDY_DOMAIN=localhost
```
Environment variables can be set directly or via a `.env` file in the project root.
### Docker Compose Services
The project includes a comprehensive Docker Compose setup for running all backend services:
```bash
# Start all services (Redis, Highway, Caddy, IPFS)
make docker-up
# Stop all services
make docker-down
# View service logs
make docker-logs # All services
make docker-logs-redis # Specific service
# Check service health
make docker-status
# Clean up Docker resources
make docker-clean
```
### Starship Configuration
Edit `starship.yml` to configure multi-node testnets:
```yaml
chains:
- id: sonrtest_1-1
name: custom
numValidators: 3
image: onsonr/snrd:latest
# ... additional configuration
```
#### Troubleshooting
**Services not starting:**
```bash
# Check service status
make docker-status
# View detailed logs
make docker-logs
# Ensure Docker network exists
docker network ls | grep sonr-network
```
**Redis connection issues:**
```bash
# Test Redis connectivity
docker exec redis redis-cli ping
# Check Redis logs
make docker-logs-redis
```
**IPFS not accessible:**
```bash
# Verify IPFS is running
curl http://127.0.0.1:5001/api/v0/version
# Check IPFS logs
docker compose -f etc/stack/compose.yml logs ipfs
```
**Port conflicts:**
- Caddy: 80 (HTTP)
- Redis: 6379
- Highway: 8090
- IPFS API: 5001
- IPFS Gateway: 8080
Stop conflicting services or modify ports in `etc/stack/compose.yml`.
## 🏗️ Project Structure
Sonr uses a modern monorepo architecture with pnpm workspaces for JavaScript/TypeScript packages alongside the Go blockchain implementation:
### Workspace Organization
```
sonr/
├── app/ # Application setup and module wiring
├── cmd/ # Binary entry points
│ ├── snrd/ # Blockchain node
│ ├── hway/ # Highway service
│ └── motr/ # Motor WASM plugin
├── x/ # Custom chain modules
│ ├── did/ # W3C DID implementation
│ ├── dwn/ # Decentralized Web Nodes
│ └── svc/ # Service management
├── types/ # Internal packages
│ ├── coins/ # Task processing
│ └── ipfs/ # Authorization networks
├── proto/ # Protobuf definitions
├── scripts/ # Utility scripts
├── test/ # Integration tests
├── docs/ # Documentation site
# Monorepo Packages (pnpm workspaces)
├── packages/ # Core JavaScript/TypeScript packages
│ ├── es/ # @sonr.io/es - ES client library
│ ├── sdk/ # @sonr.io/sdk - SDK package
│ └── ui/ # @sonr.io/ui - Shared UI components
├── cli/ # CLI tools
│ ├── install/ # @sonr.io/install - Installation CLI
│ └── join-testnet/# @sonr.io/join-testnet - Testnet CLI
└── web/ # Web applications
├── auth/ # Authentication app (Next.js)
└── dash/ # Dashboard app (Next.js)
```
### Working with the Monorepo
#### Installation
```bash
# Install all dependencies for the monorepo
pnpm install
# Build all packages
pnpm build
# Run development mode for all packages
pnpm dev
```
#### Package Management
```bash
# Run commands in specific packages
pnpm --filter @sonr.io/es build
pnpm --filter @sonr.io/sdk test
# Add dependencies to specific packages
pnpm --filter @sonr.io/ui add react
# Run commands in all packages
pnpm -r build # Build all packages
pnpm -r test # Test all packages
```
#### Versioning & Publishing
The monorepo uses [Changesets](https://github.com/changesets/changesets) for package versioning:
```bash
# Add a changeset for your changes
pnpm changeset
# Version packages based on changesets
pnpm changeset version
# Publish packages to npm
pnpm changeset publish
```
### Key Technologies
- **pnpm workspaces**: Efficient dependency management with single lockfile
- **TypeScript project references**: Incremental builds and better IDE performance
- **Turbo**: Build orchestration and caching for faster builds
- **Changesets**: Automated versioning and changelog generation
- **Biome**: Fast, unified linting and formatting (replaces ESLint/Prettier)
### Package Dependencies
- `@sonr.io/es`: Core ES client library with protobuf types
- `@sonr.io/sdk`: High-level SDK (depends on @sonr.io/es)
- `@sonr.io/ui`: Shared UI components for web applications
- `@sonr.io/install`: CLI tool for installing Sonr
- `@sonr.io/join-testnet`: CLI tool for joining testnet
- Web apps use all three core packages (@sonr.io/es, @sonr.io/sdk, @sonr.io/ui)
## 🤝 Community & Support
- [GitHub Discussions](https://github.com/sonr-io/sonr/discussions) - Community forum
- [GitHub Issues](https://github.com/sonr-io/sonr/issues) - Bug reports and feature requests
- [Twitter](https://sonr.io/twitter) - Latest updates
- [Documentation Wiki](https://github.com/sonr-io/sonr/wiki) - Detailed guides
## 📄 License
Copyright © 2024 Sonr, Inc.
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
---
<p align="center">
Built with ❤️ by the Sonr team
</p>
@@ -2,15 +2,16 @@
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
io "io"
reflect "reflect"
sync "sync"
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
@@ -18,8 +19,8 @@ var (
)
func init() {
file_vault_module_v1_module_proto_init()
md_Module = File_vault_module_v1_module_proto.Messages().ByName("Module")
file_dex_module_v1_module_proto_init()
md_Module = File_dex_module_v1_module_proto.Messages().ByName("Module")
}
var _ protoreflect.Message = (*fastReflection_Module)(nil)
@@ -31,7 +32,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
}
func (x *Module) slowProtoReflect() protoreflect.Message {
mi := &file_vault_module_v1_module_proto_msgTypes[0]
mi := &file_dex_module_v1_module_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -104,9 +105,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -120,9 +121,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -136,9 +137,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", descriptor.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", descriptor.FullName()))
}
}
@@ -156,9 +157,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -176,9 +177,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -189,9 +190,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dex.module.v1.Module"))
}
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dex.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -201,7 +202,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in vault.module.v1.Module", d.FullName()))
panic(fmt.Errorf("%s is not a oneof field in dex.module.v1.Module", d.FullName()))
}
panic("unreachable")
}
@@ -373,7 +374,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: vault/module/v1/module.proto
// source: dex/module/v1/module.proto
const (
// Verify that this generated code is sufficiently up-to-date.
@@ -393,7 +394,7 @@ type Module struct {
func (x *Module) Reset() {
*x = Module{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_module_v1_module_proto_msgTypes[0]
mi := &file_dex_module_v1_module_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -407,51 +408,50 @@ func (*Module) ProtoMessage() {}
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
func (*Module) Descriptor() ([]byte, []int) {
return file_vault_module_v1_module_proto_rawDescGZIP(), []int{0}
return file_dex_module_v1_module_proto_rawDescGZIP(), []int{0}
}
var File_vault_module_v1_module_proto protoreflect.FileDescriptor
var File_dex_module_v1_module_proto protoreflect.FileDescriptor
var file_vault_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a,
0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96,
0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xb5, 0x01, 0x0a, 0x13,
0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x4d, 0x58, 0xaa, 0x02, 0x0f,
0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca,
0x02, 0x0f, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56,
0x31, 0xe2, 0x02, 0x1b, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
0x02, 0x11, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_dex_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1a, 0x64, 0x65, 0x78, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x65,
0x78, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a,
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a,
0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xaa, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d,
0x2e, 0x64, 0x65, 0x78, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2d, 0x69,
0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x78, 0x2f, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x65, 0x78, 0x2e, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x65, 0x78, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x65, 0x78, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x44, 0x65, 0x78, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_vault_module_v1_module_proto_rawDescOnce sync.Once
file_vault_module_v1_module_proto_rawDescData = file_vault_module_v1_module_proto_rawDesc
file_dex_module_v1_module_proto_rawDescOnce sync.Once
file_dex_module_v1_module_proto_rawDescData = file_dex_module_v1_module_proto_rawDesc
)
func file_vault_module_v1_module_proto_rawDescGZIP() []byte {
file_vault_module_v1_module_proto_rawDescOnce.Do(func() {
file_vault_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_module_v1_module_proto_rawDescData)
func file_dex_module_v1_module_proto_rawDescGZIP() []byte {
file_dex_module_v1_module_proto_rawDescOnce.Do(func() {
file_dex_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_dex_module_v1_module_proto_rawDescData)
})
return file_vault_module_v1_module_proto_rawDescData
return file_dex_module_v1_module_proto_rawDescData
}
var file_vault_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_vault_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: vault.module.v1.Module
var file_dex_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_dex_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: dex.module.v1.Module
}
var file_vault_module_v1_module_proto_depIdxs = []int32{
var file_dex_module_v1_module_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
@@ -459,13 +459,13 @@ var file_vault_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_vault_module_v1_module_proto_init() }
func file_vault_module_v1_module_proto_init() {
if File_vault_module_v1_module_proto != nil {
func init() { file_dex_module_v1_module_proto_init() }
func file_dex_module_v1_module_proto_init() {
if File_dex_module_v1_module_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_vault_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_dex_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Module); i {
case 0:
return &v.state
@@ -482,18 +482,18 @@ func file_vault_module_v1_module_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_vault_module_v1_module_proto_rawDesc,
RawDescriptor: file_dex_module_v1_module_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_vault_module_v1_module_proto_goTypes,
DependencyIndexes: file_vault_module_v1_module_proto_depIdxs,
MessageInfos: file_vault_module_v1_module_proto_msgTypes,
GoTypes: file_dex_module_v1_module_proto_goTypes,
DependencyIndexes: file_dex_module_v1_module_proto_depIdxs,
MessageInfos: file_dex_module_v1_module_proto_msgTypes,
}.Build()
File_vault_module_v1_module_proto = out.File
file_vault_module_v1_module_proto_rawDesc = nil
file_vault_module_v1_module_proto_goTypes = nil
file_vault_module_v1_module_proto_depIdxs = nil
File_dex_module_v1_module_proto = out.File
file_dex_module_v1_module_proto_rawDesc = nil
file_dex_module_v1_module_proto_goTypes = nil
file_dex_module_v1_module_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+416
View File
@@ -0,0 +1,416 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: dex/v1/query.proto
package dexv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/dex.v1.Query/Params"
Query_Account_FullMethodName = "/dex.v1.Query/Account"
Query_Accounts_FullMethodName = "/dex.v1.Query/Accounts"
Query_Balance_FullMethodName = "/dex.v1.Query/Balance"
Query_Pool_FullMethodName = "/dex.v1.Query/Pool"
Query_Orders_FullMethodName = "/dex.v1.Query/Orders"
Query_History_FullMethodName = "/dex.v1.Query/History"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries the parameters of the module
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Account queries a DEX account by DID and connection
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error)
// Accounts queries all DEX accounts for a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
// Balance queries remote chain balance
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error)
// Pool queries pool information
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
// Orders queries orders for a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
// History queries transaction history
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
History(ctx context.Context, in *QueryHistoryRequest, opts ...grpc.CallOption) (*QueryHistoryResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*QueryAccountResponse, error) {
out := new(QueryAccountResponse)
err := c.cc.Invoke(ctx, Query_Account_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) {
out := new(QueryAccountsResponse)
err := c.cc.Invoke(ctx, Query_Accounts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) {
out := new(QueryBalanceResponse)
err := c.cc.Invoke(ctx, Query_Balance_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) {
out := new(QueryPoolResponse)
err := c.cc.Invoke(ctx, Query_Pool_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) {
out := new(QueryOrdersResponse)
err := c.cc.Invoke(ctx, Query_Orders_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) History(ctx context.Context, in *QueryHistoryRequest, opts ...grpc.CallOption) (*QueryHistoryResponse, error) {
out := new(QueryHistoryResponse)
err := c.cc.Invoke(ctx, Query_History_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries the parameters of the module
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Account queries a DEX account by DID and connection
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error)
// Accounts queries all DEX accounts for a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
// Balance queries remote chain balance
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
// Pool queries pool information
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error)
// Orders queries orders for a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
Orders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error)
// History queries transaction history
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_query_docs.md"}}
History(context.Context, *QueryHistoryRequest) (*QueryHistoryResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*QueryAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Account not implemented")
}
func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented")
}
func (UnimplementedQueryServer) Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented")
}
func (UnimplementedQueryServer) Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Pool not implemented")
}
func (UnimplementedQueryServer) Orders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Orders not implemented")
}
func (UnimplementedQueryServer) History(context.Context, *QueryHistoryRequest) (*QueryHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method History not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Account(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Account_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Accounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Accounts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryBalanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Balance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Balance_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryPoolRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Pool(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Pool_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Orders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryOrdersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Orders(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Orders_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Orders(ctx, req.(*QueryOrdersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_History_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).History(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_History_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).History(ctx, req.(*QueryHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dex.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "Account",
Handler: _Query_Account_Handler,
},
{
MethodName: "Accounts",
Handler: _Query_Accounts_Handler,
},
{
MethodName: "Balance",
Handler: _Query_Balance_Handler,
},
{
MethodName: "Pool",
Handler: _Query_Pool_Handler,
},
{
MethodName: "Orders",
Handler: _Query_Orders_Handler,
},
{
MethodName: "History",
Handler: _Query_History_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dex/v1/query.proto",
}
File diff suppressed because it is too large Load Diff
+367
View File
@@ -0,0 +1,367 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: dex/v1/tx.proto
package dexv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Msg_RegisterDEXAccount_FullMethodName = "/dex.v1.Msg/RegisterDEXAccount"
Msg_ExecuteSwap_FullMethodName = "/dex.v1.Msg/ExecuteSwap"
Msg_ProvideLiquidity_FullMethodName = "/dex.v1.Msg/ProvideLiquidity"
Msg_RemoveLiquidity_FullMethodName = "/dex.v1.Msg/RemoveLiquidity"
Msg_CreateLimitOrder_FullMethodName = "/dex.v1.Msg/CreateLimitOrder"
Msg_CancelOrder_FullMethodName = "/dex.v1.Msg/CancelOrder"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// RegisterDEXAccount creates a new ICA account for DEX operations
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
RegisterDEXAccount(ctx context.Context, in *MsgRegisterDEXAccount, opts ...grpc.CallOption) (*MsgRegisterDEXAccountResponse, error)
// ExecuteSwap performs a token swap on a remote chain
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
ExecuteSwap(ctx context.Context, in *MsgExecuteSwap, opts ...grpc.CallOption) (*MsgExecuteSwapResponse, error)
// ProvideLiquidity adds liquidity to a pool
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
ProvideLiquidity(ctx context.Context, in *MsgProvideLiquidity, opts ...grpc.CallOption) (*MsgProvideLiquidityResponse, error)
// RemoveLiquidity removes liquidity from a pool
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
RemoveLiquidity(ctx context.Context, in *MsgRemoveLiquidity, opts ...grpc.CallOption) (*MsgRemoveLiquidityResponse, error)
// CreateLimitOrder creates a limit order
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
CreateLimitOrder(ctx context.Context, in *MsgCreateLimitOrder, opts ...grpc.CallOption) (*MsgCreateLimitOrderResponse, error)
// CancelOrder cancels an existing order
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
CancelOrder(ctx context.Context, in *MsgCancelOrder, opts ...grpc.CallOption) (*MsgCancelOrderResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) RegisterDEXAccount(ctx context.Context, in *MsgRegisterDEXAccount, opts ...grpc.CallOption) (*MsgRegisterDEXAccountResponse, error) {
out := new(MsgRegisterDEXAccountResponse)
err := c.cc.Invoke(ctx, Msg_RegisterDEXAccount_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) ExecuteSwap(ctx context.Context, in *MsgExecuteSwap, opts ...grpc.CallOption) (*MsgExecuteSwapResponse, error) {
out := new(MsgExecuteSwapResponse)
err := c.cc.Invoke(ctx, Msg_ExecuteSwap_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) ProvideLiquidity(ctx context.Context, in *MsgProvideLiquidity, opts ...grpc.CallOption) (*MsgProvideLiquidityResponse, error) {
out := new(MsgProvideLiquidityResponse)
err := c.cc.Invoke(ctx, Msg_ProvideLiquidity_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RemoveLiquidity(ctx context.Context, in *MsgRemoveLiquidity, opts ...grpc.CallOption) (*MsgRemoveLiquidityResponse, error) {
out := new(MsgRemoveLiquidityResponse)
err := c.cc.Invoke(ctx, Msg_RemoveLiquidity_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) CreateLimitOrder(ctx context.Context, in *MsgCreateLimitOrder, opts ...grpc.CallOption) (*MsgCreateLimitOrderResponse, error) {
out := new(MsgCreateLimitOrderResponse)
err := c.cc.Invoke(ctx, Msg_CreateLimitOrder_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) CancelOrder(ctx context.Context, in *MsgCancelOrder, opts ...grpc.CallOption) (*MsgCancelOrderResponse, error) {
out := new(MsgCancelOrderResponse)
err := c.cc.Invoke(ctx, Msg_CancelOrder_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// RegisterDEXAccount creates a new ICA account for DEX operations
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
RegisterDEXAccount(context.Context, *MsgRegisterDEXAccount) (*MsgRegisterDEXAccountResponse, error)
// ExecuteSwap performs a token swap on a remote chain
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
ExecuteSwap(context.Context, *MsgExecuteSwap) (*MsgExecuteSwapResponse, error)
// ProvideLiquidity adds liquidity to a pool
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
ProvideLiquidity(context.Context, *MsgProvideLiquidity) (*MsgProvideLiquidityResponse, error)
// RemoveLiquidity removes liquidity from a pool
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
RemoveLiquidity(context.Context, *MsgRemoveLiquidity) (*MsgRemoveLiquidityResponse, error)
// CreateLimitOrder creates a limit order
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
CreateLimitOrder(context.Context, *MsgCreateLimitOrder) (*MsgCreateLimitOrderResponse, error)
// CancelOrder cancels an existing order
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dex_tx_docs.md"}}
CancelOrder(context.Context, *MsgCancelOrder) (*MsgCancelOrderResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) RegisterDEXAccount(context.Context, *MsgRegisterDEXAccount) (*MsgRegisterDEXAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterDEXAccount not implemented")
}
func (UnimplementedMsgServer) ExecuteSwap(context.Context, *MsgExecuteSwap) (*MsgExecuteSwapResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExecuteSwap not implemented")
}
func (UnimplementedMsgServer) ProvideLiquidity(context.Context, *MsgProvideLiquidity) (*MsgProvideLiquidityResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProvideLiquidity not implemented")
}
func (UnimplementedMsgServer) RemoveLiquidity(context.Context, *MsgRemoveLiquidity) (*MsgRemoveLiquidityResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveLiquidity not implemented")
}
func (UnimplementedMsgServer) CreateLimitOrder(context.Context, *MsgCreateLimitOrder) (*MsgCreateLimitOrderResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateLimitOrder not implemented")
}
func (UnimplementedMsgServer) CancelOrder(context.Context, *MsgCancelOrder) (*MsgCancelOrderResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelOrder not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_RegisterDEXAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRegisterDEXAccount)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RegisterDEXAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RegisterDEXAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RegisterDEXAccount(ctx, req.(*MsgRegisterDEXAccount))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_ExecuteSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgExecuteSwap)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).ExecuteSwap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_ExecuteSwap_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ExecuteSwap(ctx, req.(*MsgExecuteSwap))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_ProvideLiquidity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgProvideLiquidity)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).ProvideLiquidity(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_ProvideLiquidity_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ProvideLiquidity(ctx, req.(*MsgProvideLiquidity))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RemoveLiquidity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRemoveLiquidity)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RemoveLiquidity(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RemoveLiquidity_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RemoveLiquidity(ctx, req.(*MsgRemoveLiquidity))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_CreateLimitOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgCreateLimitOrder)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).CreateLimitOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_CreateLimitOrder_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).CreateLimitOrder(ctx, req.(*MsgCreateLimitOrder))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_CancelOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgCancelOrder)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).CancelOrder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_CancelOrder_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).CancelOrder(ctx, req.(*MsgCancelOrder))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dex.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterDEXAccount",
Handler: _Msg_RegisterDEXAccount_Handler,
},
{
MethodName: "ExecuteSwap",
Handler: _Msg_ExecuteSwap_Handler,
},
{
MethodName: "ProvideLiquidity",
Handler: _Msg_ProvideLiquidity_Handler,
},
{
MethodName: "RemoveLiquidity",
Handler: _Msg_RemoveLiquidity_Handler,
},
{
MethodName: "CreateLimitOrder",
Handler: _Msg_CreateLimitOrder_Handler,
},
{
MethodName: "CancelOrder",
Handler: _Msg_CancelOrder_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dex/v1/tx.proto",
}
+37 -41
View File
@@ -2,15 +2,16 @@
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
io "io"
reflect "reflect"
sync "sync"
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
@@ -104,9 +105,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -120,9 +121,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -136,9 +137,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", descriptor.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", descriptor.FullName()))
}
}
@@ -156,9 +157,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -176,9 +177,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -189,9 +190,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -201,7 +202,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName()))
panic(fmt.Errorf("%s is not a oneof field in did.module.v1.Module", d.FullName()))
}
panic("unreachable")
}
@@ -414,29 +415,24 @@ var File_did_module_v1_module_proto protoreflect.FileDescriptor
var file_did_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x6e,
0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f,
0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73,
0x6f, 0x6e, 0x72, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f,
0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x44, 0x4d, 0xaa, 0x02,
0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x44, 0x69, 0x64,
0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4f, 0x6e, 0x73,
0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c,
0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c,
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x44,
0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x69,
0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a,
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a,
0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xaa, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d,
0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2d, 0x69,
0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -453,7 +449,7 @@ func file_did_module_v1_module_proto_rawDescGZIP() []byte {
var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_did_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: onsonr.sonr.did.module.v1.Module
(*Module)(nil), // 0: did.module.v1.Module
}
var file_did_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
File diff suppressed because it is too large Load Diff
+2141 -710
View File
File diff suppressed because it is too large Load Diff
+12377 -3176
View File
File diff suppressed because it is too large Load Diff
+381 -58
View File
@@ -8,6 +8,7 @@ package didv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -19,10 +20,18 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
Query_Sign_FullMethodName = "/did.v1.Query/Sign"
Query_Verify_FullMethodName = "/did.v1.Query/Verify"
Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_ResolveDID_FullMethodName = "/did.v1.Query/ResolveDID"
Query_GetDIDDocument_FullMethodName = "/did.v1.Query/GetDIDDocument"
Query_ListDIDDocuments_FullMethodName = "/did.v1.Query/ListDIDDocuments"
Query_GetDIDDocumentsByController_FullMethodName = "/did.v1.Query/GetDIDDocumentsByController"
Query_GetVerificationMethod_FullMethodName = "/did.v1.Query/GetVerificationMethod"
Query_GetService_FullMethodName = "/did.v1.Query/GetService"
Query_GetVerifiableCredential_FullMethodName = "/did.v1.Query/GetVerifiableCredential"
Query_ListVerifiableCredentials_FullMethodName = "/did.v1.Query/ListVerifiableCredentials"
Query_GetCredentialsByDID_FullMethodName = "/did.v1.Query/GetCredentialsByDID"
Query_RegisterStart_FullMethodName = "/did.v1.Query/RegisterStart"
Query_LoginStart_FullMethodName = "/did.v1.Query/LoginStart"
)
// QueryClient is the client API for Query service.
@@ -30,13 +39,34 @@ const (
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Resolve queries the DID document by its id.
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// Sign signs a message with the DID document
Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error)
// Verify verifies a message with the DID document
Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error)
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// ResolveDID resolves a DID to its DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_query_docs.md"}}
ResolveDID(ctx context.Context, in *QueryResolveDIDRequest, opts ...grpc.CallOption) (*QueryResolveDIDResponse, error)
// GetDIDDocument retrieves a DID document by its ID
GetDIDDocument(ctx context.Context, in *QueryGetDIDDocumentRequest, opts ...grpc.CallOption) (*QueryGetDIDDocumentResponse, error)
// ListDIDDocuments lists all DID documents with pagination
ListDIDDocuments(ctx context.Context, in *QueryListDIDDocumentsRequest, opts ...grpc.CallOption) (*QueryListDIDDocumentsResponse, error)
// GetDIDDocumentsByController retrieves DID documents by controller
GetDIDDocumentsByController(ctx context.Context, in *QueryGetDIDDocumentsByControllerRequest, opts ...grpc.CallOption) (*QueryGetDIDDocumentsByControllerResponse, error)
// GetVerificationMethod retrieves a specific verification method
GetVerificationMethod(ctx context.Context, in *QueryGetVerificationMethodRequest, opts ...grpc.CallOption) (*QueryGetVerificationMethodResponse, error)
// GetService retrieves a specific service endpoint
GetService(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error)
// GetVerifiableCredential retrieves a verifiable credential by ID
GetVerifiableCredential(ctx context.Context, in *QueryGetVerifiableCredentialRequest, opts ...grpc.CallOption) (*QueryGetVerifiableCredentialResponse, error)
// ListVerifiableCredentials lists all verifiable credentials with filtering options
ListVerifiableCredentials(ctx context.Context, in *QueryListVerifiableCredentialsRequest, opts ...grpc.CallOption) (*QueryListVerifiableCredentialsResponse, error)
// GetCredentialsByDID retrieves all credentials (verifiable and WebAuthn) associated with a DID
GetCredentialsByDID(ctx context.Context, in *QueryGetCredentialsByDIDRequest, opts ...grpc.CallOption) (*QueryGetCredentialsByDIDResponse, error)
// RegisterStart represents the start of the registration process
RegisterStart(ctx context.Context, in *QueryRegisterStartRequest, opts ...grpc.CallOption) (*QueryRegisterStartResponse, error)
// LoginStart represents the start of the login process
LoginStart(ctx context.Context, in *QueryLoginStartRequest, opts ...grpc.CallOption) (*QueryLoginStartResponse, error)
}
type queryClient struct {
@@ -47,7 +77,7 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
@@ -56,27 +86,99 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc
return out, nil
}
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...)
func (c *queryClient) ResolveDID(ctx context.Context, in *QueryResolveDIDRequest, opts ...grpc.CallOption) (*QueryResolveDIDResponse, error) {
out := new(QueryResolveDIDResponse)
err := c.cc.Invoke(ctx, Query_ResolveDID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) {
out := new(QuerySignResponse)
err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, opts...)
func (c *queryClient) GetDIDDocument(ctx context.Context, in *QueryGetDIDDocumentRequest, opts ...grpc.CallOption) (*QueryGetDIDDocumentResponse, error) {
out := new(QueryGetDIDDocumentResponse)
err := c.cc.Invoke(ctx, Query_GetDIDDocument_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
out := new(QueryVerifyResponse)
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...)
func (c *queryClient) ListDIDDocuments(ctx context.Context, in *QueryListDIDDocumentsRequest, opts ...grpc.CallOption) (*QueryListDIDDocumentsResponse, error) {
out := new(QueryListDIDDocumentsResponse)
err := c.cc.Invoke(ctx, Query_ListDIDDocuments_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetDIDDocumentsByController(ctx context.Context, in *QueryGetDIDDocumentsByControllerRequest, opts ...grpc.CallOption) (*QueryGetDIDDocumentsByControllerResponse, error) {
out := new(QueryGetDIDDocumentsByControllerResponse)
err := c.cc.Invoke(ctx, Query_GetDIDDocumentsByController_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetVerificationMethod(ctx context.Context, in *QueryGetVerificationMethodRequest, opts ...grpc.CallOption) (*QueryGetVerificationMethodResponse, error) {
out := new(QueryGetVerificationMethodResponse)
err := c.cc.Invoke(ctx, Query_GetVerificationMethod_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetService(ctx context.Context, in *QueryGetServiceRequest, opts ...grpc.CallOption) (*QueryGetServiceResponse, error) {
out := new(QueryGetServiceResponse)
err := c.cc.Invoke(ctx, Query_GetService_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetVerifiableCredential(ctx context.Context, in *QueryGetVerifiableCredentialRequest, opts ...grpc.CallOption) (*QueryGetVerifiableCredentialResponse, error) {
out := new(QueryGetVerifiableCredentialResponse)
err := c.cc.Invoke(ctx, Query_GetVerifiableCredential_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ListVerifiableCredentials(ctx context.Context, in *QueryListVerifiableCredentialsRequest, opts ...grpc.CallOption) (*QueryListVerifiableCredentialsResponse, error) {
out := new(QueryListVerifiableCredentialsResponse)
err := c.cc.Invoke(ctx, Query_ListVerifiableCredentials_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) GetCredentialsByDID(ctx context.Context, in *QueryGetCredentialsByDIDRequest, opts ...grpc.CallOption) (*QueryGetCredentialsByDIDResponse, error) {
out := new(QueryGetCredentialsByDIDResponse)
err := c.cc.Invoke(ctx, Query_GetCredentialsByDID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) RegisterStart(ctx context.Context, in *QueryRegisterStartRequest, opts ...grpc.CallOption) (*QueryRegisterStartResponse, error) {
out := new(QueryRegisterStartResponse)
err := c.cc.Invoke(ctx, Query_RegisterStart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) LoginStart(ctx context.Context, in *QueryLoginStartRequest, opts ...grpc.CallOption) (*QueryLoginStartResponse, error) {
out := new(QueryLoginStartResponse)
err := c.cc.Invoke(ctx, Query_LoginStart_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -88,13 +190,34 @@ func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts .
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
// Resolve queries the DID document by its id.
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
// Sign signs a message with the DID document
Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error)
// Verify verifies a message with the DID document
Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error)
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// ResolveDID resolves a DID to its DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_query_docs.md"}}
ResolveDID(context.Context, *QueryResolveDIDRequest) (*QueryResolveDIDResponse, error)
// GetDIDDocument retrieves a DID document by its ID
GetDIDDocument(context.Context, *QueryGetDIDDocumentRequest) (*QueryGetDIDDocumentResponse, error)
// ListDIDDocuments lists all DID documents with pagination
ListDIDDocuments(context.Context, *QueryListDIDDocumentsRequest) (*QueryListDIDDocumentsResponse, error)
// GetDIDDocumentsByController retrieves DID documents by controller
GetDIDDocumentsByController(context.Context, *QueryGetDIDDocumentsByControllerRequest) (*QueryGetDIDDocumentsByControllerResponse, error)
// GetVerificationMethod retrieves a specific verification method
GetVerificationMethod(context.Context, *QueryGetVerificationMethodRequest) (*QueryGetVerificationMethodResponse, error)
// GetService retrieves a specific service endpoint
GetService(context.Context, *QueryGetServiceRequest) (*QueryGetServiceResponse, error)
// GetVerifiableCredential retrieves a verifiable credential by ID
GetVerifiableCredential(context.Context, *QueryGetVerifiableCredentialRequest) (*QueryGetVerifiableCredentialResponse, error)
// ListVerifiableCredentials lists all verifiable credentials with filtering options
ListVerifiableCredentials(context.Context, *QueryListVerifiableCredentialsRequest) (*QueryListVerifiableCredentialsResponse, error)
// GetCredentialsByDID retrieves all credentials (verifiable and WebAuthn) associated with a DID
GetCredentialsByDID(context.Context, *QueryGetCredentialsByDIDRequest) (*QueryGetCredentialsByDIDResponse, error)
// RegisterStart represents the start of the registration process
RegisterStart(context.Context, *QueryRegisterStartRequest) (*QueryRegisterStartResponse, error)
// LoginStart represents the start of the login process
LoginStart(context.Context, *QueryLoginStartRequest) (*QueryLoginStartResponse, error)
mustEmbedUnimplementedQueryServer()
}
@@ -102,17 +225,41 @@ type QueryServer interface {
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
func (UnimplementedQueryServer) ResolveDID(context.Context, *QueryResolveDIDRequest) (*QueryResolveDIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResolveDID not implemented")
}
func (UnimplementedQueryServer) Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
func (UnimplementedQueryServer) GetDIDDocument(context.Context, *QueryGetDIDDocumentRequest) (*QueryGetDIDDocumentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDIDDocument not implemented")
}
func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
func (UnimplementedQueryServer) ListDIDDocuments(context.Context, *QueryListDIDDocumentsRequest) (*QueryListDIDDocumentsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListDIDDocuments not implemented")
}
func (UnimplementedQueryServer) GetDIDDocumentsByController(context.Context, *QueryGetDIDDocumentsByControllerRequest) (*QueryGetDIDDocumentsByControllerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDIDDocumentsByController not implemented")
}
func (UnimplementedQueryServer) GetVerificationMethod(context.Context, *QueryGetVerificationMethodRequest) (*QueryGetVerificationMethodResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVerificationMethod not implemented")
}
func (UnimplementedQueryServer) GetService(context.Context, *QueryGetServiceRequest) (*QueryGetServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
}
func (UnimplementedQueryServer) GetVerifiableCredential(context.Context, *QueryGetVerifiableCredentialRequest) (*QueryGetVerifiableCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVerifiableCredential not implemented")
}
func (UnimplementedQueryServer) ListVerifiableCredentials(context.Context, *QueryListVerifiableCredentialsRequest) (*QueryListVerifiableCredentialsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListVerifiableCredentials not implemented")
}
func (UnimplementedQueryServer) GetCredentialsByDID(context.Context, *QueryGetCredentialsByDIDRequest) (*QueryGetCredentialsByDIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCredentialsByDID not implemented")
}
func (UnimplementedQueryServer) RegisterStart(context.Context, *QueryRegisterStartRequest) (*QueryRegisterStartResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterStart not implemented")
}
func (UnimplementedQueryServer) LoginStart(context.Context, *QueryLoginStartRequest) (*QueryLoginStartResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginStart not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
@@ -128,7 +275,7 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRequest)
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -140,61 +287,205 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryRequest))
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
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)
func _Query_ResolveDID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryResolveDIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Resolve(ctx, in)
return srv.(QueryServer).ResolveDID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Resolve_FullMethodName,
FullMethod: Query_ResolveDID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Resolve(ctx, req.(*QueryRequest))
return srv.(QueryServer).ResolveDID(ctx, req.(*QueryResolveDIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QuerySignRequest)
func _Query_GetDIDDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetDIDDocumentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Sign(ctx, in)
return srv.(QueryServer).GetDIDDocument(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Sign_FullMethodName,
FullMethod: Query_GetDIDDocument_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Sign(ctx, req.(*QuerySignRequest))
return srv.(QueryServer).GetDIDDocument(ctx, req.(*QueryGetDIDDocumentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryVerifyRequest)
func _Query_ListDIDDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryListDIDDocumentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Verify(ctx, in)
return srv.(QueryServer).ListDIDDocuments(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Verify_FullMethodName,
FullMethod: Query_ListDIDDocuments_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Verify(ctx, req.(*QueryVerifyRequest))
return srv.(QueryServer).ListDIDDocuments(ctx, req.(*QueryListDIDDocumentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetDIDDocumentsByController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetDIDDocumentsByControllerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetDIDDocumentsByController(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetDIDDocumentsByController_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetDIDDocumentsByController(ctx, req.(*QueryGetDIDDocumentsByControllerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetVerificationMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetVerificationMethodRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetVerificationMethod(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetVerificationMethod_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetVerificationMethod(ctx, req.(*QueryGetVerificationMethodRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetService_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetService(ctx, req.(*QueryGetServiceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetVerifiableCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetVerifiableCredentialRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetVerifiableCredential(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetVerifiableCredential_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetVerifiableCredential(ctx, req.(*QueryGetVerifiableCredentialRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ListVerifiableCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryListVerifiableCredentialsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ListVerifiableCredentials(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ListVerifiableCredentials_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ListVerifiableCredentials(ctx, req.(*QueryListVerifiableCredentialsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_GetCredentialsByDID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetCredentialsByDIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetCredentialsByDID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_GetCredentialsByDID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetCredentialsByDID(ctx, req.(*QueryGetCredentialsByDIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_RegisterStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRegisterStartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RegisterStart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_RegisterStart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RegisterStart(ctx, req.(*QueryRegisterStartRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_LoginStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryLoginStartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).LoginStart(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_LoginStart_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).LoginStart(ctx, req.(*QueryLoginStartRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -211,16 +502,48 @@ var Query_ServiceDesc = grpc.ServiceDesc{
Handler: _Query_Params_Handler,
},
{
MethodName: "Resolve",
Handler: _Query_Resolve_Handler,
MethodName: "ResolveDID",
Handler: _Query_ResolveDID_Handler,
},
{
MethodName: "Sign",
Handler: _Query_Sign_Handler,
MethodName: "GetDIDDocument",
Handler: _Query_GetDIDDocument_Handler,
},
{
MethodName: "Verify",
Handler: _Query_Verify_Handler,
MethodName: "ListDIDDocuments",
Handler: _Query_ListDIDDocuments_Handler,
},
{
MethodName: "GetDIDDocumentsByController",
Handler: _Query_GetDIDDocumentsByController_Handler,
},
{
MethodName: "GetVerificationMethod",
Handler: _Query_GetVerificationMethod_Handler,
},
{
MethodName: "GetService",
Handler: _Query_GetService_Handler,
},
{
MethodName: "GetVerifiableCredential",
Handler: _Query_GetVerifiableCredential_Handler,
},
{
MethodName: "ListVerifiableCredentials",
Handler: _Query_ListVerifiableCredentials_Handler,
},
{
MethodName: "GetCredentialsByDID",
Handler: _Query_GetCredentialsByDID_Handler,
},
{
MethodName: "RegisterStart",
Handler: _Query_RegisterStart_Handler,
},
{
MethodName: "LoginStart",
Handler: _Query_LoginStart_Handler,
},
},
Streams: []grpc.StreamDesc{},
File diff suppressed because it is too large Load Diff
+5879 -2810
View File
File diff suppressed because it is too large Load Diff
+12787 -3294
View File
File diff suppressed because it is too large Load Diff
+465 -83
View File
@@ -8,6 +8,7 @@ package didv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -19,23 +20,65 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
Msg_CreateDID_FullMethodName = "/did.v1.Msg/CreateDID"
Msg_UpdateDID_FullMethodName = "/did.v1.Msg/UpdateDID"
Msg_DeactivateDID_FullMethodName = "/did.v1.Msg/DeactivateDID"
Msg_AddVerificationMethod_FullMethodName = "/did.v1.Msg/AddVerificationMethod"
Msg_RemoveVerificationMethod_FullMethodName = "/did.v1.Msg/RemoveVerificationMethod"
Msg_AddService_FullMethodName = "/did.v1.Msg/AddService"
Msg_RemoveService_FullMethodName = "/did.v1.Msg/RemoveService"
Msg_IssueVerifiableCredential_FullMethodName = "/did.v1.Msg/IssueVerifiableCredential"
Msg_RevokeVerifiableCredential_FullMethodName = "/did.v1.Msg/RevokeVerifiableCredential"
Msg_LinkExternalWallet_FullMethodName = "/did.v1.Msg/LinkExternalWallet"
Msg_RegisterWebAuthnCredential_FullMethodName = "/did.v1.Msg/RegisterWebAuthnCredential"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification.
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication
// set, address, cid, publicKey, and user-defined alias.
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// CreateDID creates a new DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
CreateDID(ctx context.Context, in *MsgCreateDID, opts ...grpc.CallOption) (*MsgCreateDIDResponse, error)
// UpdateDID updates an existing DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
UpdateDID(ctx context.Context, in *MsgUpdateDID, opts ...grpc.CallOption) (*MsgUpdateDIDResponse, error)
// DeactivateDID deactivates a DID document
DeactivateDID(ctx context.Context, in *MsgDeactivateDID, opts ...grpc.CallOption) (*MsgDeactivateDIDResponse, error)
// AddVerificationMethod adds a new verification method to a DID document
AddVerificationMethod(ctx context.Context, in *MsgAddVerificationMethod, opts ...grpc.CallOption) (*MsgAddVerificationMethodResponse, error)
// RemoveVerificationMethod removes a verification method from a DID document
RemoveVerificationMethod(ctx context.Context, in *MsgRemoveVerificationMethod, opts ...grpc.CallOption) (*MsgRemoveVerificationMethodResponse, error)
// AddService adds a new service endpoint to a DID document
AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error)
// RemoveService removes a service endpoint from a DID document
RemoveService(ctx context.Context, in *MsgRemoveService, opts ...grpc.CallOption) (*MsgRemoveServiceResponse, error)
// IssueVerifiableCredential issues a new verifiable credential
IssueVerifiableCredential(ctx context.Context, in *MsgIssueVerifiableCredential, opts ...grpc.CallOption) (*MsgIssueVerifiableCredentialResponse, error)
// RevokeVerifiableCredential revokes a verifiable credential
RevokeVerifiableCredential(ctx context.Context, in *MsgRevokeVerifiableCredential, opts ...grpc.CallOption) (*MsgRevokeVerifiableCredentialResponse, error)
// LinkExternalWallet links an external wallet as an assertion method
LinkExternalWallet(ctx context.Context, in *MsgLinkExternalWallet, opts ...grpc.CallOption) (*MsgLinkExternalWalletResponse, error)
// RegisterWebAuthnCredential registers a new WebAuthn credential and creates a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
RegisterWebAuthnCredential(ctx context.Context, in *MsgRegisterWebAuthnCredential, opts ...grpc.CallOption) (*MsgRegisterWebAuthnCredentialResponse, error)
}
type msgClient struct {
@@ -46,24 +89,6 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
out := new(MsgExecuteTxResponse)
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) {
out := new(MsgRegisterControllerResponse)
err := c.cc.Invoke(ctx, Msg_RegisterController_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
@@ -73,18 +98,150 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
return out, nil
}
func (c *msgClient) CreateDID(ctx context.Context, in *MsgCreateDID, opts ...grpc.CallOption) (*MsgCreateDIDResponse, error) {
out := new(MsgCreateDIDResponse)
err := c.cc.Invoke(ctx, Msg_CreateDID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) UpdateDID(ctx context.Context, in *MsgUpdateDID, opts ...grpc.CallOption) (*MsgUpdateDIDResponse, error) {
out := new(MsgUpdateDIDResponse)
err := c.cc.Invoke(ctx, Msg_UpdateDID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) DeactivateDID(ctx context.Context, in *MsgDeactivateDID, opts ...grpc.CallOption) (*MsgDeactivateDIDResponse, error) {
out := new(MsgDeactivateDIDResponse)
err := c.cc.Invoke(ctx, Msg_DeactivateDID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) AddVerificationMethod(ctx context.Context, in *MsgAddVerificationMethod, opts ...grpc.CallOption) (*MsgAddVerificationMethodResponse, error) {
out := new(MsgAddVerificationMethodResponse)
err := c.cc.Invoke(ctx, Msg_AddVerificationMethod_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RemoveVerificationMethod(ctx context.Context, in *MsgRemoveVerificationMethod, opts ...grpc.CallOption) (*MsgRemoveVerificationMethodResponse, error) {
out := new(MsgRemoveVerificationMethodResponse)
err := c.cc.Invoke(ctx, Msg_RemoveVerificationMethod_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) AddService(ctx context.Context, in *MsgAddService, opts ...grpc.CallOption) (*MsgAddServiceResponse, error) {
out := new(MsgAddServiceResponse)
err := c.cc.Invoke(ctx, Msg_AddService_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RemoveService(ctx context.Context, in *MsgRemoveService, opts ...grpc.CallOption) (*MsgRemoveServiceResponse, error) {
out := new(MsgRemoveServiceResponse)
err := c.cc.Invoke(ctx, Msg_RemoveService_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) IssueVerifiableCredential(ctx context.Context, in *MsgIssueVerifiableCredential, opts ...grpc.CallOption) (*MsgIssueVerifiableCredentialResponse, error) {
out := new(MsgIssueVerifiableCredentialResponse)
err := c.cc.Invoke(ctx, Msg_IssueVerifiableCredential_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RevokeVerifiableCredential(ctx context.Context, in *MsgRevokeVerifiableCredential, opts ...grpc.CallOption) (*MsgRevokeVerifiableCredentialResponse, error) {
out := new(MsgRevokeVerifiableCredentialResponse)
err := c.cc.Invoke(ctx, Msg_RevokeVerifiableCredential_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) LinkExternalWallet(ctx context.Context, in *MsgLinkExternalWallet, opts ...grpc.CallOption) (*MsgLinkExternalWalletResponse, error) {
out := new(MsgLinkExternalWalletResponse)
err := c.cc.Invoke(ctx, Msg_LinkExternalWallet_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RegisterWebAuthnCredential(ctx context.Context, in *MsgRegisterWebAuthnCredential, opts ...grpc.CallOption) (*MsgRegisterWebAuthnCredentialResponse, error) {
out := new(MsgRegisterWebAuthnCredentialResponse)
err := c.cc.Invoke(ctx, Msg_RegisterWebAuthnCredential_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification.
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication
// set, address, cid, publicKey, and user-defined alias.
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// CreateDID creates a new DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
CreateDID(context.Context, *MsgCreateDID) (*MsgCreateDIDResponse, error)
// UpdateDID updates an existing DID document
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
UpdateDID(context.Context, *MsgUpdateDID) (*MsgUpdateDIDResponse, error)
// DeactivateDID deactivates a DID document
DeactivateDID(context.Context, *MsgDeactivateDID) (*MsgDeactivateDIDResponse, error)
// AddVerificationMethod adds a new verification method to a DID document
AddVerificationMethod(context.Context, *MsgAddVerificationMethod) (*MsgAddVerificationMethodResponse, error)
// RemoveVerificationMethod removes a verification method from a DID document
RemoveVerificationMethod(context.Context, *MsgRemoveVerificationMethod) (*MsgRemoveVerificationMethodResponse, error)
// AddService adds a new service endpoint to a DID document
AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error)
// RemoveService removes a service endpoint from a DID document
RemoveService(context.Context, *MsgRemoveService) (*MsgRemoveServiceResponse, error)
// IssueVerifiableCredential issues a new verifiable credential
IssueVerifiableCredential(context.Context, *MsgIssueVerifiableCredential) (*MsgIssueVerifiableCredentialResponse, error)
// RevokeVerifiableCredential revokes a verifiable credential
RevokeVerifiableCredential(context.Context, *MsgRevokeVerifiableCredential) (*MsgRevokeVerifiableCredentialResponse, error)
// LinkExternalWallet links an external wallet as an assertion method
LinkExternalWallet(context.Context, *MsgLinkExternalWallet) (*MsgLinkExternalWalletResponse, error)
// RegisterWebAuthnCredential registers a new WebAuthn credential and creates a DID
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "did_tx_docs.md"}}
RegisterWebAuthnCredential(context.Context, *MsgRegisterWebAuthnCredential) (*MsgRegisterWebAuthnCredentialResponse, error)
mustEmbedUnimplementedMsgServer()
}
@@ -92,15 +249,42 @@ type MsgServer interface {
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
}
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) CreateDID(context.Context, *MsgCreateDID) (*MsgCreateDIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateDID not implemented")
}
func (UnimplementedMsgServer) UpdateDID(context.Context, *MsgUpdateDID) (*MsgUpdateDIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateDID not implemented")
}
func (UnimplementedMsgServer) DeactivateDID(context.Context, *MsgDeactivateDID) (*MsgDeactivateDIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeactivateDID not implemented")
}
func (UnimplementedMsgServer) AddVerificationMethod(context.Context, *MsgAddVerificationMethod) (*MsgAddVerificationMethodResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddVerificationMethod not implemented")
}
func (UnimplementedMsgServer) RemoveVerificationMethod(context.Context, *MsgRemoveVerificationMethod) (*MsgRemoveVerificationMethodResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveVerificationMethod not implemented")
}
func (UnimplementedMsgServer) AddService(context.Context, *MsgAddService) (*MsgAddServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented")
}
func (UnimplementedMsgServer) RemoveService(context.Context, *MsgRemoveService) (*MsgRemoveServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented")
}
func (UnimplementedMsgServer) IssueVerifiableCredential(context.Context, *MsgIssueVerifiableCredential) (*MsgIssueVerifiableCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IssueVerifiableCredential not implemented")
}
func (UnimplementedMsgServer) RevokeVerifiableCredential(context.Context, *MsgRevokeVerifiableCredential) (*MsgRevokeVerifiableCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RevokeVerifiableCredential not implemented")
}
func (UnimplementedMsgServer) LinkExternalWallet(context.Context, *MsgLinkExternalWallet) (*MsgLinkExternalWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LinkExternalWallet not implemented")
}
func (UnimplementedMsgServer) RegisterWebAuthnCredential(context.Context, *MsgRegisterWebAuthnCredential) (*MsgRegisterWebAuthnCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterWebAuthnCredential not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
@@ -114,42 +298,6 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_ExecuteTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgExecuteTx)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).ExecuteTx(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_ExecuteTx_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ExecuteTx(ctx, req.(*MsgExecuteTx))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRegisterController)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RegisterController(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RegisterController_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
@@ -168,6 +316,204 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Msg_CreateDID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgCreateDID)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).CreateDID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_CreateDID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).CreateDID(ctx, req.(*MsgCreateDID))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateDID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateDID)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateDID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateDID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateDID(ctx, req.(*MsgUpdateDID))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_DeactivateDID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgDeactivateDID)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).DeactivateDID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_DeactivateDID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).DeactivateDID(ctx, req.(*MsgDeactivateDID))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_AddVerificationMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAddVerificationMethod)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).AddVerificationMethod(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_AddVerificationMethod_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AddVerificationMethod(ctx, req.(*MsgAddVerificationMethod))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RemoveVerificationMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRemoveVerificationMethod)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RemoveVerificationMethod(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RemoveVerificationMethod_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RemoveVerificationMethod(ctx, req.(*MsgRemoveVerificationMethod))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_AddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAddService)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).AddService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_AddService_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AddService(ctx, req.(*MsgAddService))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RemoveService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRemoveService)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RemoveService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RemoveService_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RemoveService(ctx, req.(*MsgRemoveService))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_IssueVerifiableCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgIssueVerifiableCredential)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).IssueVerifiableCredential(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_IssueVerifiableCredential_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).IssueVerifiableCredential(ctx, req.(*MsgIssueVerifiableCredential))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RevokeVerifiableCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRevokeVerifiableCredential)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RevokeVerifiableCredential(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RevokeVerifiableCredential_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RevokeVerifiableCredential(ctx, req.(*MsgRevokeVerifiableCredential))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_LinkExternalWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgLinkExternalWallet)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).LinkExternalWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_LinkExternalWallet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).LinkExternalWallet(ctx, req.(*MsgLinkExternalWallet))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RegisterWebAuthnCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRegisterWebAuthnCredential)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RegisterWebAuthnCredential(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RegisterWebAuthnCredential_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RegisterWebAuthnCredential(ctx, req.(*MsgRegisterWebAuthnCredential))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -175,18 +521,54 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "did.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ExecuteTx",
Handler: _Msg_ExecuteTx_Handler,
},
{
MethodName: "RegisterController",
Handler: _Msg_RegisterController_Handler,
},
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "CreateDID",
Handler: _Msg_CreateDID_Handler,
},
{
MethodName: "UpdateDID",
Handler: _Msg_UpdateDID_Handler,
},
{
MethodName: "DeactivateDID",
Handler: _Msg_DeactivateDID_Handler,
},
{
MethodName: "AddVerificationMethod",
Handler: _Msg_AddVerificationMethod_Handler,
},
{
MethodName: "RemoveVerificationMethod",
Handler: _Msg_RemoveVerificationMethod_Handler,
},
{
MethodName: "AddService",
Handler: _Msg_AddService_Handler,
},
{
MethodName: "RemoveService",
Handler: _Msg_RemoveService_Handler,
},
{
MethodName: "IssueVerifiableCredential",
Handler: _Msg_IssueVerifiableCredential_Handler,
},
{
MethodName: "RevokeVerifiableCredential",
Handler: _Msg_RevokeVerifiableCredential_Handler,
},
{
MethodName: "LinkExternalWallet",
Handler: _Msg_LinkExternalWallet_Handler,
},
{
MethodName: "RegisterWebAuthnCredential",
Handler: _Msg_RegisterWebAuthnCredential_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "did/v1/tx.proto",
File diff suppressed because it is too large Load Diff
@@ -2,15 +2,16 @@
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
io "io"
reflect "reflect"
sync "sync"
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
@@ -18,8 +19,8 @@ var (
)
func init() {
file_oracle_module_v1_module_proto_init()
md_Module = File_oracle_module_v1_module_proto.Messages().ByName("Module")
file_dwn_module_v1_module_proto_init()
md_Module = File_dwn_module_v1_module_proto.Messages().ByName("Module")
}
var _ protoreflect.Message = (*fastReflection_Module)(nil)
@@ -31,7 +32,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
}
func (x *Module) slowProtoReflect() protoreflect.Message {
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
mi := &file_dwn_module_v1_module_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -104,9 +105,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -120,9 +121,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -136,9 +137,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", descriptor.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", descriptor.FullName()))
}
}
@@ -156,9 +157,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -176,9 +177,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -189,9 +190,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
}
panic(fmt.Errorf("message oracle.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message dwn.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -201,7 +202,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in oracle.module.v1.Module", d.FullName()))
panic(fmt.Errorf("%s is not a oneof field in dwn.module.v1.Module", d.FullName()))
}
panic("unreachable")
}
@@ -373,7 +374,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: oracle/module/v1/module.proto
// source: dwn/module/v1/module.proto
const (
// Verify that this generated code is sufficiently up-to-date.
@@ -393,7 +394,7 @@ type Module struct {
func (x *Module) Reset() {
*x = Module{}
if protoimpl.UnsafeEnabled {
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
mi := &file_dwn_module_v1_module_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -407,52 +408,50 @@ func (*Module) ProtoMessage() {}
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
func (*Module) Descriptor() ([]byte, []int) {
return file_oracle_module_v1_module_proto_rawDescGZIP(), []int{0}
return file_dwn_module_v1_module_proto_rawDescGZIP(), []int{0}
}
var File_oracle_module_v1_module_proto protoreflect.FileDescriptor
var File_dwn_module_v1_module_proto protoreflect.FileDescriptor
var file_oracle_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x10, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba,
0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xbb, 0x01,
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4d,
0x58, 0xaa, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65,
0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a,
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
var file_dwn_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1a, 0x64, 0x77, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x77,
0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a,
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a,
0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xaa, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d,
0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2d, 0x69,
0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x77, 0x6e, 0x2f, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x2e, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_oracle_module_v1_module_proto_rawDescOnce sync.Once
file_oracle_module_v1_module_proto_rawDescData = file_oracle_module_v1_module_proto_rawDesc
file_dwn_module_v1_module_proto_rawDescOnce sync.Once
file_dwn_module_v1_module_proto_rawDescData = file_dwn_module_v1_module_proto_rawDesc
)
func file_oracle_module_v1_module_proto_rawDescGZIP() []byte {
file_oracle_module_v1_module_proto_rawDescOnce.Do(func() {
file_oracle_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_module_v1_module_proto_rawDescData)
func file_dwn_module_v1_module_proto_rawDescGZIP() []byte {
file_dwn_module_v1_module_proto_rawDescOnce.Do(func() {
file_dwn_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_module_v1_module_proto_rawDescData)
})
return file_oracle_module_v1_module_proto_rawDescData
return file_dwn_module_v1_module_proto_rawDescData
}
var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_oracle_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: oracle.module.v1.Module
var file_dwn_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_dwn_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: dwn.module.v1.Module
}
var file_oracle_module_v1_module_proto_depIdxs = []int32{
var file_dwn_module_v1_module_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
@@ -460,13 +459,13 @@ var file_oracle_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_oracle_module_v1_module_proto_init() }
func file_oracle_module_v1_module_proto_init() {
if File_oracle_module_v1_module_proto != nil {
func init() { file_dwn_module_v1_module_proto_init() }
func file_dwn_module_v1_module_proto_init() {
if File_dwn_module_v1_module_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_oracle_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_dwn_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Module); i {
case 0:
return &v.state
@@ -483,18 +482,18 @@ func file_oracle_module_v1_module_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_oracle_module_v1_module_proto_rawDesc,
RawDescriptor: file_dwn_module_v1_module_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_oracle_module_v1_module_proto_goTypes,
DependencyIndexes: file_oracle_module_v1_module_proto_depIdxs,
MessageInfos: file_oracle_module_v1_module_proto_msgTypes,
GoTypes: file_dwn_module_v1_module_proto_goTypes,
DependencyIndexes: file_dwn_module_v1_module_proto_depIdxs,
MessageInfos: file_dwn_module_v1_module_proto_msgTypes,
}.Build()
File_oracle_module_v1_module_proto = out.File
file_oracle_module_v1_module_proto_rawDesc = nil
file_oracle_module_v1_module_proto_goTypes = nil
file_oracle_module_v1_module_proto_depIdxs = nil
File_dwn_module_v1_module_proto = out.File
file_dwn_module_v1_module_proto_rawDesc = nil
file_dwn_module_v1_module_proto_goTypes = nil
file_dwn_module_v1_module_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+590
View File
@@ -0,0 +1,590 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: dwn/v1/query.proto
package dwnv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/dwn.v1.Query/Params"
Query_IPFS_FullMethodName = "/dwn.v1.Query/IPFS"
Query_CID_FullMethodName = "/dwn.v1.Query/CID"
Query_Records_FullMethodName = "/dwn.v1.Query/Records"
Query_Record_FullMethodName = "/dwn.v1.Query/Record"
Query_Protocols_FullMethodName = "/dwn.v1.Query/Protocols"
Query_Protocol_FullMethodName = "/dwn.v1.Query/Protocol"
Query_Permissions_FullMethodName = "/dwn.v1.Query/Permissions"
Query_Vault_FullMethodName = "/dwn.v1.Query/Vault"
Query_Vaults_FullMethodName = "/dwn.v1.Query/Vaults"
Query_EncryptedRecord_FullMethodName = "/dwn.v1.Query/EncryptedRecord"
Query_EncryptionStatus_FullMethodName = "/dwn.v1.Query/EncryptionStatus"
Query_VRFContributions_FullMethodName = "/dwn.v1.Query/VRFContributions"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// IPFS queries the status of the IPFS node
IPFS(ctx context.Context, in *QueryIPFSRequest, opts ...grpc.CallOption) (*QueryIPFSResponse, error)
// CID returns the data for a given CID
CID(ctx context.Context, in *QueryCIDRequest, opts ...grpc.CallOption) (*QueryCIDResponse, error)
// Records queries DWN records with filters
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dwn_docs.md"}}
Records(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error)
// Record queries a specific DWN record by ID
Record(ctx context.Context, in *QueryRecordRequest, opts ...grpc.CallOption) (*QueryRecordResponse, error)
// Protocols queries DWN protocols
Protocols(ctx context.Context, in *QueryProtocolsRequest, opts ...grpc.CallOption) (*QueryProtocolsResponse, error)
// Protocol queries a specific DWN protocol
Protocol(ctx context.Context, in *QueryProtocolRequest, opts ...grpc.CallOption) (*QueryProtocolResponse, error)
// Permissions queries DWN permissions
Permissions(ctx context.Context, in *QueryPermissionsRequest, opts ...grpc.CallOption) (*QueryPermissionsResponse, error)
// Vault queries a specific vault
Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error)
// Vaults queries vaults by owner
Vaults(ctx context.Context, in *QueryVaultsRequest, opts ...grpc.CallOption) (*QueryVaultsResponse, error)
// EncryptedRecord queries a specific encrypted record with automatic decryption
EncryptedRecord(ctx context.Context, in *QueryEncryptedRecordRequest, opts ...grpc.CallOption) (*QueryEncryptedRecordResponse, error)
// EncryptionStatus queries current encryption key state and version
EncryptionStatus(ctx context.Context, in *QueryEncryptionStatusRequest, opts ...grpc.CallOption) (*QueryEncryptionStatusResponse, error)
// VRFContributions lists VRF contributions for current consensus round
VRFContributions(ctx context.Context, in *QueryVRFContributionsRequest, opts ...grpc.CallOption) (*QueryVRFContributionsResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) IPFS(ctx context.Context, in *QueryIPFSRequest, opts ...grpc.CallOption) (*QueryIPFSResponse, error) {
out := new(QueryIPFSResponse)
err := c.cc.Invoke(ctx, Query_IPFS_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) CID(ctx context.Context, in *QueryCIDRequest, opts ...grpc.CallOption) (*QueryCIDResponse, error) {
out := new(QueryCIDResponse)
err := c.cc.Invoke(ctx, Query_CID_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Records(ctx context.Context, in *QueryRecordsRequest, opts ...grpc.CallOption) (*QueryRecordsResponse, error) {
out := new(QueryRecordsResponse)
err := c.cc.Invoke(ctx, Query_Records_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Record(ctx context.Context, in *QueryRecordRequest, opts ...grpc.CallOption) (*QueryRecordResponse, error) {
out := new(QueryRecordResponse)
err := c.cc.Invoke(ctx, Query_Record_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Protocols(ctx context.Context, in *QueryProtocolsRequest, opts ...grpc.CallOption) (*QueryProtocolsResponse, error) {
out := new(QueryProtocolsResponse)
err := c.cc.Invoke(ctx, Query_Protocols_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Protocol(ctx context.Context, in *QueryProtocolRequest, opts ...grpc.CallOption) (*QueryProtocolResponse, error) {
out := new(QueryProtocolResponse)
err := c.cc.Invoke(ctx, Query_Protocol_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Permissions(ctx context.Context, in *QueryPermissionsRequest, opts ...grpc.CallOption) (*QueryPermissionsResponse, error) {
out := new(QueryPermissionsResponse)
err := c.cc.Invoke(ctx, Query_Permissions_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error) {
out := new(QueryVaultResponse)
err := c.cc.Invoke(ctx, Query_Vault_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Vaults(ctx context.Context, in *QueryVaultsRequest, opts ...grpc.CallOption) (*QueryVaultsResponse, error) {
out := new(QueryVaultsResponse)
err := c.cc.Invoke(ctx, Query_Vaults_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) EncryptedRecord(ctx context.Context, in *QueryEncryptedRecordRequest, opts ...grpc.CallOption) (*QueryEncryptedRecordResponse, error) {
out := new(QueryEncryptedRecordResponse)
err := c.cc.Invoke(ctx, Query_EncryptedRecord_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) EncryptionStatus(ctx context.Context, in *QueryEncryptionStatusRequest, opts ...grpc.CallOption) (*QueryEncryptionStatusResponse, error) {
out := new(QueryEncryptionStatusResponse)
err := c.cc.Invoke(ctx, Query_EncryptionStatus_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) VRFContributions(ctx context.Context, in *QueryVRFContributionsRequest, opts ...grpc.CallOption) (*QueryVRFContributionsResponse, error) {
out := new(QueryVRFContributionsResponse)
err := c.cc.Invoke(ctx, Query_VRFContributions_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// IPFS queries the status of the IPFS node
IPFS(context.Context, *QueryIPFSRequest) (*QueryIPFSResponse, error)
// CID returns the data for a given CID
CID(context.Context, *QueryCIDRequest) (*QueryCIDResponse, error)
// Records queries DWN records with filters
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dwn_docs.md"}}
Records(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error)
// Record queries a specific DWN record by ID
Record(context.Context, *QueryRecordRequest) (*QueryRecordResponse, error)
// Protocols queries DWN protocols
Protocols(context.Context, *QueryProtocolsRequest) (*QueryProtocolsResponse, error)
// Protocol queries a specific DWN protocol
Protocol(context.Context, *QueryProtocolRequest) (*QueryProtocolResponse, error)
// Permissions queries DWN permissions
Permissions(context.Context, *QueryPermissionsRequest) (*QueryPermissionsResponse, error)
// Vault queries a specific vault
Vault(context.Context, *QueryVaultRequest) (*QueryVaultResponse, error)
// Vaults queries vaults by owner
Vaults(context.Context, *QueryVaultsRequest) (*QueryVaultsResponse, error)
// EncryptedRecord queries a specific encrypted record with automatic decryption
EncryptedRecord(context.Context, *QueryEncryptedRecordRequest) (*QueryEncryptedRecordResponse, error)
// EncryptionStatus queries current encryption key state and version
EncryptionStatus(context.Context, *QueryEncryptionStatusRequest) (*QueryEncryptionStatusResponse, error)
// VRFContributions lists VRF contributions for current consensus round
VRFContributions(context.Context, *QueryVRFContributionsRequest) (*QueryVRFContributionsResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) IPFS(context.Context, *QueryIPFSRequest) (*QueryIPFSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IPFS not implemented")
}
func (UnimplementedQueryServer) CID(context.Context, *QueryCIDRequest) (*QueryCIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CID not implemented")
}
func (UnimplementedQueryServer) Records(context.Context, *QueryRecordsRequest) (*QueryRecordsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Records not implemented")
}
func (UnimplementedQueryServer) Record(context.Context, *QueryRecordRequest) (*QueryRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Record not implemented")
}
func (UnimplementedQueryServer) Protocols(context.Context, *QueryProtocolsRequest) (*QueryProtocolsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Protocols not implemented")
}
func (UnimplementedQueryServer) Protocol(context.Context, *QueryProtocolRequest) (*QueryProtocolResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Protocol not implemented")
}
func (UnimplementedQueryServer) Permissions(context.Context, *QueryPermissionsRequest) (*QueryPermissionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Permissions not implemented")
}
func (UnimplementedQueryServer) Vault(context.Context, *QueryVaultRequest) (*QueryVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Vault not implemented")
}
func (UnimplementedQueryServer) Vaults(context.Context, *QueryVaultsRequest) (*QueryVaultsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Vaults not implemented")
}
func (UnimplementedQueryServer) EncryptedRecord(context.Context, *QueryEncryptedRecordRequest) (*QueryEncryptedRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method EncryptedRecord not implemented")
}
func (UnimplementedQueryServer) EncryptionStatus(context.Context, *QueryEncryptionStatusRequest) (*QueryEncryptionStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method EncryptionStatus not implemented")
}
func (UnimplementedQueryServer) VRFContributions(context.Context, *QueryVRFContributionsRequest) (*QueryVRFContributionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VRFContributions not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_IPFS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryIPFSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).IPFS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_IPFS_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).IPFS(ctx, req.(*QueryIPFSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_CID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryCIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).CID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_CID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).CID(ctx, req.(*QueryCIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Records_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRecordsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Records(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Records_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Records(ctx, req.(*QueryRecordsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Record_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Record(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Record_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Record(ctx, req.(*QueryRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Protocols_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryProtocolsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Protocols(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Protocols_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Protocols(ctx, req.(*QueryProtocolsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Protocol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryProtocolRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Protocol(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Protocol_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Protocol(ctx, req.(*QueryProtocolRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Permissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryPermissionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Permissions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Permissions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Permissions(ctx, req.(*QueryPermissionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Vault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryVaultRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Vault(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Vault_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Vault(ctx, req.(*QueryVaultRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Vaults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryVaultsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Vaults(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Vaults_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Vaults(ctx, req.(*QueryVaultsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_EncryptedRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryEncryptedRecordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).EncryptedRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_EncryptedRecord_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).EncryptedRecord(ctx, req.(*QueryEncryptedRecordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_EncryptionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryEncryptionStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).EncryptionStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_EncryptionStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).EncryptionStatus(ctx, req.(*QueryEncryptionStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_VRFContributions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryVRFContributionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).VRFContributions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_VRFContributions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).VRFContributions(ctx, req.(*QueryVRFContributionsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dwn.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "IPFS",
Handler: _Query_IPFS_Handler,
},
{
MethodName: "CID",
Handler: _Query_CID_Handler,
},
{
MethodName: "Records",
Handler: _Query_Records_Handler,
},
{
MethodName: "Record",
Handler: _Query_Record_Handler,
},
{
MethodName: "Protocols",
Handler: _Query_Protocols_Handler,
},
{
MethodName: "Protocol",
Handler: _Query_Protocol_Handler,
},
{
MethodName: "Permissions",
Handler: _Query_Permissions_Handler,
},
{
MethodName: "Vault",
Handler: _Query_Vault_Handler,
},
{
MethodName: "Vaults",
Handler: _Query_Vaults_Handler,
},
{
MethodName: "EncryptedRecord",
Handler: _Query_EncryptedRecord_Handler,
},
{
MethodName: "EncryptionStatus",
Handler: _Query_EncryptionStatus_Handler,
},
{
MethodName: "VRFContributions",
Handler: _Query_VRFContributions_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dwn/v1/query.proto",
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+352
View File
@@ -0,0 +1,352 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: dwn/v1/tx.proto
package dwnv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Msg_UpdateParams_FullMethodName = "/dwn.v1.Msg/UpdateParams"
Msg_RecordsWrite_FullMethodName = "/dwn.v1.Msg/RecordsWrite"
Msg_RecordsDelete_FullMethodName = "/dwn.v1.Msg/RecordsDelete"
Msg_ProtocolsConfigure_FullMethodName = "/dwn.v1.Msg/ProtocolsConfigure"
Msg_PermissionsGrant_FullMethodName = "/dwn.v1.Msg/PermissionsGrant"
Msg_PermissionsRevoke_FullMethodName = "/dwn.v1.Msg/PermissionsRevoke"
Msg_RotateVaultKeys_FullMethodName = "/dwn.v1.Msg/RotateVaultKeys"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// DWN Records Operations
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dwn_docs.md"}}
RecordsWrite(ctx context.Context, in *MsgRecordsWrite, opts ...grpc.CallOption) (*MsgRecordsWriteResponse, error)
RecordsDelete(ctx context.Context, in *MsgRecordsDelete, opts ...grpc.CallOption) (*MsgRecordsDeleteResponse, error)
// DWN Protocols Operations
ProtocolsConfigure(ctx context.Context, in *MsgProtocolsConfigure, opts ...grpc.CallOption) (*MsgProtocolsConfigureResponse, error)
// DWN Permissions Operations
PermissionsGrant(ctx context.Context, in *MsgPermissionsGrant, opts ...grpc.CallOption) (*MsgPermissionsGrantResponse, error)
PermissionsRevoke(ctx context.Context, in *MsgPermissionsRevoke, opts ...grpc.CallOption) (*MsgPermissionsRevokeResponse, error)
// DWN Vault Operations
RotateVaultKeys(ctx context.Context, in *MsgRotateVaultKeys, opts ...grpc.CallOption) (*MsgRotateVaultKeysResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RecordsWrite(ctx context.Context, in *MsgRecordsWrite, opts ...grpc.CallOption) (*MsgRecordsWriteResponse, error) {
out := new(MsgRecordsWriteResponse)
err := c.cc.Invoke(ctx, Msg_RecordsWrite_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RecordsDelete(ctx context.Context, in *MsgRecordsDelete, opts ...grpc.CallOption) (*MsgRecordsDeleteResponse, error) {
out := new(MsgRecordsDeleteResponse)
err := c.cc.Invoke(ctx, Msg_RecordsDelete_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) ProtocolsConfigure(ctx context.Context, in *MsgProtocolsConfigure, opts ...grpc.CallOption) (*MsgProtocolsConfigureResponse, error) {
out := new(MsgProtocolsConfigureResponse)
err := c.cc.Invoke(ctx, Msg_ProtocolsConfigure_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) PermissionsGrant(ctx context.Context, in *MsgPermissionsGrant, opts ...grpc.CallOption) (*MsgPermissionsGrantResponse, error) {
out := new(MsgPermissionsGrantResponse)
err := c.cc.Invoke(ctx, Msg_PermissionsGrant_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) PermissionsRevoke(ctx context.Context, in *MsgPermissionsRevoke, opts ...grpc.CallOption) (*MsgPermissionsRevokeResponse, error) {
out := new(MsgPermissionsRevokeResponse)
err := c.cc.Invoke(ctx, Msg_PermissionsRevoke_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RotateVaultKeys(ctx context.Context, in *MsgRotateVaultKeys, opts ...grpc.CallOption) (*MsgRotateVaultKeysResponse, error) {
out := new(MsgRotateVaultKeysResponse)
err := c.cc.Invoke(ctx, Msg_RotateVaultKeys_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// DWN Records Operations
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "dwn_docs.md"}}
RecordsWrite(context.Context, *MsgRecordsWrite) (*MsgRecordsWriteResponse, error)
RecordsDelete(context.Context, *MsgRecordsDelete) (*MsgRecordsDeleteResponse, error)
// DWN Protocols Operations
ProtocolsConfigure(context.Context, *MsgProtocolsConfigure) (*MsgProtocolsConfigureResponse, error)
// DWN Permissions Operations
PermissionsGrant(context.Context, *MsgPermissionsGrant) (*MsgPermissionsGrantResponse, error)
PermissionsRevoke(context.Context, *MsgPermissionsRevoke) (*MsgPermissionsRevokeResponse, error)
// DWN Vault Operations
RotateVaultKeys(context.Context, *MsgRotateVaultKeys) (*MsgRotateVaultKeysResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) RecordsWrite(context.Context, *MsgRecordsWrite) (*MsgRecordsWriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RecordsWrite not implemented")
}
func (UnimplementedMsgServer) RecordsDelete(context.Context, *MsgRecordsDelete) (*MsgRecordsDeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RecordsDelete not implemented")
}
func (UnimplementedMsgServer) ProtocolsConfigure(context.Context, *MsgProtocolsConfigure) (*MsgProtocolsConfigureResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProtocolsConfigure not implemented")
}
func (UnimplementedMsgServer) PermissionsGrant(context.Context, *MsgPermissionsGrant) (*MsgPermissionsGrantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PermissionsGrant not implemented")
}
func (UnimplementedMsgServer) PermissionsRevoke(context.Context, *MsgPermissionsRevoke) (*MsgPermissionsRevokeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PermissionsRevoke not implemented")
}
func (UnimplementedMsgServer) RotateVaultKeys(context.Context, *MsgRotateVaultKeys) (*MsgRotateVaultKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RotateVaultKeys not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RecordsWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRecordsWrite)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RecordsWrite(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RecordsWrite_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RecordsWrite(ctx, req.(*MsgRecordsWrite))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RecordsDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRecordsDelete)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RecordsDelete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RecordsDelete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RecordsDelete(ctx, req.(*MsgRecordsDelete))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_ProtocolsConfigure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgProtocolsConfigure)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).ProtocolsConfigure(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_ProtocolsConfigure_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ProtocolsConfigure(ctx, req.(*MsgProtocolsConfigure))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_PermissionsGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgPermissionsGrant)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).PermissionsGrant(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_PermissionsGrant_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).PermissionsGrant(ctx, req.(*MsgPermissionsGrant))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_PermissionsRevoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgPermissionsRevoke)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).PermissionsRevoke(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_PermissionsRevoke_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).PermissionsRevoke(ctx, req.(*MsgPermissionsRevoke))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RotateVaultKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRotateVaultKeys)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).RotateVaultKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_RotateVaultKeys_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).RotateVaultKeys(ctx, req.(*MsgRotateVaultKeys))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dwn.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "RecordsWrite",
Handler: _Msg_RecordsWrite_Handler,
},
{
MethodName: "RecordsDelete",
Handler: _Msg_RecordsDelete_Handler,
},
{
MethodName: "ProtocolsConfigure",
Handler: _Msg_ProtocolsConfigure_Handler,
},
{
MethodName: "PermissionsGrant",
Handler: _Msg_PermissionsGrant_Handler,
},
{
MethodName: "PermissionsRevoke",
Handler: _Msg_PermissionsRevoke_Handler,
},
{
MethodName: "RotateVaultKeys",
Handler: _Msg_RotateVaultKeys_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dwn/v1/tx.proto",
}
-501
View File
@@ -1,501 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
md_Module protoreflect.MessageDescriptor
)
func init() {
file_macaroon_module_v1_module_proto_init()
md_Module = File_macaroon_module_v1_module_proto.Messages().ByName("Module")
}
var _ protoreflect.Message = (*fastReflection_Module)(nil)
type fastReflection_Module Module
func (x *Module) ProtoReflect() protoreflect.Message {
return (*fastReflection_Module)(x)
}
func (x *Module) slowProtoReflect() protoreflect.Message {
mi := &file_macaroon_module_v1_module_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_Module_messageType fastReflection_Module_messageType
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
type fastReflection_Module_messageType struct{}
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
return (*fastReflection_Module)(nil)
}
func (x fastReflection_Module_messageType) New() protoreflect.Message {
return new(fastReflection_Module)
}
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Module
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
return md_Module
}
// 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_Module) Type() protoreflect.MessageType {
return _fastReflection_Module_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Module) New() protoreflect.Message {
return new(fastReflection_Module)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
return (*Module)(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_Module) 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_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message macaroon.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in macaroon.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Module)
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().(*Module)
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().(*Module)
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: Module: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: macaroon/module/v1/module.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)
)
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
type Module struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *Module) Reset() {
*x = Module{}
if protoimpl.UnsafeEnabled {
mi := &file_macaroon_module_v1_module_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Module) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Module) ProtoMessage() {}
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
func (*Module) Descriptor() ([]byte, []int) {
return file_macaroon_module_v1_module_proto_rawDescGZIP(), []int{0}
}
var File_macaroon_module_v1_module_proto protoreflect.FileDescriptor
var file_macaroon_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x12, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70,
0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e,
0x72, 0x42, 0xc7, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73,
0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x61,
0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02,
0x12, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a,
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_macaroon_module_v1_module_proto_rawDescOnce sync.Once
file_macaroon_module_v1_module_proto_rawDescData = file_macaroon_module_v1_module_proto_rawDesc
)
func file_macaroon_module_v1_module_proto_rawDescGZIP() []byte {
file_macaroon_module_v1_module_proto_rawDescOnce.Do(func() {
file_macaroon_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_macaroon_module_v1_module_proto_rawDescData)
})
return file_macaroon_module_v1_module_proto_rawDescData
}
var file_macaroon_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_macaroon_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: macaroon.module.v1.Module
}
var file_macaroon_module_v1_module_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_macaroon_module_v1_module_proto_init() }
func file_macaroon_module_v1_module_proto_init() {
if File_macaroon_module_v1_module_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_macaroon_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Module); 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_macaroon_module_v1_module_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_macaroon_module_v1_module_proto_goTypes,
DependencyIndexes: file_macaroon_module_v1_module_proto_depIdxs,
MessageInfos: file_macaroon_module_v1_module_proto_msgTypes,
}.Build()
File_macaroon_module_v1_module_proto = out.File
file_macaroon_module_v1_module_proto_rawDesc = nil
file_macaroon_module_v1_module_proto_goTypes = nil
file_macaroon_module_v1_module_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-189
View File
@@ -1,189 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: macaroon/v1/query.proto
package macaroonv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/macaroon.v1.Query/Params"
Query_RefreshToken_FullMethodName = "/macaroon.v1.Query/RefreshToken"
Query_ValidateToken_FullMethodName = "/macaroon.v1.Query/ValidateToken"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// RefreshToken refreshes a macaroon token as post authentication.
RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error)
// ValidateToken validates a macaroon token as pre authentication.
ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error) {
out := new(QueryRefreshTokenResponse)
err := c.cc.Invoke(ctx, Query_RefreshToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error) {
out := new(QueryValidateTokenResponse)
err := c.cc.Invoke(ctx, Query_ValidateToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// RefreshToken refreshes a macaroon token as post authentication.
RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error)
// ValidateToken validates a macaroon token as pre authentication.
ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
}
func (UnimplementedQueryServer) ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRefreshTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RefreshToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_RefreshToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RefreshToken(ctx, req.(*QueryRefreshTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ValidateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidateTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ValidateToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ValidateToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ValidateToken(ctx, req.(*QueryValidateTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "RefreshToken",
Handler: _Query_RefreshToken_Handler,
},
{
MethodName: "ValidateToken",
Handler: _Query_ValidateToken_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "macaroon/v1/query.proto",
}
-206
View File
@@ -1,206 +0,0 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package macaroonv1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type GrantTable interface {
Insert(ctx context.Context, grant *Grant) error
InsertReturningId(ctx context.Context, grant *Grant) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, grant *Grant) error
Save(ctx context.Context, grant *Grant) error
Delete(ctx context.Context, grant *Grant) error
Has(ctx context.Context, id uint64) (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 uint64) (*Grant, 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) (*Grant, error)
List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error
DeleteRange(ctx context.Context, from, to GrantIndexKey) error
doNotImplement()
}
type GrantIterator struct {
ormtable.Iterator
}
func (i GrantIterator) Value() (*Grant, error) {
var grant Grant
err := i.UnmarshalMessage(&grant)
return &grant, err
}
type GrantIndexKey interface {
id() uint32
values() []interface{}
grantIndexKey()
}
// primary key starting index..
type GrantPrimaryKey = GrantIdIndexKey
type GrantIdIndexKey struct {
vs []interface{}
}
func (x GrantIdIndexKey) id() uint32 { return 0 }
func (x GrantIdIndexKey) values() []interface{} { return x.vs }
func (x GrantIdIndexKey) grantIndexKey() {}
func (this GrantIdIndexKey) WithId(id uint64) GrantIdIndexKey {
this.vs = []interface{}{id}
return this
}
type GrantSubjectOriginIndexKey struct {
vs []interface{}
}
func (x GrantSubjectOriginIndexKey) id() uint32 { return 1 }
func (x GrantSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x GrantSubjectOriginIndexKey) grantIndexKey() {}
func (this GrantSubjectOriginIndexKey) WithSubject(subject string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this GrantSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type grantTable struct {
table ormtable.AutoIncrementTable
}
func (this grantTable) Insert(ctx context.Context, grant *Grant) error {
return this.table.Insert(ctx, grant)
}
func (this grantTable) Update(ctx context.Context, grant *Grant) error {
return this.table.Update(ctx, grant)
}
func (this grantTable) Save(ctx context.Context, grant *Grant) error {
return this.table.Save(ctx, grant)
}
func (this grantTable) Delete(ctx context.Context, grant *Grant) error {
return this.table.Delete(ctx, grant)
}
func (this grantTable) InsertReturningId(ctx context.Context, grant *Grant) (uint64, error) {
return this.table.InsertReturningPKey(ctx, grant)
}
func (this grantTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this grantTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this grantTable) Get(ctx context.Context, id uint64) (*Grant, error) {
var grant Grant
found, err := this.table.PrimaryKey().Get(ctx, &grant, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) 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 grantTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error) {
var grant Grant
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &grant,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this grantTable) DeleteRange(ctx context.Context, from, to GrantIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this grantTable) doNotImplement() {}
var _ GrantTable = grantTable{}
func NewGrantTable(db ormtable.Schema) (GrantTable, error) {
table := db.GetTable(&Grant{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Grant{}).ProtoReflect().Descriptor().FullName()))
}
return grantTable{table.(ormtable.AutoIncrementTable)}, nil
}
type StateStore interface {
GrantTable() GrantTable
doNotImplement()
}
type stateStore struct {
grant GrantTable
}
func (x stateStore) GrantTable() GrantTable {
return x.grant
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
grantTable, err := NewGrantTable(db)
if err != nil {
return nil, err
}
return stateStore{
grantTable,
}, nil
}
-832
View File
@@ -1,832 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package macaroonv1
import (
_ "cosmossdk.io/api/cosmos/orm/v1"
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
md_Grant protoreflect.MessageDescriptor
fd_Grant_id protoreflect.FieldDescriptor
fd_Grant_controller protoreflect.FieldDescriptor
fd_Grant_subject protoreflect.FieldDescriptor
fd_Grant_origin protoreflect.FieldDescriptor
fd_Grant_expiry_height protoreflect.FieldDescriptor
)
func init() {
file_macaroon_v1_state_proto_init()
md_Grant = File_macaroon_v1_state_proto.Messages().ByName("Grant")
fd_Grant_id = md_Grant.Fields().ByName("id")
fd_Grant_controller = md_Grant.Fields().ByName("controller")
fd_Grant_subject = md_Grant.Fields().ByName("subject")
fd_Grant_origin = md_Grant.Fields().ByName("origin")
fd_Grant_expiry_height = md_Grant.Fields().ByName("expiry_height")
}
var _ protoreflect.Message = (*fastReflection_Grant)(nil)
type fastReflection_Grant Grant
func (x *Grant) ProtoReflect() protoreflect.Message {
return (*fastReflection_Grant)(x)
}
func (x *Grant) slowProtoReflect() protoreflect.Message {
mi := &file_macaroon_v1_state_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Grant_messageType fastReflection_Grant_messageType
var _ protoreflect.MessageType = fastReflection_Grant_messageType{}
type fastReflection_Grant_messageType struct{}
func (x fastReflection_Grant_messageType) Zero() protoreflect.Message {
return (*fastReflection_Grant)(nil)
}
func (x fastReflection_Grant_messageType) New() protoreflect.Message {
return new(fastReflection_Grant)
}
func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Grant
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor {
return md_Grant
}
// 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_Grant) Type() protoreflect.MessageType {
return _fastReflection_Grant_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Grant) New() protoreflect.Message {
return new(fastReflection_Grant)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage {
return (*Grant)(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_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Id != uint64(0) {
value := protoreflect.ValueOfUint64(x.Id)
if !f(fd_Grant_id, value) {
return
}
}
if x.Controller != "" {
value := protoreflect.ValueOfString(x.Controller)
if !f(fd_Grant_controller, value) {
return
}
}
if x.Subject != "" {
value := protoreflect.ValueOfString(x.Subject)
if !f(fd_Grant_subject, value) {
return
}
}
if x.Origin != "" {
value := protoreflect.ValueOfString(x.Origin)
if !f(fd_Grant_origin, value) {
return
}
}
if x.ExpiryHeight != int64(0) {
value := protoreflect.ValueOfInt64(x.ExpiryHeight)
if !f(fd_Grant_expiry_height, 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_Grant) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "macaroon.v1.Grant.id":
return x.Id != uint64(0)
case "macaroon.v1.Grant.controller":
return x.Controller != ""
case "macaroon.v1.Grant.subject":
return x.Subject != ""
case "macaroon.v1.Grant.origin":
return x.Origin != ""
case "macaroon.v1.Grant.expiry_height":
return x.ExpiryHeight != int64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "macaroon.v1.Grant.id":
x.Id = uint64(0)
case "macaroon.v1.Grant.controller":
x.Controller = ""
case "macaroon.v1.Grant.subject":
x.Subject = ""
case "macaroon.v1.Grant.origin":
x.Origin = ""
case "macaroon.v1.Grant.expiry_height":
x.ExpiryHeight = int64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "macaroon.v1.Grant.id":
value := x.Id
return protoreflect.ValueOfUint64(value)
case "macaroon.v1.Grant.controller":
value := x.Controller
return protoreflect.ValueOfString(value)
case "macaroon.v1.Grant.subject":
value := x.Subject
return protoreflect.ValueOfString(value)
case "macaroon.v1.Grant.origin":
value := x.Origin
return protoreflect.ValueOfString(value)
case "macaroon.v1.Grant.expiry_height":
value := x.ExpiryHeight
return protoreflect.ValueOfInt64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "macaroon.v1.Grant.id":
x.Id = value.Uint()
case "macaroon.v1.Grant.controller":
x.Controller = value.Interface().(string)
case "macaroon.v1.Grant.subject":
x.Subject = value.Interface().(string)
case "macaroon.v1.Grant.origin":
x.Origin = value.Interface().(string)
case "macaroon.v1.Grant.expiry_height":
x.ExpiryHeight = value.Int()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "macaroon.v1.Grant.id":
panic(fmt.Errorf("field id of message macaroon.v1.Grant is not mutable"))
case "macaroon.v1.Grant.controller":
panic(fmt.Errorf("field controller of message macaroon.v1.Grant is not mutable"))
case "macaroon.v1.Grant.subject":
panic(fmt.Errorf("field subject of message macaroon.v1.Grant is not mutable"))
case "macaroon.v1.Grant.origin":
panic(fmt.Errorf("field origin of message macaroon.v1.Grant is not mutable"))
case "macaroon.v1.Grant.expiry_height":
panic(fmt.Errorf("field expiry_height of message macaroon.v1.Grant is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "macaroon.v1.Grant.id":
return protoreflect.ValueOfUint64(uint64(0))
case "macaroon.v1.Grant.controller":
return protoreflect.ValueOfString("")
case "macaroon.v1.Grant.subject":
return protoreflect.ValueOfString("")
case "macaroon.v1.Grant.origin":
return protoreflect.ValueOfString("")
case "macaroon.v1.Grant.expiry_height":
return protoreflect.ValueOfInt64(int64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Grant"))
}
panic(fmt.Errorf("message macaroon.v1.Grant 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_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in macaroon.v1.Grant", 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_Grant) 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_Grant) 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_Grant) 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_Grant) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Grant)
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.Id != 0 {
n += 1 + runtime.Sov(uint64(x.Id))
}
l = len(x.Controller)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Subject)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Origin)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.ExpiryHeight != 0 {
n += 1 + runtime.Sov(uint64(x.ExpiryHeight))
}
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().(*Grant)
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.ExpiryHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight))
i--
dAtA[i] = 0x28
}
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.Subject) > 0 {
i -= len(x.Subject)
copy(dAtA[i:], x.Subject)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
i--
dAtA[i] = 0x1a
}
if len(x.Controller) > 0 {
i -= len(x.Controller)
copy(dAtA[i:], x.Controller)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
i--
dAtA[i] = 0x12
}
if x.Id != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Id))
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().(*Grant)
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: Grant: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: 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 Id", wireType)
}
x.Id = 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.Id |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType)
}
x.ExpiryHeight = 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.ExpiryHeight |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: macaroon/v1/state.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)
)
type Grant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
}
func (x *Grant) Reset() {
*x = Grant{}
if protoimpl.UnsafeEnabled {
mi := &file_macaroon_v1_state_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Grant) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Grant) ProtoMessage() {}
// Deprecated: Use Grant.ProtoReflect.Descriptor instead.
func (*Grant) Descriptor() ([]byte, []int) {
return file_macaroon_v1_state_proto_rawDescGZIP(), []int{0}
}
func (x *Grant) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Grant) GetController() string {
if x != nil {
return x.Controller
}
return ""
}
func (x *Grant) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *Grant) GetOrigin() string {
if x != nil {
return x.Origin
}
return ""
}
func (x *Grant) GetExpiryHeight() int64 {
if x != nil {
return x.ExpiryHeight
}
return 0
}
var File_macaroon_v1_state_proto protoreflect.FileDescriptor
var file_macaroon_v1_state_proto_rawDesc = []byte{
0x0a, 0x17, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74,
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x63, 0x61, 0x72,
0x6f, 0x6f, 0x6e, 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, 0x22,
0xb6, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 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, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65,
0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74,
0x3a, 0x26, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x20, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01,
0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74,
0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f,
0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03,
0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56,
0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61,
0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_macaroon_v1_state_proto_rawDescOnce sync.Once
file_macaroon_v1_state_proto_rawDescData = file_macaroon_v1_state_proto_rawDesc
)
func file_macaroon_v1_state_proto_rawDescGZIP() []byte {
file_macaroon_v1_state_proto_rawDescOnce.Do(func() {
file_macaroon_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_macaroon_v1_state_proto_rawDescData)
})
return file_macaroon_v1_state_proto_rawDescData
}
var file_macaroon_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_macaroon_v1_state_proto_goTypes = []interface{}{
(*Grant)(nil), // 0: macaroon.v1.Grant
}
var file_macaroon_v1_state_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_macaroon_v1_state_proto_init() }
func file_macaroon_v1_state_proto_init() {
if File_macaroon_v1_state_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_macaroon_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Grant); 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_macaroon_v1_state_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_macaroon_v1_state_proto_goTypes,
DependencyIndexes: file_macaroon_v1_state_proto_depIdxs,
MessageInfos: file_macaroon_v1_state_proto_msgTypes,
}.Build()
File_macaroon_v1_state_proto = out.File
file_macaroon_v1_state_proto_rawDesc = nil
file_macaroon_v1_state_proto_goTypes = nil
file_macaroon_v1_state_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
-156
View File
@@ -1,156 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: macaroon/v1/tx.proto
package macaroonv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
Msg_IssueMacaroon_FullMethodName = "/macaroon.v1.Msg/IssueMacaroon"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// IssueMacaroon asserts the given controller is the owner of the given
// address.
IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
out := new(MsgIssueMacaroonResponse)
err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// IssueMacaroon asserts the given controller is the owner of the given
// address.
IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgIssueMacaroon)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).IssueMacaroon(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_IssueMacaroon_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).IssueMacaroon(ctx, req.(*MsgIssueMacaroon))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "IssueMacaroon",
Handler: _Msg_IssueMacaroon_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "macaroon/v1/tx.proto",
}
File diff suppressed because it is too large Load Diff
-996
View File
@@ -1,996 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package oraclev1
import (
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
_ "google.golang.org/genproto/googleapis/api/annotations"
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"
sync "sync"
)
var (
md_QueryParamsRequest protoreflect.MessageDescriptor
)
func init() {
file_oracle_v1_query_proto_init()
md_QueryParamsRequest = File_oracle_v1_query_proto.Messages().ByName("QueryParamsRequest")
}
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
type fastReflection_QueryParamsRequest QueryParamsRequest
func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
return (*fastReflection_QueryParamsRequest)(x)
}
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
mi := &file_oracle_v1_query_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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType
var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{}
type fastReflection_QueryParamsRequest_messageType struct{}
func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message {
return (*fastReflection_QueryParamsRequest)(nil)
}
func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message {
return new(fastReflection_QueryParamsRequest)
}
func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsRequest
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsRequest
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType {
return _fastReflection_QueryParamsRequest_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message {
return new(fastReflection_QueryParamsRequest)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage {
return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*QueryParamsRequest)
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().(*QueryParamsRequest)
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().(*QueryParamsRequest)
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: QueryParamsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
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_QueryParamsResponse protoreflect.MessageDescriptor
fd_QueryParamsResponse_params protoreflect.FieldDescriptor
)
func init() {
file_oracle_v1_query_proto_init()
md_QueryParamsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryParamsResponse")
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
}
var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil)
type fastReflection_QueryParamsResponse QueryParamsResponse
func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
return (*fastReflection_QueryParamsResponse)(x)
}
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
mi := &file_oracle_v1_query_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType
var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{}
type fastReflection_QueryParamsResponse_messageType struct{}
func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message {
return (*fastReflection_QueryParamsResponse)(nil)
}
func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message {
return new(fastReflection_QueryParamsResponse)
}
func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsResponse
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsResponse
}
// 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_QueryParamsResponse) Type() protoreflect.MessageType {
return _fastReflection_QueryParamsResponse_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message {
return new(fastReflection_QueryParamsResponse)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage {
return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Params != nil {
value := protoreflect.ValueOfMessage(x.Params.ProtoReflect())
if !f(fd_QueryParamsResponse_params, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "oracle.v1.QueryParamsResponse.params":
return x.Params != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "oracle.v1.QueryParamsResponse.params":
x.Params = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "oracle.v1.QueryParamsResponse.params":
value := x.Params
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "oracle.v1.QueryParamsResponse.params":
x.Params = value.Message().Interface().(*Params)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "oracle.v1.QueryParamsResponse.params":
if x.Params == nil {
x.Params = new(Params)
}
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "oracle.v1.QueryParamsResponse.params":
m := new(Params)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*QueryParamsResponse)
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.Params != nil {
l = options.Size(x.Params)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*QueryParamsResponse)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Params != nil {
encoded, err := options.Marshal(x.Params)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 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().(*QueryParamsResponse)
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: QueryParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Params == nil {
x.Params = &Params{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: oracle/v1/query.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)
)
// QueryParamsRequest is the request type for the Query/Params RPC method.
type QueryParamsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *QueryParamsRequest) Reset() {
*x = QueryParamsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_oracle_v1_query_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParamsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParamsRequest) ProtoMessage() {}
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
return file_oracle_v1_query_proto_rawDescGZIP(), []int{0}
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
type QueryParamsResponse struct {
state protoimpl.MessageState
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"`
}
func (x *QueryParamsResponse) Reset() {
*x = QueryParamsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_oracle_v1_query_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParamsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParamsResponse) ProtoMessage() {}
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
return file_oracle_v1_query_proto_rawDescGZIP(), []int{1}
}
func (x *QueryParamsResponse) GetParams() *Params {
if x != nil {
return x.Params
}
return nil
}
var File_oracle_v1_query_proto protoreflect.FileDescriptor
var file_oracle_v1_query_proto_rawDesc = []byte{
0x0a, 0x15, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72,
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 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, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65,
0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65,
0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x40, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x32, 0x6b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x62, 0x0a, 0x06, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6f, 0x72,
0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x8f,
0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c,
0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03,
0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca,
0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72,
0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_oracle_v1_query_proto_rawDescOnce sync.Once
file_oracle_v1_query_proto_rawDescData = file_oracle_v1_query_proto_rawDesc
)
func file_oracle_v1_query_proto_rawDescGZIP() []byte {
file_oracle_v1_query_proto_rawDescOnce.Do(func() {
file_oracle_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_query_proto_rawDescData)
})
return file_oracle_v1_query_proto_rawDescData
}
var file_oracle_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_oracle_v1_query_proto_goTypes = []interface{}{
(*QueryParamsRequest)(nil), // 0: oracle.v1.QueryParamsRequest
(*QueryParamsResponse)(nil), // 1: oracle.v1.QueryParamsResponse
(*Params)(nil), // 2: oracle.v1.Params
}
var file_oracle_v1_query_proto_depIdxs = []int32{
2, // 0: oracle.v1.QueryParamsResponse.params:type_name -> oracle.v1.Params
0, // 1: oracle.v1.Query.Params:input_type -> oracle.v1.QueryParamsRequest
1, // 2: oracle.v1.Query.Params:output_type -> oracle.v1.QueryParamsResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_oracle_v1_query_proto_init() }
func file_oracle_v1_query_proto_init() {
if File_oracle_v1_query_proto != nil {
return
}
file_oracle_v1_genesis_proto_init()
if !protoimpl.UnsafeEnabled {
file_oracle_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryParamsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_oracle_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryParamsResponse); 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_oracle_v1_query_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_oracle_v1_query_proto_goTypes,
DependencyIndexes: file_oracle_v1_query_proto_depIdxs,
MessageInfos: file_oracle_v1_query_proto_msgTypes,
}.Build()
File_oracle_v1_query_proto = out.File
file_oracle_v1_query_proto_rawDesc = nil
file_oracle_v1_query_proto_goTypes = nil
file_oracle_v1_query_proto_depIdxs = nil
}
-111
View File
@@ -1,111 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: oracle/v1/query.proto
package oraclev1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/oracle.v1.Query/Params"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "oracle.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "oracle/v1/query.proto",
}
-342
View File
@@ -1,342 +0,0 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package oraclev1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type BalanceTable interface {
Insert(ctx context.Context, balance *Balance) error
Update(ctx context.Context, balance *Balance) error
Save(ctx context.Context, balance *Balance) error
Delete(ctx context.Context, balance *Balance) error
Has(ctx context.Context, account 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, account string) (*Balance, error)
List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error
DeleteRange(ctx context.Context, from, to BalanceIndexKey) error
doNotImplement()
}
type BalanceIterator struct {
ormtable.Iterator
}
func (i BalanceIterator) Value() (*Balance, error) {
var balance Balance
err := i.UnmarshalMessage(&balance)
return &balance, err
}
type BalanceIndexKey interface {
id() uint32
values() []interface{}
balanceIndexKey()
}
// primary key starting index..
type BalancePrimaryKey = BalanceAccountIndexKey
type BalanceAccountIndexKey struct {
vs []interface{}
}
func (x BalanceAccountIndexKey) id() uint32 { return 0 }
func (x BalanceAccountIndexKey) values() []interface{} { return x.vs }
func (x BalanceAccountIndexKey) balanceIndexKey() {}
func (this BalanceAccountIndexKey) WithAccount(account string) BalanceAccountIndexKey {
this.vs = []interface{}{account}
return this
}
type BalanceAmountIndexKey struct {
vs []interface{}
}
func (x BalanceAmountIndexKey) id() uint32 { return 1 }
func (x BalanceAmountIndexKey) values() []interface{} { return x.vs }
func (x BalanceAmountIndexKey) balanceIndexKey() {}
func (this BalanceAmountIndexKey) WithAmount(amount uint64) BalanceAmountIndexKey {
this.vs = []interface{}{amount}
return this
}
type balanceTable struct {
table ormtable.Table
}
func (this balanceTable) Insert(ctx context.Context, balance *Balance) error {
return this.table.Insert(ctx, balance)
}
func (this balanceTable) Update(ctx context.Context, balance *Balance) error {
return this.table.Update(ctx, balance)
}
func (this balanceTable) Save(ctx context.Context, balance *Balance) error {
return this.table.Save(ctx, balance)
}
func (this balanceTable) Delete(ctx context.Context, balance *Balance) error {
return this.table.Delete(ctx, balance)
}
func (this balanceTable) Has(ctx context.Context, account string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, account)
}
func (this balanceTable) Get(ctx context.Context, account string) (*Balance, error) {
var balance Balance
found, err := this.table.PrimaryKey().Get(ctx, &balance, account)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &balance, nil
}
func (this balanceTable) List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return BalanceIterator{it}, err
}
func (this balanceTable) ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return BalanceIterator{it}, err
}
func (this balanceTable) DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this balanceTable) DeleteRange(ctx context.Context, from, to BalanceIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this balanceTable) doNotImplement() {}
var _ BalanceTable = balanceTable{}
func NewBalanceTable(db ormtable.Schema) (BalanceTable, error) {
table := db.GetTable(&Balance{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Balance{}).ProtoReflect().Descriptor().FullName()))
}
return balanceTable{table}, nil
}
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
Has(ctx context.Context, id uint64) (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 uint64) (*Account, error)
HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error)
// GetByAddressChainNetwork returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*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
doNotImplement()
}
type AccountIterator struct {
ormtable.Iterator
}
func (i AccountIterator) Value() (*Account, error) {
var account Account
err := i.UnmarshalMessage(&account)
return &account, err
}
type AccountIndexKey interface {
id() uint32
values() []interface{}
accountIndexKey()
}
// primary key starting index..
type AccountPrimaryKey = AccountIdIndexKey
type AccountIdIndexKey struct {
vs []interface{}
}
func (x AccountIdIndexKey) id() uint32 { return 0 }
func (x AccountIdIndexKey) values() []interface{} { return x.vs }
func (x AccountIdIndexKey) accountIndexKey() {}
func (this AccountIdIndexKey) WithId(id uint64) AccountIdIndexKey {
this.vs = []interface{}{id}
return this
}
type AccountAddressChainNetworkIndexKey struct {
vs []interface{}
}
func (x AccountAddressChainNetworkIndexKey) id() uint32 { return 1 }
func (x AccountAddressChainNetworkIndexKey) values() []interface{} { return x.vs }
func (x AccountAddressChainNetworkIndexKey) accountIndexKey() {}
func (this AccountAddressChainNetworkIndexKey) WithAddress(address string) AccountAddressChainNetworkIndexKey {
this.vs = []interface{}{address}
return this
}
func (this AccountAddressChainNetworkIndexKey) WithAddressChain(address string, chain string) AccountAddressChainNetworkIndexKey {
this.vs = []interface{}{address, chain}
return this
}
func (this AccountAddressChainNetworkIndexKey) WithAddressChainNetwork(address string, chain string, network string) AccountAddressChainNetworkIndexKey {
this.vs = []interface{}{address, chain, network}
return this
}
type accountTable struct {
table ormtable.Table
}
func (this accountTable) Insert(ctx context.Context, account *Account) error {
return this.table.Insert(ctx, account)
}
func (this accountTable) Update(ctx context.Context, account *Account) error {
return this.table.Update(ctx, account)
}
func (this accountTable) Save(ctx context.Context, account *Account) error {
return this.table.Save(ctx, account)
}
func (this accountTable) Delete(ctx context.Context, account *Account) error {
return this.table.Delete(ctx, account)
}
func (this accountTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this accountTable) Get(ctx context.Context, id uint64) (*Account, error) {
var account Account
found, err := this.table.PrimaryKey().Get(ctx, &account, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &account, nil
}
func (this accountTable) HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
address,
chain,
network,
)
}
func (this accountTable) GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*Account, error) {
var account Account
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
address,
chain,
network,
)
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) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return AccountIterator{it}, err
}
func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return AccountIterator{it}, err
}
func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this accountTable) doNotImplement() {}
var _ AccountTable = accountTable{}
func NewAccountTable(db ormtable.Schema) (AccountTable, error) {
table := db.GetTable(&Account{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName()))
}
return accountTable{table}, nil
}
type StateStore interface {
BalanceTable() BalanceTable
AccountTable() AccountTable
doNotImplement()
}
type stateStore struct {
balance BalanceTable
account AccountTable
}
func (x stateStore) BalanceTable() BalanceTable {
return x.balance
}
func (x stateStore) AccountTable() AccountTable {
return x.account
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
balanceTable, err := NewBalanceTable(db)
if err != nil {
return nil, err
}
accountTable, err := NewAccountTable(db)
if err != nil {
return nil, err
}
return stateStore{
balanceTable,
accountTable,
}, nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-115
View File
@@ -1,115 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: oracle/v1/tx.proto
package oraclev1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Msg_UpdateParams_FullMethodName = "/oracle.v1.Msg/UpdateParams"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "oracle.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "oracle/v1/tx.proto",
}
-997
View File
@@ -1,997 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package servicev1
import (
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
_ "google.golang.org/genproto/googleapis/api/annotations"
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"
sync "sync"
)
var (
md_QueryParamsRequest protoreflect.MessageDescriptor
)
func init() {
file_service_v1_query_proto_init()
md_QueryParamsRequest = File_service_v1_query_proto.Messages().ByName("QueryParamsRequest")
}
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
type fastReflection_QueryParamsRequest QueryParamsRequest
func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
return (*fastReflection_QueryParamsRequest)(x)
}
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
mi := &file_service_v1_query_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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType
var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{}
type fastReflection_QueryParamsRequest_messageType struct{}
func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message {
return (*fastReflection_QueryParamsRequest)(nil)
}
func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message {
return new(fastReflection_QueryParamsRequest)
}
func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsRequest
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsRequest
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType {
return _fastReflection_QueryParamsRequest_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message {
return new(fastReflection_QueryParamsRequest)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage {
return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest"))
}
panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*QueryParamsRequest)
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().(*QueryParamsRequest)
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().(*QueryParamsRequest)
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: QueryParamsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
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_QueryParamsResponse protoreflect.MessageDescriptor
fd_QueryParamsResponse_params protoreflect.FieldDescriptor
)
func init() {
file_service_v1_query_proto_init()
md_QueryParamsResponse = File_service_v1_query_proto.Messages().ByName("QueryParamsResponse")
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
}
var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil)
type fastReflection_QueryParamsResponse QueryParamsResponse
func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
return (*fastReflection_QueryParamsResponse)(x)
}
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
mi := &file_service_v1_query_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType
var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{}
type fastReflection_QueryParamsResponse_messageType struct{}
func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message {
return (*fastReflection_QueryParamsResponse)(nil)
}
func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message {
return new(fastReflection_QueryParamsResponse)
}
func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsResponse
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor {
return md_QueryParamsResponse
}
// 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_QueryParamsResponse) Type() protoreflect.MessageType {
return _fastReflection_QueryParamsResponse_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message {
return new(fastReflection_QueryParamsResponse)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage {
return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Params != nil {
value := protoreflect.ValueOfMessage(x.Params.ProtoReflect())
if !f(fd_QueryParamsResponse_params, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "service.v1.QueryParamsResponse.params":
return x.Params != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "service.v1.QueryParamsResponse.params":
x.Params = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "service.v1.QueryParamsResponse.params":
value := x.Params
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "service.v1.QueryParamsResponse.params":
x.Params = value.Message().Interface().(*Params)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "service.v1.QueryParamsResponse.params":
if x.Params == nil {
x.Params = new(Params)
}
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "service.v1.QueryParamsResponse.params":
m := new(Params)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse"))
}
panic(fmt.Errorf("message service.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*QueryParamsResponse)
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.Params != nil {
l = options.Size(x.Params)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*QueryParamsResponse)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Params != nil {
encoded, err := options.Marshal(x.Params)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 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().(*QueryParamsResponse)
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: QueryParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Params == nil {
x.Params = &Params{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: service/v1/query.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)
)
// QueryParamsRequest is the request type for the Query/Params RPC method.
type QueryParamsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *QueryParamsRequest) Reset() {
*x = QueryParamsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_v1_query_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParamsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParamsRequest) ProtoMessage() {}
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
return file_service_v1_query_proto_rawDescGZIP(), []int{0}
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
type QueryParamsResponse struct {
state protoimpl.MessageState
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"`
}
func (x *QueryParamsResponse) Reset() {
*x = QueryParamsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_v1_query_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryParamsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryParamsResponse) ProtoMessage() {}
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
return file_service_v1_query_proto_rawDescGZIP(), []int{1}
}
func (x *QueryParamsResponse) GetParams() *Params {
if x != nil {
return x.Params
}
return nil
}
var File_service_v1_query_proto protoreflect.FileDescriptor
var file_service_v1_query_proto_rawDesc = []byte{
0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65,
0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 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, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67,
0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12,
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x41, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x6e, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x65,
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x14, 0x12, 0x12, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x96, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 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, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0xea, 0x02, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_v1_query_proto_rawDescOnce sync.Once
file_service_v1_query_proto_rawDescData = file_service_v1_query_proto_rawDesc
)
func file_service_v1_query_proto_rawDescGZIP() []byte {
file_service_v1_query_proto_rawDescOnce.Do(func() {
file_service_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_query_proto_rawDescData)
})
return file_service_v1_query_proto_rawDescData
}
var file_service_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_service_v1_query_proto_goTypes = []interface{}{
(*QueryParamsRequest)(nil), // 0: service.v1.QueryParamsRequest
(*QueryParamsResponse)(nil), // 1: service.v1.QueryParamsResponse
(*Params)(nil), // 2: service.v1.Params
}
var file_service_v1_query_proto_depIdxs = []int32{
2, // 0: service.v1.QueryParamsResponse.params:type_name -> service.v1.Params
0, // 1: service.v1.Query.Params:input_type -> service.v1.QueryParamsRequest
1, // 2: service.v1.Query.Params:output_type -> service.v1.QueryParamsResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_service_v1_query_proto_init() }
func file_service_v1_query_proto_init() {
if File_service_v1_query_proto != nil {
return
}
file_service_v1_genesis_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryParamsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryParamsResponse); 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_service_v1_query_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_v1_query_proto_goTypes,
DependencyIndexes: file_service_v1_query_proto_depIdxs,
MessageInfos: file_service_v1_query_proto_msgTypes,
}.Build()
File_service_v1_query_proto = out.File
file_service_v1_query_proto_rawDesc = nil
file_service_v1_query_proto_goTypes = nil
file_service_v1_query_proto_depIdxs = nil
}
-111
View File
@@ -1,111 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: service/v1/query.proto
package servicev1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/service.v1.Query/Params"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "service.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service/v1/query.proto",
}
-368
View File
@@ -1,368 +0,0 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package servicev1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type MetadataTable interface {
Insert(ctx context.Context, metadata *Metadata) error
InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, metadata *Metadata) error
Save(ctx context.Context, metadata *Metadata) error
Delete(ctx context.Context, metadata *Metadata) error
Has(ctx context.Context, id uint64) (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 uint64) (*Metadata, 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) (*Metadata, error)
List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error
DeleteRange(ctx context.Context, from, to MetadataIndexKey) error
doNotImplement()
}
type MetadataIterator struct {
ormtable.Iterator
}
func (i MetadataIterator) Value() (*Metadata, error) {
var metadata Metadata
err := i.UnmarshalMessage(&metadata)
return &metadata, err
}
type MetadataIndexKey interface {
id() uint32
values() []interface{}
metadataIndexKey()
}
// primary key starting index..
type MetadataPrimaryKey = MetadataIdIndexKey
type MetadataIdIndexKey struct {
vs []interface{}
}
func (x MetadataIdIndexKey) id() uint32 { return 0 }
func (x MetadataIdIndexKey) values() []interface{} { return x.vs }
func (x MetadataIdIndexKey) metadataIndexKey() {}
func (this MetadataIdIndexKey) WithId(id uint64) MetadataIdIndexKey {
this.vs = []interface{}{id}
return this
}
type MetadataOriginIndexKey struct {
vs []interface{}
}
func (x MetadataOriginIndexKey) id() uint32 { return 1 }
func (x MetadataOriginIndexKey) values() []interface{} { return x.vs }
func (x MetadataOriginIndexKey) metadataIndexKey() {}
func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey {
this.vs = []interface{}{origin}
return this
}
type metadataTable struct {
table ormtable.AutoIncrementTable
}
func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error {
return this.table.Insert(ctx, metadata)
}
func (this metadataTable) Update(ctx context.Context, metadata *Metadata) error {
return this.table.Update(ctx, metadata)
}
func (this metadataTable) Save(ctx context.Context, metadata *Metadata) error {
return this.table.Save(ctx, metadata)
}
func (this metadataTable) Delete(ctx context.Context, metadata *Metadata) error {
return this.table.Delete(ctx, metadata)
}
func (this metadataTable) InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) {
return this.table.InsertReturningPKey(ctx, metadata)
}
func (this metadataTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this metadataTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) {
var metadata Metadata
found, err := this.table.PrimaryKey().Get(ctx, &metadata, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &metadata, nil
}
func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
origin,
)
}
func (this metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) {
var metadata Metadata
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &metadata, nil
}
func (this metadataTable) List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return MetadataIterator{it}, err
}
func (this metadataTable) ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return MetadataIterator{it}, err
}
func (this metadataTable) DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this metadataTable) DeleteRange(ctx context.Context, from, to MetadataIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this metadataTable) doNotImplement() {}
var _ MetadataTable = metadataTable{}
func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) {
table := db.GetTable(&Metadata{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName()))
}
return metadataTable{table.(ormtable.AutoIncrementTable)}, nil
}
type ProfileTable interface {
Insert(ctx context.Context, profile *Profile) error
Update(ctx context.Context, profile *Profile) error
Save(ctx context.Context, profile *Profile) error
Delete(ctx context.Context, profile *Profile) 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) (*Profile, 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) (*Profile, error)
List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error
DeleteRange(ctx context.Context, from, to ProfileIndexKey) error
doNotImplement()
}
type ProfileIterator struct {
ormtable.Iterator
}
func (i ProfileIterator) Value() (*Profile, error) {
var profile Profile
err := i.UnmarshalMessage(&profile)
return &profile, err
}
type ProfileIndexKey interface {
id() uint32
values() []interface{}
profileIndexKey()
}
// primary key starting index..
type ProfilePrimaryKey = ProfileIdIndexKey
type ProfileIdIndexKey struct {
vs []interface{}
}
func (x ProfileIdIndexKey) id() uint32 { return 0 }
func (x ProfileIdIndexKey) values() []interface{} { return x.vs }
func (x ProfileIdIndexKey) profileIndexKey() {}
func (this ProfileIdIndexKey) WithId(id string) ProfileIdIndexKey {
this.vs = []interface{}{id}
return this
}
type ProfileSubjectOriginIndexKey struct {
vs []interface{}
}
func (x ProfileSubjectOriginIndexKey) id() uint32 { return 1 }
func (x ProfileSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x ProfileSubjectOriginIndexKey) profileIndexKey() {}
func (this ProfileSubjectOriginIndexKey) WithSubject(subject string) ProfileSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this ProfileSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) ProfileSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type profileTable struct {
table ormtable.Table
}
func (this profileTable) Insert(ctx context.Context, profile *Profile) error {
return this.table.Insert(ctx, profile)
}
func (this profileTable) Update(ctx context.Context, profile *Profile) error {
return this.table.Update(ctx, profile)
}
func (this profileTable) Save(ctx context.Context, profile *Profile) error {
return this.table.Save(ctx, profile)
}
func (this profileTable) Delete(ctx context.Context, profile *Profile) error {
return this.table.Delete(ctx, profile)
}
func (this profileTable) Has(ctx context.Context, id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this profileTable) Get(ctx context.Context, id string) (*Profile, error) {
var profile Profile
found, err := this.table.PrimaryKey().Get(ctx, &profile, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &profile, nil
}
func (this profileTable) 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 profileTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) {
var profile Profile
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &profile,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &profile, nil
}
func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ProfileIterator{it}, err
}
func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ProfileIterator{it}, err
}
func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this profileTable) doNotImplement() {}
var _ ProfileTable = profileTable{}
func NewProfileTable(db ormtable.Schema) (ProfileTable, error) {
table := db.GetTable(&Profile{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName()))
}
return profileTable{table}, nil
}
type StateStore interface {
MetadataTable() MetadataTable
ProfileTable() ProfileTable
doNotImplement()
}
type stateStore struct {
metadata MetadataTable
profile ProfileTable
}
func (x stateStore) MetadataTable() MetadataTable {
return x.metadata
}
func (x stateStore) ProfileTable() ProfileTable {
return x.profile
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
metadataTable, err := NewMetadataTable(db)
if err != nil {
return nil, err
}
profileTable, err := NewProfileTable(db)
if err != nil {
return nil, err
}
return stateStore{
metadataTable,
profileTable,
}, nil
}
File diff suppressed because it is too large Load Diff
@@ -2,15 +2,16 @@
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
io "io"
reflect "reflect"
sync "sync"
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
@@ -18,8 +19,8 @@ var (
)
func init() {
file_service_module_v1_module_proto_init()
md_Module = File_service_module_v1_module_proto.Messages().ByName("Module")
file_svc_module_v1_module_proto_init()
md_Module = File_svc_module_v1_module_proto.Messages().ByName("Module")
}
var _ protoreflect.Message = (*fastReflection_Module)(nil)
@@ -31,7 +32,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
}
func (x *Module) slowProtoReflect() protoreflect.Message {
mi := &file_service_module_v1_module_proto_msgTypes[0]
mi := &file_svc_module_v1_module_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -104,9 +105,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -120,9 +121,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -136,9 +137,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", descriptor.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", descriptor.FullName()))
}
}
@@ -156,9 +157,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -176,9 +177,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -189,9 +190,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module"))
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.module.v1.Module"))
}
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName()))
panic(fmt.Errorf("message svc.module.v1.Module does not contain field %s", fd.FullName()))
}
}
@@ -201,7 +202,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in service.module.v1.Module", d.FullName()))
panic(fmt.Errorf("%s is not a oneof field in svc.module.v1.Module", d.FullName()))
}
panic("unreachable")
}
@@ -373,7 +374,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: service/module/v1/module.proto
// source: svc/module/v1/module.proto
const (
// Verify that this generated code is sufficiently up-to-date.
@@ -393,7 +394,7 @@ type Module struct {
func (x *Module) Reset() {
*x = Module{}
if protoimpl.UnsafeEnabled {
mi := &file_service_module_v1_module_proto_msgTypes[0]
mi := &file_svc_module_v1_module_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -407,52 +408,50 @@ func (*Module) ProtoMessage() {}
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
func (*Module) Descriptor() ([]byte, []int) {
return file_service_module_v1_module_proto_rawDescGZIP(), []int{0}
return file_svc_module_v1_module_proto_rawDescGZIP(), []int{0}
}
var File_service_module_v1_module_proto protoreflect.FileDescriptor
var File_svc_module_v1_module_proto protoreflect.FileDescriptor
var file_service_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42,
0xc1, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 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, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56,
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var file_svc_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1a, 0x73, 0x76, 0x63, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x76,
0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a,
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a,
0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xaa, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d,
0x2e, 0x73, 0x76, 0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2d, 0x69,
0x6f, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76,
0x31, 0xa2, 0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x2e, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_module_v1_module_proto_rawDescOnce sync.Once
file_service_module_v1_module_proto_rawDescData = file_service_module_v1_module_proto_rawDesc
file_svc_module_v1_module_proto_rawDescOnce sync.Once
file_svc_module_v1_module_proto_rawDescData = file_svc_module_v1_module_proto_rawDesc
)
func file_service_module_v1_module_proto_rawDescGZIP() []byte {
file_service_module_v1_module_proto_rawDescOnce.Do(func() {
file_service_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_module_v1_module_proto_rawDescData)
func file_svc_module_v1_module_proto_rawDescGZIP() []byte {
file_svc_module_v1_module_proto_rawDescOnce.Do(func() {
file_svc_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_module_v1_module_proto_rawDescData)
})
return file_service_module_v1_module_proto_rawDescData
return file_svc_module_v1_module_proto_rawDescData
}
var file_service_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_service_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: service.module.v1.Module
var file_svc_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_svc_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: svc.module.v1.Module
}
var file_service_module_v1_module_proto_depIdxs = []int32{
var file_svc_module_v1_module_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
@@ -460,13 +459,13 @@ var file_service_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_service_module_v1_module_proto_init() }
func file_service_module_v1_module_proto_init() {
if File_service_module_v1_module_proto != nil {
func init() { file_svc_module_v1_module_proto_init() }
func file_svc_module_v1_module_proto_init() {
if File_svc_module_v1_module_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_service_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_svc_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Module); i {
case 0:
return &v.state
@@ -483,18 +482,18 @@ func file_service_module_v1_module_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_module_v1_module_proto_rawDesc,
RawDescriptor: file_svc_module_v1_module_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_service_module_v1_module_proto_goTypes,
DependencyIndexes: file_service_module_v1_module_proto_depIdxs,
MessageInfos: file_service_module_v1_module_proto_msgTypes,
GoTypes: file_svc_module_v1_module_proto_goTypes,
DependencyIndexes: file_svc_module_v1_module_proto_depIdxs,
MessageInfos: file_svc_module_v1_module_proto_msgTypes,
}.Build()
File_service_module_v1_module_proto = out.File
file_service_module_v1_module_proto_rawDesc = nil
file_service_module_v1_module_proto_goTypes = nil
file_service_module_v1_module_proto_depIdxs = nil
File_svc_module_v1_module_proto = out.File
file_svc_module_v1_module_proto_rawDesc = nil
file_svc_module_v1_module_proto_goTypes = nil
file_svc_module_v1_module_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+395
View File
@@ -0,0 +1,395 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: svc/v1/query.proto
package svcv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/svc.v1.Query/Params"
Query_DomainVerification_FullMethodName = "/svc.v1.Query/DomainVerification"
Query_Service_FullMethodName = "/svc.v1.Query/Service"
Query_ServicesByOwner_FullMethodName = "/svc.v1.Query/ServicesByOwner"
Query_ServicesByDomain_FullMethodName = "/svc.v1.Query/ServicesByDomain"
Query_ServiceOIDCDiscovery_FullMethodName = "/svc.v1.Query/ServiceOIDCDiscovery"
Query_ServiceOIDCJWKS_FullMethodName = "/svc.v1.Query/ServiceOIDCJWKS"
Query_ServiceOIDCMetadata_FullMethodName = "/svc.v1.Query/ServiceOIDCMetadata"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// DomainVerification queries domain verification status by domain name.
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "svc_docs.md"}}
DomainVerification(ctx context.Context, in *QueryDomainVerificationRequest, opts ...grpc.CallOption) (*QueryDomainVerificationResponse, error)
// Service queries service information by service ID.
Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error)
// ServicesByOwner queries all services owned by a specific address.
ServicesByOwner(ctx context.Context, in *QueryServicesByOwnerRequest, opts ...grpc.CallOption) (*QueryServicesByOwnerResponse, error)
// ServicesByDomain queries services bound to a specific domain.
ServicesByDomain(ctx context.Context, in *QueryServicesByDomainRequest, opts ...grpc.CallOption) (*QueryServicesByDomainResponse, error)
// ServiceOIDCDiscovery queries OIDC discovery configuration for a service
ServiceOIDCDiscovery(ctx context.Context, in *QueryServiceOIDCDiscoveryRequest, opts ...grpc.CallOption) (*QueryServiceOIDCDiscoveryResponse, error)
// ServiceOIDCJWKS queries OIDC JWKS for a service
ServiceOIDCJWKS(ctx context.Context, in *QueryServiceOIDCJWKSRequest, opts ...grpc.CallOption) (*QueryServiceOIDCJWKSResponse, error)
// ServiceOIDCMetadata queries OIDC metadata for a service
ServiceOIDCMetadata(ctx context.Context, in *QueryServiceOIDCMetadataRequest, opts ...grpc.CallOption) (*QueryServiceOIDCMetadataResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) DomainVerification(ctx context.Context, in *QueryDomainVerificationRequest, opts ...grpc.CallOption) (*QueryDomainVerificationResponse, error) {
out := new(QueryDomainVerificationResponse)
err := c.cc.Invoke(ctx, Query_DomainVerification_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) {
out := new(QueryServiceResponse)
err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ServicesByOwner(ctx context.Context, in *QueryServicesByOwnerRequest, opts ...grpc.CallOption) (*QueryServicesByOwnerResponse, error) {
out := new(QueryServicesByOwnerResponse)
err := c.cc.Invoke(ctx, Query_ServicesByOwner_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ServicesByDomain(ctx context.Context, in *QueryServicesByDomainRequest, opts ...grpc.CallOption) (*QueryServicesByDomainResponse, error) {
out := new(QueryServicesByDomainResponse)
err := c.cc.Invoke(ctx, Query_ServicesByDomain_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ServiceOIDCDiscovery(ctx context.Context, in *QueryServiceOIDCDiscoveryRequest, opts ...grpc.CallOption) (*QueryServiceOIDCDiscoveryResponse, error) {
out := new(QueryServiceOIDCDiscoveryResponse)
err := c.cc.Invoke(ctx, Query_ServiceOIDCDiscovery_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ServiceOIDCJWKS(ctx context.Context, in *QueryServiceOIDCJWKSRequest, opts ...grpc.CallOption) (*QueryServiceOIDCJWKSResponse, error) {
out := new(QueryServiceOIDCJWKSResponse)
err := c.cc.Invoke(ctx, Query_ServiceOIDCJWKS_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ServiceOIDCMetadata(ctx context.Context, in *QueryServiceOIDCMetadataRequest, opts ...grpc.CallOption) (*QueryServiceOIDCMetadataResponse, error) {
out := new(QueryServiceOIDCMetadataResponse)
err := c.cc.Invoke(ctx, Query_ServiceOIDCMetadata_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// DomainVerification queries domain verification status by domain name.
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "svc_docs.md"}}
DomainVerification(context.Context, *QueryDomainVerificationRequest) (*QueryDomainVerificationResponse, error)
// Service queries service information by service ID.
Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error)
// ServicesByOwner queries all services owned by a specific address.
ServicesByOwner(context.Context, *QueryServicesByOwnerRequest) (*QueryServicesByOwnerResponse, error)
// ServicesByDomain queries services bound to a specific domain.
ServicesByDomain(context.Context, *QueryServicesByDomainRequest) (*QueryServicesByDomainResponse, error)
// ServiceOIDCDiscovery queries OIDC discovery configuration for a service
ServiceOIDCDiscovery(context.Context, *QueryServiceOIDCDiscoveryRequest) (*QueryServiceOIDCDiscoveryResponse, error)
// ServiceOIDCJWKS queries OIDC JWKS for a service
ServiceOIDCJWKS(context.Context, *QueryServiceOIDCJWKSRequest) (*QueryServiceOIDCJWKSResponse, error)
// ServiceOIDCMetadata queries OIDC metadata for a service
ServiceOIDCMetadata(context.Context, *QueryServiceOIDCMetadataRequest) (*QueryServiceOIDCMetadataResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) DomainVerification(context.Context, *QueryDomainVerificationRequest) (*QueryDomainVerificationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DomainVerification not implemented")
}
func (UnimplementedQueryServer) Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Service not implemented")
}
func (UnimplementedQueryServer) ServicesByOwner(context.Context, *QueryServicesByOwnerRequest) (*QueryServicesByOwnerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServicesByOwner not implemented")
}
func (UnimplementedQueryServer) ServicesByDomain(context.Context, *QueryServicesByDomainRequest) (*QueryServicesByDomainResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServicesByDomain not implemented")
}
func (UnimplementedQueryServer) ServiceOIDCDiscovery(context.Context, *QueryServiceOIDCDiscoveryRequest) (*QueryServiceOIDCDiscoveryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServiceOIDCDiscovery not implemented")
}
func (UnimplementedQueryServer) ServiceOIDCJWKS(context.Context, *QueryServiceOIDCJWKSRequest) (*QueryServiceOIDCJWKSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServiceOIDCJWKS not implemented")
}
func (UnimplementedQueryServer) ServiceOIDCMetadata(context.Context, *QueryServiceOIDCMetadataRequest) (*QueryServiceOIDCMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ServiceOIDCMetadata not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_DomainVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryDomainVerificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).DomainVerification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_DomainVerification_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).DomainVerification(ctx, req.(*QueryDomainVerificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Service(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Service_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ServicesByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServicesByOwnerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ServicesByOwner(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ServicesByOwner_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ServicesByOwner(ctx, req.(*QueryServicesByOwnerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ServicesByDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServicesByDomainRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ServicesByDomain(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ServicesByDomain_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ServicesByDomain(ctx, req.(*QueryServicesByDomainRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ServiceOIDCDiscovery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServiceOIDCDiscoveryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ServiceOIDCDiscovery(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ServiceOIDCDiscovery_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ServiceOIDCDiscovery(ctx, req.(*QueryServiceOIDCDiscoveryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ServiceOIDCJWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServiceOIDCJWKSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ServiceOIDCJWKS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ServiceOIDCJWKS_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ServiceOIDCJWKS(ctx, req.(*QueryServiceOIDCJWKSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ServiceOIDCMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryServiceOIDCMetadataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ServiceOIDCMetadata(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ServiceOIDCMetadata_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ServiceOIDCMetadata(ctx, req.(*QueryServiceOIDCMetadataRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "svc.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "DomainVerification",
Handler: _Query_DomainVerification_Handler,
},
{
MethodName: "Service",
Handler: _Query_Service_Handler,
},
{
MethodName: "ServicesByOwner",
Handler: _Query_ServicesByOwner_Handler,
},
{
MethodName: "ServicesByDomain",
Handler: _Query_ServicesByDomain_Handler,
},
{
MethodName: "ServiceOIDCDiscovery",
Handler: _Query_ServiceOIDCDiscovery_Handler,
},
{
MethodName: "ServiceOIDCJWKS",
Handler: _Query_ServiceOIDCJWKS_Handler,
},
{
MethodName: "ServiceOIDCMetadata",
Handler: _Query_ServiceOIDCMetadata_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "svc/v1/query.proto",
}
+973
View File
@@ -0,0 +1,973 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package svcv1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type ServiceTable interface {
Insert(ctx context.Context, service *Service) error
Update(ctx context.Context, service *Service) error
Save(ctx context.Context, service *Service) error
Delete(ctx context.Context, service *Service) error
Has(ctx context.Context, id string) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id string) (*Service, error)
HasByDomain(ctx context.Context, domain string) (found bool, err error)
// GetByDomain returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByDomain(ctx context.Context, domain string) (*Service, error)
List(ctx context.Context, prefixKey ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error)
ListRange(ctx context.Context, from, to ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error)
DeleteBy(ctx context.Context, prefixKey ServiceIndexKey) error
DeleteRange(ctx context.Context, from, to ServiceIndexKey) error
doNotImplement()
}
type ServiceIterator struct {
ormtable.Iterator
}
func (i ServiceIterator) Value() (*Service, error) {
var service Service
err := i.UnmarshalMessage(&service)
return &service, err
}
type ServiceIndexKey interface {
id() uint32
values() []interface{}
serviceIndexKey()
}
// primary key starting index..
type ServicePrimaryKey = ServiceIdIndexKey
type ServiceIdIndexKey struct {
vs []interface{}
}
func (x ServiceIdIndexKey) id() uint32 { return 0 }
func (x ServiceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceIdIndexKey) serviceIndexKey() {}
func (this ServiceIdIndexKey) WithId(id string) ServiceIdIndexKey {
this.vs = []interface{}{id}
return this
}
type ServiceDomainIndexKey struct {
vs []interface{}
}
func (x ServiceDomainIndexKey) id() uint32 { return 1 }
func (x ServiceDomainIndexKey) values() []interface{} { return x.vs }
func (x ServiceDomainIndexKey) serviceIndexKey() {}
func (this ServiceDomainIndexKey) WithDomain(domain string) ServiceDomainIndexKey {
this.vs = []interface{}{domain}
return this
}
type ServiceOwnerIndexKey struct {
vs []interface{}
}
func (x ServiceOwnerIndexKey) id() uint32 { return 2 }
func (x ServiceOwnerIndexKey) values() []interface{} { return x.vs }
func (x ServiceOwnerIndexKey) serviceIndexKey() {}
func (this ServiceOwnerIndexKey) WithOwner(owner string) ServiceOwnerIndexKey {
this.vs = []interface{}{owner}
return this
}
type ServiceStatusIndexKey struct {
vs []interface{}
}
func (x ServiceStatusIndexKey) id() uint32 { return 3 }
func (x ServiceStatusIndexKey) values() []interface{} { return x.vs }
func (x ServiceStatusIndexKey) serviceIndexKey() {}
func (this ServiceStatusIndexKey) WithStatus(status ServiceStatus) ServiceStatusIndexKey {
this.vs = []interface{}{status}
return this
}
type serviceTable struct {
table ormtable.Table
}
func (this serviceTable) Insert(ctx context.Context, service *Service) error {
return this.table.Insert(ctx, service)
}
func (this serviceTable) Update(ctx context.Context, service *Service) error {
return this.table.Update(ctx, service)
}
func (this serviceTable) Save(ctx context.Context, service *Service) error {
return this.table.Save(ctx, service)
}
func (this serviceTable) Delete(ctx context.Context, service *Service) error {
return this.table.Delete(ctx, service)
}
func (this serviceTable) Has(ctx context.Context, id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this serviceTable) Get(ctx context.Context, id string) (*Service, error) {
var service Service
found, err := this.table.PrimaryKey().Get(ctx, &service, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &service, nil
}
func (this serviceTable) HasByDomain(ctx context.Context, domain string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
domain,
)
}
func (this serviceTable) GetByDomain(ctx context.Context, domain string) (*Service, error) {
var service Service
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &service,
domain,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &service, nil
}
func (this serviceTable) List(ctx context.Context, prefixKey ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ServiceIterator{it}, err
}
func (this serviceTable) ListRange(ctx context.Context, from, to ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ServiceIterator{it}, err
}
func (this serviceTable) DeleteBy(ctx context.Context, prefixKey ServiceIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this serviceTable) DeleteRange(ctx context.Context, from, to ServiceIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this serviceTable) doNotImplement() {}
var _ ServiceTable = serviceTable{}
func NewServiceTable(db ormtable.Schema) (ServiceTable, error) {
table := db.GetTable(&Service{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Service{}).ProtoReflect().Descriptor().FullName()))
}
return serviceTable{table}, nil
}
type DomainVerificationTable interface {
Insert(ctx context.Context, domainVerification *DomainVerification) error
Update(ctx context.Context, domainVerification *DomainVerification) error
Save(ctx context.Context, domainVerification *DomainVerification) error
Delete(ctx context.Context, domainVerification *DomainVerification) error
Has(ctx context.Context, domain 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, domain string) (*DomainVerification, error)
List(ctx context.Context, prefixKey DomainVerificationIndexKey, opts ...ormlist.Option) (DomainVerificationIterator, error)
ListRange(ctx context.Context, from, to DomainVerificationIndexKey, opts ...ormlist.Option) (DomainVerificationIterator, error)
DeleteBy(ctx context.Context, prefixKey DomainVerificationIndexKey) error
DeleteRange(ctx context.Context, from, to DomainVerificationIndexKey) error
doNotImplement()
}
type DomainVerificationIterator struct {
ormtable.Iterator
}
func (i DomainVerificationIterator) Value() (*DomainVerification, error) {
var domainVerification DomainVerification
err := i.UnmarshalMessage(&domainVerification)
return &domainVerification, err
}
type DomainVerificationIndexKey interface {
id() uint32
values() []interface{}
domainVerificationIndexKey()
}
// primary key starting index..
type DomainVerificationPrimaryKey = DomainVerificationDomainIndexKey
type DomainVerificationDomainIndexKey struct {
vs []interface{}
}
func (x DomainVerificationDomainIndexKey) id() uint32 { return 0 }
func (x DomainVerificationDomainIndexKey) values() []interface{} { return x.vs }
func (x DomainVerificationDomainIndexKey) domainVerificationIndexKey() {}
func (this DomainVerificationDomainIndexKey) WithDomain(domain string) DomainVerificationDomainIndexKey {
this.vs = []interface{}{domain}
return this
}
type DomainVerificationOwnerIndexKey struct {
vs []interface{}
}
func (x DomainVerificationOwnerIndexKey) id() uint32 { return 1 }
func (x DomainVerificationOwnerIndexKey) values() []interface{} { return x.vs }
func (x DomainVerificationOwnerIndexKey) domainVerificationIndexKey() {}
func (this DomainVerificationOwnerIndexKey) WithOwner(owner string) DomainVerificationOwnerIndexKey {
this.vs = []interface{}{owner}
return this
}
type DomainVerificationStatusIndexKey struct {
vs []interface{}
}
func (x DomainVerificationStatusIndexKey) id() uint32 { return 2 }
func (x DomainVerificationStatusIndexKey) values() []interface{} { return x.vs }
func (x DomainVerificationStatusIndexKey) domainVerificationIndexKey() {}
func (this DomainVerificationStatusIndexKey) WithStatus(status DomainVerificationStatus) DomainVerificationStatusIndexKey {
this.vs = []interface{}{status}
return this
}
type domainVerificationTable struct {
table ormtable.Table
}
func (this domainVerificationTable) Insert(ctx context.Context, domainVerification *DomainVerification) error {
return this.table.Insert(ctx, domainVerification)
}
func (this domainVerificationTable) Update(ctx context.Context, domainVerification *DomainVerification) error {
return this.table.Update(ctx, domainVerification)
}
func (this domainVerificationTable) Save(ctx context.Context, domainVerification *DomainVerification) error {
return this.table.Save(ctx, domainVerification)
}
func (this domainVerificationTable) Delete(ctx context.Context, domainVerification *DomainVerification) error {
return this.table.Delete(ctx, domainVerification)
}
func (this domainVerificationTable) Has(ctx context.Context, domain string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, domain)
}
func (this domainVerificationTable) Get(ctx context.Context, domain string) (*DomainVerification, error) {
var domainVerification DomainVerification
found, err := this.table.PrimaryKey().Get(ctx, &domainVerification, domain)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &domainVerification, nil
}
func (this domainVerificationTable) List(ctx context.Context, prefixKey DomainVerificationIndexKey, opts ...ormlist.Option) (DomainVerificationIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return DomainVerificationIterator{it}, err
}
func (this domainVerificationTable) ListRange(ctx context.Context, from, to DomainVerificationIndexKey, opts ...ormlist.Option) (DomainVerificationIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return DomainVerificationIterator{it}, err
}
func (this domainVerificationTable) DeleteBy(ctx context.Context, prefixKey DomainVerificationIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this domainVerificationTable) DeleteRange(ctx context.Context, from, to DomainVerificationIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this domainVerificationTable) doNotImplement() {}
var _ DomainVerificationTable = domainVerificationTable{}
func NewDomainVerificationTable(db ormtable.Schema) (DomainVerificationTable, error) {
table := db.GetTable(&DomainVerification{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&DomainVerification{}).ProtoReflect().Descriptor().FullName()))
}
return domainVerificationTable{table}, nil
}
type ServiceCapabilityTable interface {
Insert(ctx context.Context, serviceCapability *ServiceCapability) error
Update(ctx context.Context, serviceCapability *ServiceCapability) error
Save(ctx context.Context, serviceCapability *ServiceCapability) error
Delete(ctx context.Context, serviceCapability *ServiceCapability) error
Has(ctx context.Context, capability_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, capability_id string) (*ServiceCapability, error)
List(ctx context.Context, prefixKey ServiceCapabilityIndexKey, opts ...ormlist.Option) (ServiceCapabilityIterator, error)
ListRange(ctx context.Context, from, to ServiceCapabilityIndexKey, opts ...ormlist.Option) (ServiceCapabilityIterator, error)
DeleteBy(ctx context.Context, prefixKey ServiceCapabilityIndexKey) error
DeleteRange(ctx context.Context, from, to ServiceCapabilityIndexKey) error
doNotImplement()
}
type ServiceCapabilityIterator struct {
ormtable.Iterator
}
func (i ServiceCapabilityIterator) Value() (*ServiceCapability, error) {
var serviceCapability ServiceCapability
err := i.UnmarshalMessage(&serviceCapability)
return &serviceCapability, err
}
type ServiceCapabilityIndexKey interface {
id() uint32
values() []interface{}
serviceCapabilityIndexKey()
}
// primary key starting index..
type ServiceCapabilityPrimaryKey = ServiceCapabilityCapabilityIdIndexKey
type ServiceCapabilityCapabilityIdIndexKey struct {
vs []interface{}
}
func (x ServiceCapabilityCapabilityIdIndexKey) id() uint32 { return 0 }
func (x ServiceCapabilityCapabilityIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceCapabilityCapabilityIdIndexKey) serviceCapabilityIndexKey() {}
func (this ServiceCapabilityCapabilityIdIndexKey) WithCapabilityId(capability_id string) ServiceCapabilityCapabilityIdIndexKey {
this.vs = []interface{}{capability_id}
return this
}
type ServiceCapabilityServiceIdIndexKey struct {
vs []interface{}
}
func (x ServiceCapabilityServiceIdIndexKey) id() uint32 { return 1 }
func (x ServiceCapabilityServiceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceCapabilityServiceIdIndexKey) serviceCapabilityIndexKey() {}
func (this ServiceCapabilityServiceIdIndexKey) WithServiceId(service_id string) ServiceCapabilityServiceIdIndexKey {
this.vs = []interface{}{service_id}
return this
}
type ServiceCapabilityOwnerIndexKey struct {
vs []interface{}
}
func (x ServiceCapabilityOwnerIndexKey) id() uint32 { return 2 }
func (x ServiceCapabilityOwnerIndexKey) values() []interface{} { return x.vs }
func (x ServiceCapabilityOwnerIndexKey) serviceCapabilityIndexKey() {}
func (this ServiceCapabilityOwnerIndexKey) WithOwner(owner string) ServiceCapabilityOwnerIndexKey {
this.vs = []interface{}{owner}
return this
}
type ServiceCapabilityRevokedIndexKey struct {
vs []interface{}
}
func (x ServiceCapabilityRevokedIndexKey) id() uint32 { return 3 }
func (x ServiceCapabilityRevokedIndexKey) values() []interface{} { return x.vs }
func (x ServiceCapabilityRevokedIndexKey) serviceCapabilityIndexKey() {}
func (this ServiceCapabilityRevokedIndexKey) WithRevoked(revoked bool) ServiceCapabilityRevokedIndexKey {
this.vs = []interface{}{revoked}
return this
}
type serviceCapabilityTable struct {
table ormtable.Table
}
func (this serviceCapabilityTable) Insert(ctx context.Context, serviceCapability *ServiceCapability) error {
return this.table.Insert(ctx, serviceCapability)
}
func (this serviceCapabilityTable) Update(ctx context.Context, serviceCapability *ServiceCapability) error {
return this.table.Update(ctx, serviceCapability)
}
func (this serviceCapabilityTable) Save(ctx context.Context, serviceCapability *ServiceCapability) error {
return this.table.Save(ctx, serviceCapability)
}
func (this serviceCapabilityTable) Delete(ctx context.Context, serviceCapability *ServiceCapability) error {
return this.table.Delete(ctx, serviceCapability)
}
func (this serviceCapabilityTable) Has(ctx context.Context, capability_id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, capability_id)
}
func (this serviceCapabilityTable) Get(ctx context.Context, capability_id string) (*ServiceCapability, error) {
var serviceCapability ServiceCapability
found, err := this.table.PrimaryKey().Get(ctx, &serviceCapability, capability_id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &serviceCapability, nil
}
func (this serviceCapabilityTable) List(ctx context.Context, prefixKey ServiceCapabilityIndexKey, opts ...ormlist.Option) (ServiceCapabilityIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ServiceCapabilityIterator{it}, err
}
func (this serviceCapabilityTable) ListRange(ctx context.Context, from, to ServiceCapabilityIndexKey, opts ...ormlist.Option) (ServiceCapabilityIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ServiceCapabilityIterator{it}, err
}
func (this serviceCapabilityTable) DeleteBy(ctx context.Context, prefixKey ServiceCapabilityIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this serviceCapabilityTable) DeleteRange(ctx context.Context, from, to ServiceCapabilityIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this serviceCapabilityTable) doNotImplement() {}
var _ ServiceCapabilityTable = serviceCapabilityTable{}
func NewServiceCapabilityTable(db ormtable.Schema) (ServiceCapabilityTable, error) {
table := db.GetTable(&ServiceCapability{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&ServiceCapability{}).ProtoReflect().Descriptor().FullName()))
}
return serviceCapabilityTable{table}, nil
}
type ServiceResourceTable interface {
Insert(ctx context.Context, serviceResource *ServiceResource) error
Update(ctx context.Context, serviceResource *ServiceResource) error
Save(ctx context.Context, serviceResource *ServiceResource) error
Delete(ctx context.Context, serviceResource *ServiceResource) error
Has(ctx context.Context, resource_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, resource_id string) (*ServiceResource, error)
List(ctx context.Context, prefixKey ServiceResourceIndexKey, opts ...ormlist.Option) (ServiceResourceIterator, error)
ListRange(ctx context.Context, from, to ServiceResourceIndexKey, opts ...ormlist.Option) (ServiceResourceIterator, error)
DeleteBy(ctx context.Context, prefixKey ServiceResourceIndexKey) error
DeleteRange(ctx context.Context, from, to ServiceResourceIndexKey) error
doNotImplement()
}
type ServiceResourceIterator struct {
ormtable.Iterator
}
func (i ServiceResourceIterator) Value() (*ServiceResource, error) {
var serviceResource ServiceResource
err := i.UnmarshalMessage(&serviceResource)
return &serviceResource, err
}
type ServiceResourceIndexKey interface {
id() uint32
values() []interface{}
serviceResourceIndexKey()
}
// primary key starting index..
type ServiceResourcePrimaryKey = ServiceResourceResourceIdIndexKey
type ServiceResourceResourceIdIndexKey struct {
vs []interface{}
}
func (x ServiceResourceResourceIdIndexKey) id() uint32 { return 0 }
func (x ServiceResourceResourceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceResourceResourceIdIndexKey) serviceResourceIndexKey() {}
func (this ServiceResourceResourceIdIndexKey) WithResourceId(resource_id string) ServiceResourceResourceIdIndexKey {
this.vs = []interface{}{resource_id}
return this
}
type ServiceResourceServiceIdIndexKey struct {
vs []interface{}
}
func (x ServiceResourceServiceIdIndexKey) id() uint32 { return 1 }
func (x ServiceResourceServiceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceResourceServiceIdIndexKey) serviceResourceIndexKey() {}
func (this ServiceResourceServiceIdIndexKey) WithServiceId(service_id string) ServiceResourceServiceIdIndexKey {
this.vs = []interface{}{service_id}
return this
}
type ServiceResourceResourceTypeIndexKey struct {
vs []interface{}
}
func (x ServiceResourceResourceTypeIndexKey) id() uint32 { return 2 }
func (x ServiceResourceResourceTypeIndexKey) values() []interface{} { return x.vs }
func (x ServiceResourceResourceTypeIndexKey) serviceResourceIndexKey() {}
func (this ServiceResourceResourceTypeIndexKey) WithResourceType(resource_type string) ServiceResourceResourceTypeIndexKey {
this.vs = []interface{}{resource_type}
return this
}
type serviceResourceTable struct {
table ormtable.Table
}
func (this serviceResourceTable) Insert(ctx context.Context, serviceResource *ServiceResource) error {
return this.table.Insert(ctx, serviceResource)
}
func (this serviceResourceTable) Update(ctx context.Context, serviceResource *ServiceResource) error {
return this.table.Update(ctx, serviceResource)
}
func (this serviceResourceTable) Save(ctx context.Context, serviceResource *ServiceResource) error {
return this.table.Save(ctx, serviceResource)
}
func (this serviceResourceTable) Delete(ctx context.Context, serviceResource *ServiceResource) error {
return this.table.Delete(ctx, serviceResource)
}
func (this serviceResourceTable) Has(ctx context.Context, resource_id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, resource_id)
}
func (this serviceResourceTable) Get(ctx context.Context, resource_id string) (*ServiceResource, error) {
var serviceResource ServiceResource
found, err := this.table.PrimaryKey().Get(ctx, &serviceResource, resource_id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &serviceResource, nil
}
func (this serviceResourceTable) List(ctx context.Context, prefixKey ServiceResourceIndexKey, opts ...ormlist.Option) (ServiceResourceIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ServiceResourceIterator{it}, err
}
func (this serviceResourceTable) ListRange(ctx context.Context, from, to ServiceResourceIndexKey, opts ...ormlist.Option) (ServiceResourceIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ServiceResourceIterator{it}, err
}
func (this serviceResourceTable) DeleteBy(ctx context.Context, prefixKey ServiceResourceIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this serviceResourceTable) DeleteRange(ctx context.Context, from, to ServiceResourceIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this serviceResourceTable) doNotImplement() {}
var _ ServiceResourceTable = serviceResourceTable{}
func NewServiceResourceTable(db ormtable.Schema) (ServiceResourceTable, error) {
table := db.GetTable(&ServiceResource{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&ServiceResource{}).ProtoReflect().Descriptor().FullName()))
}
return serviceResourceTable{table}, nil
}
type ServiceOIDCConfigTable interface {
Insert(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error
Update(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error
Save(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error
Delete(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error
Has(ctx context.Context, service_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, service_id string) (*ServiceOIDCConfig, error)
HasByIssuer(ctx context.Context, issuer string) (found bool, err error)
// GetByIssuer returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByIssuer(ctx context.Context, issuer string) (*ServiceOIDCConfig, error)
List(ctx context.Context, prefixKey ServiceOIDCConfigIndexKey, opts ...ormlist.Option) (ServiceOIDCConfigIterator, error)
ListRange(ctx context.Context, from, to ServiceOIDCConfigIndexKey, opts ...ormlist.Option) (ServiceOIDCConfigIterator, error)
DeleteBy(ctx context.Context, prefixKey ServiceOIDCConfigIndexKey) error
DeleteRange(ctx context.Context, from, to ServiceOIDCConfigIndexKey) error
doNotImplement()
}
type ServiceOIDCConfigIterator struct {
ormtable.Iterator
}
func (i ServiceOIDCConfigIterator) Value() (*ServiceOIDCConfig, error) {
var serviceOIDCConfig ServiceOIDCConfig
err := i.UnmarshalMessage(&serviceOIDCConfig)
return &serviceOIDCConfig, err
}
type ServiceOIDCConfigIndexKey interface {
id() uint32
values() []interface{}
serviceOIDCConfigIndexKey()
}
// primary key starting index..
type ServiceOIDCConfigPrimaryKey = ServiceOIDCConfigServiceIdIndexKey
type ServiceOIDCConfigServiceIdIndexKey struct {
vs []interface{}
}
func (x ServiceOIDCConfigServiceIdIndexKey) id() uint32 { return 0 }
func (x ServiceOIDCConfigServiceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceOIDCConfigServiceIdIndexKey) serviceOIDCConfigIndexKey() {}
func (this ServiceOIDCConfigServiceIdIndexKey) WithServiceId(service_id string) ServiceOIDCConfigServiceIdIndexKey {
this.vs = []interface{}{service_id}
return this
}
type ServiceOIDCConfigIssuerIndexKey struct {
vs []interface{}
}
func (x ServiceOIDCConfigIssuerIndexKey) id() uint32 { return 1 }
func (x ServiceOIDCConfigIssuerIndexKey) values() []interface{} { return x.vs }
func (x ServiceOIDCConfigIssuerIndexKey) serviceOIDCConfigIndexKey() {}
func (this ServiceOIDCConfigIssuerIndexKey) WithIssuer(issuer string) ServiceOIDCConfigIssuerIndexKey {
this.vs = []interface{}{issuer}
return this
}
type serviceOIDCConfigTable struct {
table ormtable.Table
}
func (this serviceOIDCConfigTable) Insert(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error {
return this.table.Insert(ctx, serviceOIDCConfig)
}
func (this serviceOIDCConfigTable) Update(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error {
return this.table.Update(ctx, serviceOIDCConfig)
}
func (this serviceOIDCConfigTable) Save(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error {
return this.table.Save(ctx, serviceOIDCConfig)
}
func (this serviceOIDCConfigTable) Delete(ctx context.Context, serviceOIDCConfig *ServiceOIDCConfig) error {
return this.table.Delete(ctx, serviceOIDCConfig)
}
func (this serviceOIDCConfigTable) Has(ctx context.Context, service_id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, service_id)
}
func (this serviceOIDCConfigTable) Get(ctx context.Context, service_id string) (*ServiceOIDCConfig, error) {
var serviceOIDCConfig ServiceOIDCConfig
found, err := this.table.PrimaryKey().Get(ctx, &serviceOIDCConfig, service_id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &serviceOIDCConfig, nil
}
func (this serviceOIDCConfigTable) HasByIssuer(ctx context.Context, issuer string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
issuer,
)
}
func (this serviceOIDCConfigTable) GetByIssuer(ctx context.Context, issuer string) (*ServiceOIDCConfig, error) {
var serviceOIDCConfig ServiceOIDCConfig
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &serviceOIDCConfig,
issuer,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &serviceOIDCConfig, nil
}
func (this serviceOIDCConfigTable) List(ctx context.Context, prefixKey ServiceOIDCConfigIndexKey, opts ...ormlist.Option) (ServiceOIDCConfigIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ServiceOIDCConfigIterator{it}, err
}
func (this serviceOIDCConfigTable) ListRange(ctx context.Context, from, to ServiceOIDCConfigIndexKey, opts ...ormlist.Option) (ServiceOIDCConfigIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ServiceOIDCConfigIterator{it}, err
}
func (this serviceOIDCConfigTable) DeleteBy(ctx context.Context, prefixKey ServiceOIDCConfigIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this serviceOIDCConfigTable) DeleteRange(ctx context.Context, from, to ServiceOIDCConfigIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this serviceOIDCConfigTable) doNotImplement() {}
var _ ServiceOIDCConfigTable = serviceOIDCConfigTable{}
func NewServiceOIDCConfigTable(db ormtable.Schema) (ServiceOIDCConfigTable, error) {
table := db.GetTable(&ServiceOIDCConfig{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&ServiceOIDCConfig{}).ProtoReflect().Descriptor().FullName()))
}
return serviceOIDCConfigTable{table}, nil
}
type ServiceJWKSTable interface {
Insert(ctx context.Context, serviceJWKS *ServiceJWKS) error
Update(ctx context.Context, serviceJWKS *ServiceJWKS) error
Save(ctx context.Context, serviceJWKS *ServiceJWKS) error
Delete(ctx context.Context, serviceJWKS *ServiceJWKS) error
Has(ctx context.Context, service_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, service_id string) (*ServiceJWKS, error)
List(ctx context.Context, prefixKey ServiceJWKSIndexKey, opts ...ormlist.Option) (ServiceJWKSIterator, error)
ListRange(ctx context.Context, from, to ServiceJWKSIndexKey, opts ...ormlist.Option) (ServiceJWKSIterator, error)
DeleteBy(ctx context.Context, prefixKey ServiceJWKSIndexKey) error
DeleteRange(ctx context.Context, from, to ServiceJWKSIndexKey) error
doNotImplement()
}
type ServiceJWKSIterator struct {
ormtable.Iterator
}
func (i ServiceJWKSIterator) Value() (*ServiceJWKS, error) {
var serviceJWKS ServiceJWKS
err := i.UnmarshalMessage(&serviceJWKS)
return &serviceJWKS, err
}
type ServiceJWKSIndexKey interface {
id() uint32
values() []interface{}
serviceJWKSIndexKey()
}
// primary key starting index..
type ServiceJWKSPrimaryKey = ServiceJWKSServiceIdIndexKey
type ServiceJWKSServiceIdIndexKey struct {
vs []interface{}
}
func (x ServiceJWKSServiceIdIndexKey) id() uint32 { return 0 }
func (x ServiceJWKSServiceIdIndexKey) values() []interface{} { return x.vs }
func (x ServiceJWKSServiceIdIndexKey) serviceJWKSIndexKey() {}
func (this ServiceJWKSServiceIdIndexKey) WithServiceId(service_id string) ServiceJWKSServiceIdIndexKey {
this.vs = []interface{}{service_id}
return this
}
type serviceJWKSTable struct {
table ormtable.Table
}
func (this serviceJWKSTable) Insert(ctx context.Context, serviceJWKS *ServiceJWKS) error {
return this.table.Insert(ctx, serviceJWKS)
}
func (this serviceJWKSTable) Update(ctx context.Context, serviceJWKS *ServiceJWKS) error {
return this.table.Update(ctx, serviceJWKS)
}
func (this serviceJWKSTable) Save(ctx context.Context, serviceJWKS *ServiceJWKS) error {
return this.table.Save(ctx, serviceJWKS)
}
func (this serviceJWKSTable) Delete(ctx context.Context, serviceJWKS *ServiceJWKS) error {
return this.table.Delete(ctx, serviceJWKS)
}
func (this serviceJWKSTable) Has(ctx context.Context, service_id string) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, service_id)
}
func (this serviceJWKSTable) Get(ctx context.Context, service_id string) (*ServiceJWKS, error) {
var serviceJWKS ServiceJWKS
found, err := this.table.PrimaryKey().Get(ctx, &serviceJWKS, service_id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &serviceJWKS, nil
}
func (this serviceJWKSTable) List(ctx context.Context, prefixKey ServiceJWKSIndexKey, opts ...ormlist.Option) (ServiceJWKSIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return ServiceJWKSIterator{it}, err
}
func (this serviceJWKSTable) ListRange(ctx context.Context, from, to ServiceJWKSIndexKey, opts ...ormlist.Option) (ServiceJWKSIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return ServiceJWKSIterator{it}, err
}
func (this serviceJWKSTable) DeleteBy(ctx context.Context, prefixKey ServiceJWKSIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this serviceJWKSTable) DeleteRange(ctx context.Context, from, to ServiceJWKSIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this serviceJWKSTable) doNotImplement() {}
var _ ServiceJWKSTable = serviceJWKSTable{}
func NewServiceJWKSTable(db ormtable.Schema) (ServiceJWKSTable, error) {
table := db.GetTable(&ServiceJWKS{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&ServiceJWKS{}).ProtoReflect().Descriptor().FullName()))
}
return serviceJWKSTable{table}, nil
}
type StateStore interface {
ServiceTable() ServiceTable
DomainVerificationTable() DomainVerificationTable
ServiceCapabilityTable() ServiceCapabilityTable
ServiceResourceTable() ServiceResourceTable
ServiceOIDCConfigTable() ServiceOIDCConfigTable
ServiceJWKSTable() ServiceJWKSTable
doNotImplement()
}
type stateStore struct {
service ServiceTable
domainVerification DomainVerificationTable
serviceCapability ServiceCapabilityTable
serviceResource ServiceResourceTable
serviceOIDCConfig ServiceOIDCConfigTable
serviceJWKS ServiceJWKSTable
}
func (x stateStore) ServiceTable() ServiceTable {
return x.service
}
func (x stateStore) DomainVerificationTable() DomainVerificationTable {
return x.domainVerification
}
func (x stateStore) ServiceCapabilityTable() ServiceCapabilityTable {
return x.serviceCapability
}
func (x stateStore) ServiceResourceTable() ServiceResourceTable {
return x.serviceResource
}
func (x stateStore) ServiceOIDCConfigTable() ServiceOIDCConfigTable {
return x.serviceOIDCConfig
}
func (x stateStore) ServiceJWKSTable() ServiceJWKSTable {
return x.serviceJWKS
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
serviceTable, err := NewServiceTable(db)
if err != nil {
return nil, err
}
domainVerificationTable, err := NewDomainVerificationTable(db)
if err != nil {
return nil, err
}
serviceCapabilityTable, err := NewServiceCapabilityTable(db)
if err != nil {
return nil, err
}
serviceResourceTable, err := NewServiceResourceTable(db)
if err != nil {
return nil, err
}
serviceOIDCConfigTable, err := NewServiceOIDCConfigTable(db)
if err != nil {
return nil, err
}
serviceJWKSTable, err := NewServiceJWKSTable(db)
if err != nil {
return nil, err
}
return stateStore{
serviceTable,
domainVerificationTable,
serviceCapabilityTable,
serviceResourceTable,
serviceOIDCConfigTable,
serviceJWKSTable,
}, nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -2,12 +2,13 @@
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: service/v1/tx.proto
// source: svc/v1/tx.proto
package servicev1
package svcv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -19,8 +20,10 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams"
Msg_RegisterService_FullMethodName = "/service.v1.Msg/RegisterService"
Msg_UpdateParams_FullMethodName = "/svc.v1.Msg/UpdateParams"
Msg_InitiateDomainVerification_FullMethodName = "/svc.v1.Msg/InitiateDomainVerification"
Msg_VerifyDomain_FullMethodName = "/svc.v1.Msg/VerifyDomain"
Msg_RegisterService_FullMethodName = "/svc.v1.Msg/RegisterService"
)
// MsgClient is the client API for Msg service.
@@ -31,8 +34,16 @@ type MsgClient interface {
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// RegisterService initializes a Service with a given permission scope and
// URI. The domain must have a valid TXT record containing the public key.
// InitiateDomainVerification starts the domain verification process
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "svc_docs.md"}}
InitiateDomainVerification(ctx context.Context, in *MsgInitiateDomainVerification, opts ...grpc.CallOption) (*MsgInitiateDomainVerificationResponse, error)
// VerifyDomain completes domain verification by checking DNS TXT records
VerifyDomain(ctx context.Context, in *MsgVerifyDomain, opts ...grpc.CallOption) (*MsgVerifyDomainResponse, error)
// RegisterService registers a new service with verified domain binding
RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error)
}
@@ -53,6 +64,24 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
return out, nil
}
func (c *msgClient) InitiateDomainVerification(ctx context.Context, in *MsgInitiateDomainVerification, opts ...grpc.CallOption) (*MsgInitiateDomainVerificationResponse, error) {
out := new(MsgInitiateDomainVerificationResponse)
err := c.cc.Invoke(ctx, Msg_InitiateDomainVerification_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) VerifyDomain(ctx context.Context, in *MsgVerifyDomain, opts ...grpc.CallOption) (*MsgVerifyDomainResponse, error) {
out := new(MsgVerifyDomainResponse)
err := c.cc.Invoke(ctx, Msg_VerifyDomain_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
out := new(MsgRegisterServiceResponse)
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...)
@@ -70,8 +99,16 @@ type MsgServer interface {
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// RegisterService initializes a Service with a given permission scope and
// URI. The domain must have a valid TXT record containing the public key.
// InitiateDomainVerification starts the domain verification process
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "svc_docs.md"}}
InitiateDomainVerification(context.Context, *MsgInitiateDomainVerification) (*MsgInitiateDomainVerificationResponse, error)
// VerifyDomain completes domain verification by checking DNS TXT records
VerifyDomain(context.Context, *MsgVerifyDomain) (*MsgVerifyDomainResponse, error)
// RegisterService registers a new service with verified domain binding
RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error)
mustEmbedUnimplementedMsgServer()
}
@@ -83,6 +120,12 @@ type UnimplementedMsgServer struct {
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) InitiateDomainVerification(context.Context, *MsgInitiateDomainVerification) (*MsgInitiateDomainVerificationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method InitiateDomainVerification not implemented")
}
func (UnimplementedMsgServer) VerifyDomain(context.Context, *MsgVerifyDomain) (*MsgVerifyDomainResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method VerifyDomain not implemented")
}
func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
}
@@ -117,6 +160,42 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Msg_InitiateDomainVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgInitiateDomainVerification)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).InitiateDomainVerification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_InitiateDomainVerification_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).InitiateDomainVerification(ctx, req.(*MsgInitiateDomainVerification))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_VerifyDomain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgVerifyDomain)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).VerifyDomain(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_VerifyDomain_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).VerifyDomain(ctx, req.(*MsgVerifyDomain))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgRegisterService)
if err := dec(in); err != nil {
@@ -139,18 +218,26 @@ func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "service.v1.Msg",
ServiceName: "svc.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "InitiateDomainVerification",
Handler: _Msg_InitiateDomainVerification_Handler,
},
{
MethodName: "VerifyDomain",
Handler: _Msg_VerifyDomain_Handler,
},
{
MethodName: "RegisterService",
Handler: _Msg_RegisterService_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service/v1/tx.proto",
Metadata: "svc/v1/tx.proto",
}
File diff suppressed because it is too large Load Diff
-191
View File
@@ -1,191 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: vault/v1/query.proto
package vaultv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/vault.v1.Query/Params"
Query_BuildTx_FullMethodName = "/vault.v1.Query/BuildTx"
Query_Sync_FullMethodName = "/vault.v1.Query/Sync"
)
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// BuildTx builds an unsigned transaction message for the given PKL.
BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, 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 {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) {
out := new(BuildTxResponse)
err := c.cc.Invoke(ctx, Query_BuildTx_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) {
out := new(SyncResponse)
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// BuildTx builds an unsigned transaction message for the given PKL.
BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error)
// Sync queries the DID document by its id. And returns the required PKL
// information
Sync(context.Context, *SyncRequest) (*SyncResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented")
}
func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
s.RegisterService(&Query_ServiceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BuildTxRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).BuildTx(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_BuildTx_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).BuildTx(ctx, req.(*BuildTxRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Sync(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Sync_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Sync(ctx, req.(*SyncRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "vault.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "BuildTx",
Handler: _Query_BuildTx_Handler,
},
{
MethodName: "Sync",
Handler: _Query_Sync_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vault/v1/query.proto",
}
-235
View File
@@ -1,235 +0,0 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package vaultv1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type DWNTable interface {
Insert(ctx context.Context, dWN *DWN) error
InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, dWN *DWN) error
Save(ctx context.Context, dWN *DWN) error
Delete(ctx context.Context, dWN *DWN) error
Has(ctx context.Context, id uint64) (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 uint64) (*DWN, error)
HasByAlias(ctx context.Context, alias string) (found bool, err error)
// GetByAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByAlias(ctx context.Context, alias string) (*DWN, error)
HasByCid(ctx context.Context, cid string) (found bool, err error)
// GetByCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByCid(ctx context.Context, cid string) (*DWN, error)
List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error)
DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error
DeleteRange(ctx context.Context, from, to DWNIndexKey) error
doNotImplement()
}
type DWNIterator struct {
ormtable.Iterator
}
func (i DWNIterator) Value() (*DWN, error) {
var dWN DWN
err := i.UnmarshalMessage(&dWN)
return &dWN, err
}
type DWNIndexKey interface {
id() uint32
values() []interface{}
dWNIndexKey()
}
// primary key starting index..
type DWNPrimaryKey = DWNIdIndexKey
type DWNIdIndexKey struct {
vs []interface{}
}
func (x DWNIdIndexKey) id() uint32 { return 0 }
func (x DWNIdIndexKey) values() []interface{} { return x.vs }
func (x DWNIdIndexKey) dWNIndexKey() {}
func (this DWNIdIndexKey) WithId(id uint64) DWNIdIndexKey {
this.vs = []interface{}{id}
return this
}
type DWNAliasIndexKey struct {
vs []interface{}
}
func (x DWNAliasIndexKey) id() uint32 { return 1 }
func (x DWNAliasIndexKey) values() []interface{} { return x.vs }
func (x DWNAliasIndexKey) dWNIndexKey() {}
func (this DWNAliasIndexKey) WithAlias(alias string) DWNAliasIndexKey {
this.vs = []interface{}{alias}
return this
}
type DWNCidIndexKey struct {
vs []interface{}
}
func (x DWNCidIndexKey) id() uint32 { return 2 }
func (x DWNCidIndexKey) values() []interface{} { return x.vs }
func (x DWNCidIndexKey) dWNIndexKey() {}
func (this DWNCidIndexKey) WithCid(cid string) DWNCidIndexKey {
this.vs = []interface{}{cid}
return this
}
type dWNTable struct {
table ormtable.AutoIncrementTable
}
func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error {
return this.table.Insert(ctx, dWN)
}
func (this dWNTable) Update(ctx context.Context, dWN *DWN) error {
return this.table.Update(ctx, dWN)
}
func (this dWNTable) Save(ctx context.Context, dWN *DWN) error {
return this.table.Save(ctx, dWN)
}
func (this dWNTable) Delete(ctx context.Context, dWN *DWN) error {
return this.table.Delete(ctx, dWN)
}
func (this dWNTable) InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) {
return this.table.InsertReturningPKey(ctx, dWN)
}
func (this dWNTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this dWNTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this dWNTable) Get(ctx context.Context, id uint64) (*DWN, error) {
var dWN DWN
found, err := this.table.PrimaryKey().Get(ctx, &dWN, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &dWN, nil
}
func (this dWNTable) HasByAlias(ctx context.Context, alias string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
alias,
)
}
func (this dWNTable) GetByAlias(ctx context.Context, alias string) (*DWN, error) {
var dWN DWN
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dWN,
alias,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &dWN, nil
}
func (this dWNTable) HasByCid(ctx context.Context, cid string) (found bool, err error) {
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
cid,
)
}
func (this dWNTable) GetByCid(ctx context.Context, cid string) (*DWN, error) {
var dWN DWN
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &dWN,
cid,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &dWN, nil
}
func (this dWNTable) List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return DWNIterator{it}, err
}
func (this dWNTable) ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return DWNIterator{it}, err
}
func (this dWNTable) DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this dWNTable) DeleteRange(ctx context.Context, from, to DWNIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this dWNTable) doNotImplement() {}
var _ DWNTable = dWNTable{}
func NewDWNTable(db ormtable.Schema) (DWNTable, error) {
table := db.GetTable(&DWN{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName()))
}
return dWNTable{table.(ormtable.AutoIncrementTable)}, nil
}
type StateStore interface {
DWNTable() DWNTable
doNotImplement()
}
type stateStore struct {
dWN DWNTable
}
func (x stateStore) DWNTable() DWNTable {
return x.dWN
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
dWNTable, err := NewDWNTable(db)
if err != nil {
return nil, err
}
return stateStore{
dWNTable,
}, nil
}
-698
View File
@@ -1,698 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package vaultv1
import (
_ "cosmossdk.io/api/cosmos/orm/v1"
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
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"
sync "sync"
)
var (
md_DWN protoreflect.MessageDescriptor
fd_DWN_id protoreflect.FieldDescriptor
fd_DWN_alias protoreflect.FieldDescriptor
fd_DWN_cid protoreflect.FieldDescriptor
)
func init() {
file_vault_v1_state_proto_init()
md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN")
fd_DWN_id = md_DWN.Fields().ByName("id")
fd_DWN_alias = md_DWN.Fields().ByName("alias")
fd_DWN_cid = md_DWN.Fields().ByName("cid")
}
var _ protoreflect.Message = (*fastReflection_DWN)(nil)
type fastReflection_DWN DWN
func (x *DWN) ProtoReflect() protoreflect.Message {
return (*fastReflection_DWN)(x)
}
func (x *DWN) slowProtoReflect() protoreflect.Message {
mi := &file_vault_v1_state_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_DWN_messageType fastReflection_DWN_messageType
var _ protoreflect.MessageType = fastReflection_DWN_messageType{}
type fastReflection_DWN_messageType struct{}
func (x fastReflection_DWN_messageType) Zero() protoreflect.Message {
return (*fastReflection_DWN)(nil)
}
func (x fastReflection_DWN_messageType) New() protoreflect.Message {
return new(fastReflection_DWN)
}
func (x fastReflection_DWN_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_DWN
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_DWN) Descriptor() protoreflect.MessageDescriptor {
return md_DWN
}
// 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_DWN) Type() protoreflect.MessageType {
return _fastReflection_DWN_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_DWN) New() protoreflect.Message {
return new(fastReflection_DWN)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_DWN) Interface() protoreflect.ProtoMessage {
return (*DWN)(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_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Id != uint64(0) {
value := protoreflect.ValueOfUint64(x.Id)
if !f(fd_DWN_id, value) {
return
}
}
if x.Alias != "" {
value := protoreflect.ValueOfString(x.Alias)
if !f(fd_DWN_alias, value) {
return
}
}
if x.Cid != "" {
value := protoreflect.ValueOfString(x.Cid)
if !f(fd_DWN_cid, 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_DWN) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "vault.v1.DWN.id":
return x.Id != uint64(0)
case "vault.v1.DWN.alias":
return x.Alias != ""
case "vault.v1.DWN.cid":
return x.Cid != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "vault.v1.DWN.id":
x.Id = uint64(0)
case "vault.v1.DWN.alias":
x.Alias = ""
case "vault.v1.DWN.cid":
x.Cid = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "vault.v1.DWN.id":
value := x.Id
return protoreflect.ValueOfUint64(value)
case "vault.v1.DWN.alias":
value := x.Alias
return protoreflect.ValueOfString(value)
case "vault.v1.DWN.cid":
value := x.Cid
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "vault.v1.DWN.id":
x.Id = value.Uint()
case "vault.v1.DWN.alias":
x.Alias = value.Interface().(string)
case "vault.v1.DWN.cid":
x.Cid = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "vault.v1.DWN.id":
panic(fmt.Errorf("field id of message vault.v1.DWN is not mutable"))
case "vault.v1.DWN.alias":
panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable"))
case "vault.v1.DWN.cid":
panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "vault.v1.DWN.id":
return protoreflect.ValueOfUint64(uint64(0))
case "vault.v1.DWN.alias":
return protoreflect.ValueOfString("")
case "vault.v1.DWN.cid":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN"))
}
panic(fmt.Errorf("message vault.v1.DWN 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_DWN) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in vault.v1.DWN", 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_DWN) 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_DWN) 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_DWN) 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_DWN) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*DWN)
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.Id != 0 {
n += 1 + runtime.Sov(uint64(x.Id))
}
l = len(x.Alias)
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 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().(*DWN)
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.Cid) > 0 {
i -= len(x.Cid)
copy(dAtA[i:], x.Cid)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid)))
i--
dAtA[i] = 0x1a
}
if len(x.Alias) > 0 {
i -= len(x.Alias)
copy(dAtA[i:], x.Alias)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Alias)))
i--
dAtA[i] = 0x12
}
if x.Id != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Id))
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().(*DWN)
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: DWN: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DWN: 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 Id", wireType)
}
x.Id = 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.Id |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Alias = 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 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
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: vault/v1/state.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)
)
type DWN struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
}
func (x *DWN) Reset() {
*x = DWN{}
if protoimpl.UnsafeEnabled {
mi := &file_vault_v1_state_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DWN) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DWN) ProtoMessage() {}
// Deprecated: Use DWN.ProtoReflect.Descriptor instead.
func (*DWN) Descriptor() ([]byte, []int) {
return file_vault_v1_state_proto_rawDescGZIP(), []int{0}
}
func (x *DWN) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *DWN) GetAlias() string {
if x != nil {
return x.Alias
}
return ""
}
func (x *DWN) GetCid() string {
if x != nil {
return x.Cid
}
return ""
}
var File_vault_v1_state_proto protoreflect.FileDescriptor
var file_vault_v1_state_proto_rawDesc = []byte{
0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 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, 0x22, 0x67, 0x0a, 0x03, 0x44, 0x57, 0x4e,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22,
0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61,
0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01,
0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74,
0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61,
0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02,
0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca,
0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75,
0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_vault_v1_state_proto_rawDescOnce sync.Once
file_vault_v1_state_proto_rawDescData = file_vault_v1_state_proto_rawDesc
)
func file_vault_v1_state_proto_rawDescGZIP() []byte {
file_vault_v1_state_proto_rawDescOnce.Do(func() {
file_vault_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_state_proto_rawDescData)
})
return file_vault_v1_state_proto_rawDescData
}
var file_vault_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_vault_v1_state_proto_goTypes = []interface{}{
(*DWN)(nil), // 0: vault.v1.DWN
}
var file_vault_v1_state_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_vault_v1_state_proto_init() }
func file_vault_v1_state_proto_init() {
if File_vault_v1_state_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_vault_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DWN); 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_vault_v1_state_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_vault_v1_state_proto_goTypes,
DependencyIndexes: file_vault_v1_state_proto_depIdxs,
MessageInfos: file_vault_v1_state_proto_msgTypes,
}.Build()
File_vault_v1_state_proto = out.File
file_vault_v1_state_proto_rawDesc = nil
file_vault_v1_state_proto_goTypes = nil
file_vault_v1_state_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
-158
View File
@@ -1,158 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: vault/v1/tx.proto
package vaultv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Msg_AllocateVault_FullMethodName = "/vault.v1.Msg/AllocateVault"
Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type 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)
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
out := new(MsgAllocateVaultResponse)
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
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)
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented")
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAllocateVault)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).AllocateVault(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_AllocateVault_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "vault.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AllocateVault",
Handler: _Msg_AllocateVault_Handler,
},
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "vault/v1/tx.proto",
}
-74
View File
@@ -1,74 +0,0 @@
package app
import (
"errors"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
"github.com/cosmos/ibc-go/v8/modules/core/keeper"
circuitante "cosmossdk.io/x/circuit/ante"
circuitkeeper "cosmossdk.io/x/circuit/keeper"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
sdkmath "cosmossdk.io/math"
poaante "github.com/strangelove-ventures/poa/ante"
globalfeeante "github.com/strangelove-ventures/globalfee/x/globalfee/ante"
globalfeekeeper "github.com/strangelove-ventures/globalfee/x/globalfee/keeper"
)
// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions
IBCKeeper *keeper.Keeper
CircuitKeeper *circuitkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
GlobalFeeKeeper globalfeekeeper.Keeper
BypassMinFeeMsgTypes []string
}
// NewAnteHandler constructor
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.AccountKeeper == nil {
return nil, errors.New("account keeper is required for ante builder")
}
if options.BankKeeper == nil {
return nil, errors.New("bank keeper is required for ante builder")
}
if options.SignModeHandler == nil {
return nil, errors.New("sign mode handler is required for ante builder")
}
if options.CircuitKeeper == nil {
return nil, errors.New("circuit keeper is required for ante builder")
}
poaDoGenTxRateValidation := false
poaRateFloor := sdkmath.LegacyMustNewDecFromStr("0.05")
poaRateCeil := sdkmath.LegacyMustNewDecFromStr("0.25")
anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
circuitante.NewCircuitBreakerDecorator(options.CircuitKeeper),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
// ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
globalfeeante.NewFeeDecorator(options.BypassMinFeeMsgTypes, options.GlobalFeeKeeper, options.StakingKeeper, 2_000_000),
// ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
poaante.NewPOADisableStakingDecorator(),
poaante.NewCommissionLimitDecorator(poaDoGenTxRateValidation, poaRateFloor, poaRateCeil),
}
return sdk.ChainAnteDecorators(anteDecorators...), nil
}
+60
View File
@@ -0,0 +1,60 @@
// Package ante provides ante handler implementations for transaction processing
// in the Sonr blockchain. It supports both Cosmos SDK and Ethereum transactions.
package ante
import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
)
// NewAnteHandler returns an ante handler responsible for attempting to route an
// Ethereum or SDK transaction to an internal ante handler for performing
// transaction-level processing (e.g. fee payment, signature verification) before
// being passed onto it's respective handler.
//
// The handler inspects the transaction type and extension options to determine
// the appropriate processing path:
// - Ethereum transactions with ExtensionOptionsEthereumTx
// - Cosmos SDK transactions with ExtensionOptionDynamicFeeTx
// - Standard Cosmos SDK transactions
func NewAnteHandler(options HandlerOptions) sdk.AnteHandler {
return func(
ctx sdk.Context, tx sdk.Tx, sim bool,
) (newCtx sdk.Context, err error) {
var anteHandler sdk.AnteHandler
txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx)
if ok {
opts := txWithExtensions.GetExtensionOptions()
if len(opts) > 0 {
switch typeURL := opts[0].GetTypeUrl(); typeURL {
case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx":
// handle as *evmtypes.MsgEthereumTx
anteHandler = newMonoEVMAnteHandler(options)
case "/cosmos.evm.vm.v1.ExtensionOptionDynamicFeeTx":
// cosmos-sdk tx with dynamic fee extension
anteHandler = NewCosmosAnteHandler(options)
default:
return ctx, errorsmod.Wrapf(
errortypes.ErrUnknownExtensionOptions,
"rejecting tx with unsupported extension option: %s", typeURL,
)
}
return anteHandler(ctx, tx, sim)
}
}
// handle as totally normal Cosmos SDK tx
switch tx.(type) {
case sdk.Tx:
anteHandler = NewCosmosAnteHandler(options)
default:
return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid transaction type: %T", tx)
}
return anteHandler(ctx, tx, sim)
}
}

Some files were not shown because too many files have changed in this diff Show More