mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
866468c002 | ||
|
|
7f3aa01bd5 | ||
|
|
2f65b1c283 | ||
|
|
48f7b5d5cc | ||
|
|
d26d3d7b4d | ||
|
|
807b2e86ec | ||
|
|
9bd5e41fa0 | ||
|
|
2ae32b2f64 | ||
|
|
ef7c33a011 | ||
|
|
ac8250557d | ||
|
|
8764e93437 | ||
|
|
8224fd3683 | ||
|
|
a5dd620b17 | ||
|
|
57bce7d50e | ||
|
|
5c5e909ffd | ||
|
|
0cf308016b | ||
|
|
9787394d5a | ||
|
|
a90111907d | ||
|
|
7c8fa0045c | ||
|
|
0eb5530422 | ||
|
|
a90a553222 | ||
|
|
aee9af7b34 | ||
|
|
571fb6100b | ||
|
|
0a7b7d9fe2 | ||
|
|
afc6343c21 | ||
|
|
bb0e8495d3 | ||
|
|
26a322a5ea | ||
|
|
014ce98359 | ||
|
|
ddf2f6232a | ||
|
|
2486ff3c94 | ||
|
|
9b0a78adda | ||
|
|
b727a52193 | ||
|
|
e0d4427153 | ||
|
|
356093d08a | ||
|
|
b0a91ddf14 | ||
|
|
aa8f8c004f | ||
|
|
d8e5bc9f37 | ||
|
|
75adb6200d | ||
|
|
92df0375dd | ||
|
|
d6f6023d8b | ||
|
|
3c450ad795 | ||
|
|
4ce9a45912 | ||
|
|
68aa232368 | ||
|
|
2545ab5748 | ||
|
|
a5c17cb3db | ||
|
|
280b441a4b | ||
|
|
145499e1e4 | ||
|
|
0ccfa47e7b | ||
|
|
e2735d5cd1 | ||
|
|
5eb1f0d0a9 | ||
|
|
a3652e3f2f | ||
|
|
7d344ef854 | ||
|
|
378d259895 | ||
|
|
3bbec0ebed | ||
|
|
4c9919f0a0 | ||
|
|
c77bf5d1ea | ||
|
|
143053e355 | ||
|
|
47c3a53080 | ||
|
|
0ec2f7d86a | ||
|
|
398864fc6b | ||
|
|
630e4ad7f0 | ||
|
|
7e50d7f76d | ||
|
|
9dfb8634bc | ||
|
|
9556faabb9 | ||
|
|
c9cc4042db | ||
|
|
fc9995dd40 | ||
|
|
5cc450c170 | ||
|
|
d3cfd27f5a | ||
|
|
30c984fd90 | ||
|
|
4d6a8628af | ||
|
|
59b561d2d9 | ||
|
|
77fe287a0b | ||
|
|
d69c2a9d53 | ||
|
|
c9004e75df | ||
|
|
52041fe3d6 | ||
|
|
b9ad8e1e78 | ||
|
|
920703c0c7 | ||
|
|
77298c79af | ||
|
|
9d86dad38d | ||
|
|
36191d2bd4 | ||
|
|
265aec187e | ||
|
|
6072f6ecfa | ||
|
|
fc001216a8 | ||
|
|
354fdabdc4 | ||
|
|
7c4586ce90 | ||
|
|
6d27b926f6 | ||
|
|
f74bdc1d79 | ||
|
|
8522cb8d47 | ||
|
|
30475b9fbd | ||
|
|
1388a673e5 | ||
|
|
ac8c153b28 | ||
|
|
ee12bf684e | ||
|
|
63dc68caac | ||
|
|
ec57c76a2a | ||
|
|
99e9eefffb | ||
|
|
eb0777ebb4 | ||
|
|
ed5ee034b8 | ||
|
|
bb2972b527 | ||
|
|
45b474c9a6 | ||
|
|
99747c022e | ||
|
|
d9a2689469 | ||
|
|
08d8c7eda0 | ||
|
|
4dd23f1be8 | ||
|
|
0ebc988a68 | ||
|
|
9b8af84393 | ||
|
|
ff1ccd7c78 | ||
|
|
3176cc661a | ||
|
|
9ba387f2e4 | ||
|
|
c87dffd6da | ||
|
|
0cf69f5a59 | ||
|
|
babab1e09e | ||
|
|
6f5b079f51 | ||
|
|
9908669be0 | ||
|
|
c2f3e66405 | ||
|
|
b24c4668ed | ||
|
|
fcca387d9a | ||
|
|
97cc6a0d21 | ||
|
|
737565344d | ||
|
|
72f42afb81 | ||
|
|
0a2b91c9ac | ||
|
|
83b8fc597a | ||
|
|
0d4f2946f3 | ||
|
|
305efbea5d | ||
|
|
23f077ce75 | ||
|
|
d667c3c604 | ||
|
|
0502f52ec0 | ||
|
|
40f50bf37a | ||
|
|
0e0a46741f | ||
|
|
5b784659af | ||
|
|
e2f24eef8e | ||
|
|
aa43770bf4 | ||
|
|
45bc823de0 | ||
|
|
1250468f69 | ||
|
|
e94ce3b1cc | ||
|
|
ebb89facbd | ||
|
|
648b089c48 | ||
|
|
0befb6d431 | ||
|
|
35f2ad604c | ||
|
|
e139aee2b3 | ||
|
|
b57bea6f7b | ||
|
|
1828d2e710 | ||
|
|
04d929aae9 | ||
|
|
b51c36645e | ||
|
|
bd1ea5042e | ||
|
|
af4c66bc79 | ||
|
|
2d1f820451 | ||
|
|
179add9e12 | ||
|
|
9d3264256a | ||
|
|
fb234ed339 | ||
|
|
bb7724ece1 | ||
|
|
c67a7823a6 | ||
|
|
518109e9df | ||
|
|
e38a045de3 | ||
|
|
ba82d707d0 | ||
|
|
f366dd8cf2 | ||
|
|
dc6f02a000 | ||
|
|
b81bdebd64 | ||
|
|
6127d80f2a | ||
|
|
49c8a8c6d0 | ||
|
|
e2e0c35008 | ||
|
|
1de6eda49f | ||
|
|
000a0893c3 | ||
|
|
0a68ab682d | ||
|
|
54e51768c0 | ||
|
|
4eb294d856 | ||
|
|
e3b8f2cffe | ||
|
|
c158904efc | ||
|
|
f250082fff | ||
|
|
67432d3fdf | ||
|
|
0ff4299061 | ||
|
|
8ceb89053f | ||
|
|
6fbcb7cef5 | ||
|
|
f8d362352d | ||
|
|
ce3d073abd | ||
|
|
0e8b92e53d | ||
|
|
27d4dfcdfd | ||
|
|
38096db2dd | ||
|
|
bbb093b171 | ||
|
|
98bdf92d70 | ||
|
|
e572d7a626 | ||
|
|
aff4e3523c | ||
|
|
9972c5e40a | ||
|
|
2915ba2933 | ||
|
|
3d9264dae4 | ||
|
|
d030dbcfde | ||
|
|
60cede383a | ||
|
|
7ef06e8d05 | ||
|
|
e8475dbd8d | ||
|
|
3353d9f622 | ||
|
|
893631eb4c | ||
|
|
2286708d56 | ||
|
|
553cff37a1 | ||
|
|
7806c07381 | ||
|
|
b7a40ac3d7 | ||
|
|
5280209075 | ||
|
|
e0ebe92361 | ||
|
|
5c3966a9d6 | ||
|
|
38ca7b246b | ||
|
|
d9f2b21812 | ||
|
|
fb9f41248f | ||
|
|
4087fdd79e | ||
|
|
6bb2c2143e | ||
|
|
dae01698ef | ||
|
|
b65e844824 | ||
|
|
c64c506c52 | ||
|
|
889186ec3e | ||
|
|
9b3c89785e | ||
|
|
cfce4ba460 | ||
|
|
3cb72d89e9 | ||
|
|
cb6fb10c3c | ||
|
|
0c5f052f86 | ||
|
|
c36dc537ef | ||
|
|
4af64c8524 | ||
|
|
767e91f720 | ||
|
|
38447af730 | ||
|
|
94fb4dceac | ||
|
|
cbb98481c8 | ||
|
|
538806678d | ||
|
|
65cfe1a07a | ||
|
|
81ea0256c5 | ||
|
|
bd51342fdf | ||
|
|
e62ec45e82 | ||
|
|
31bcc21c35 | ||
|
|
2a128af227 | ||
|
|
9df339e500 | ||
|
|
09e4d4d452 | ||
|
|
74d8d516b3 | ||
|
|
44027b9303 | ||
|
|
2362d2365d | ||
|
|
155ff42958 | ||
|
|
f89260bacd | ||
|
|
93770d481a | ||
|
|
4a8a15e4d6 | ||
|
|
7a8707e5d0 | ||
|
|
e89bbb05b1 | ||
|
|
b9b868d55a | ||
|
|
50217d169d | ||
|
|
179a69df1c | ||
|
|
9e7f70c455 | ||
|
|
e4c21e8552 | ||
|
|
6a761c05e6 | ||
|
|
d9815cc96c | ||
|
|
0e14099f0c | ||
|
|
629ef72954 | ||
|
|
711acd6bb8 | ||
|
|
4cbada21a7 | ||
|
|
e04d071ca7 | ||
|
|
1568844255 | ||
|
|
89989fa102 | ||
|
|
bf94277b0f | ||
|
|
01cb37e82e | ||
|
|
9375960745 | ||
|
|
d8cb2cbbf6 | ||
|
|
82ec2664f3 | ||
|
|
9372db6279 | ||
|
|
e76c4a5902 | ||
|
|
075b54883b | ||
|
|
99861266c6 | ||
|
|
006f69e0d2 | ||
|
|
de4d62e63e | ||
|
|
dd272bf194 | ||
|
|
388ca462a4 | ||
|
|
5b85868993 | ||
|
|
f70fa75e86 | ||
|
|
bbfd3e5171 | ||
|
|
b1422bc97e | ||
|
|
f14f6ff536 | ||
|
|
c8657022a2 | ||
|
|
7b5ee7b0ed | ||
|
|
bda52d5f3d | ||
|
|
137f0ed7f3 | ||
|
|
cf839c9491 | ||
|
|
0d12487c65 | ||
|
|
dc20befb86 | ||
|
|
6c6b38a2e3 | ||
|
|
1ca706744e | ||
|
|
5e6fc4a82b | ||
|
|
7cbc9e0bb1 | ||
|
|
1ae8a8675e | ||
|
|
d3f5e613ea | ||
|
|
2479bae12e | ||
|
|
fd62b6ec67 | ||
|
|
348555981b | ||
|
|
6faf2e172b | ||
|
|
54953ccb4b | ||
|
|
f84773f1f8 | ||
|
|
603da5560f | ||
|
|
10f5bfef67 | ||
|
|
4613e91a13 | ||
|
|
937b65ae95 | ||
|
|
39ce73284e | ||
|
|
64d75794d3 | ||
|
|
59f59311b4 | ||
|
|
2c02712b1b | ||
|
|
8239bd3fbd | ||
|
|
29c0393f98 | ||
|
|
14aa60891c | ||
|
|
0c0a673fa9 | ||
|
|
6ca0dc7dfc | ||
|
|
91ee1e5c8b | ||
|
|
71ec0634da | ||
|
|
94f98d8e44 | ||
|
|
8c44be5122 | ||
|
|
2e7729ce84 | ||
|
|
b9d83b18e3 | ||
|
|
6c39e1a2ab | ||
|
|
dd84d3fcb3 | ||
|
|
5f6d633c25 | ||
|
|
64a558b120 | ||
|
|
77047967ce | ||
|
|
c138f923ce | ||
|
|
d6b6c05640 | ||
|
|
c89d3dd542 | ||
|
|
a9caac47d7 | ||
|
|
311b957550 | ||
|
|
3ad6036eb8 | ||
|
|
a0a5f0c7e0 | ||
|
|
6da6f2b97b | ||
|
|
a7df1415d2 | ||
|
|
381a09d87e | ||
|
|
c4aebe4ac3 | ||
|
|
08e28b0a5f | ||
|
|
cc6f4e6931 | ||
|
|
08c946547e | ||
|
|
64297772e4 | ||
|
|
e1ad117473 | ||
|
|
2cd44c0b66 | ||
|
|
c2f7a53017 | ||
|
|
b6c49828ed | ||
|
|
104df074e9 | ||
|
|
58aa71997d | ||
|
|
9a3c8e000b | ||
|
|
3790e926de | ||
|
|
1d569d35b4 | ||
|
|
4e8db8d3d4 | ||
|
|
02f161f76c | ||
|
|
c17bdebffd | ||
|
|
279ab6e5e3 | ||
|
|
0a16e41c78 | ||
|
|
45c4e0c850 | ||
|
|
32563a551d | ||
|
|
a824c23022 | ||
|
|
58a02be5cf | ||
|
|
5df9d4a3e5 | ||
|
|
a3edb65613 | ||
|
|
3637f27369 | ||
|
|
8811f56559 | ||
|
|
e1db07cc25 | ||
|
|
e928ce22b4 | ||
|
|
2970497683 | ||
|
|
25cddbada6 | ||
|
|
35348fef6a | ||
|
|
f6879f1c12 | ||
|
|
c3e8fcc3d3 | ||
|
|
8ac1ccaa34 | ||
|
|
a7d604555a | ||
|
|
8bc356774a | ||
|
|
1dfba6ffbb | ||
|
|
e4c8997bf3 | ||
|
|
980c474bdf | ||
|
|
ded13c232c | ||
|
|
a8b6eead26 | ||
|
|
81c800ce54 | ||
|
|
c983b77c4f | ||
|
|
b5dc577d01 | ||
|
|
ca51df20d6 | ||
|
|
b19d5d06a0 | ||
|
|
2772e568d5 | ||
|
|
59944e19db | ||
|
|
ba4483b5ec | ||
|
|
fbc640b7c4 | ||
|
|
af6e07323b | ||
|
|
e926e5b9d6 | ||
|
|
ddf745f39a | ||
|
|
d0dddbfe01 | ||
|
|
c608a067ed | ||
|
|
fa7b11198e | ||
|
|
8bd68c4269 | ||
|
|
55f3e0f7e0 | ||
|
|
f7f0c11587 | ||
|
|
b633d21ea8 | ||
|
|
2d5cb7e5b8 | ||
|
|
dba9a119ef | ||
|
|
6fc52fd62d | ||
|
|
37fb0b3aca | ||
|
|
c35d3bb1ae | ||
|
|
ab476712af | ||
|
|
e424faaba2 | ||
|
|
b68b47ab32 | ||
|
|
bda8171af4 | ||
|
|
bac98b5e38 | ||
|
|
0f2a5bf2b4 | ||
|
|
9ebd80f740 | ||
|
|
a76d264a0c | ||
|
|
0be7ed7ecf | ||
|
|
5c6303486c | ||
|
|
2ccd2cea22 | ||
|
|
d93c19c2ab | ||
|
|
4e98504813 | ||
|
|
ab0bd3a5e1 | ||
|
|
62628ed0d8 | ||
|
|
b1e5464843 | ||
|
|
8e1359f126 | ||
|
|
f84a87574c | ||
|
|
1c16d367ed | ||
|
|
dc191fdbba | ||
|
|
875c410443 | ||
|
|
bcf5dfa70c | ||
|
|
77d76938a3 | ||
|
|
1267bc426a | ||
|
|
5e74045f3d | ||
|
|
3adf42925d | ||
|
|
f95fa2c906 | ||
|
|
ac2f65844c | ||
|
|
546dd7b4ad | ||
|
|
fcf4ab5b4f | ||
|
|
c57d5e8f1a | ||
|
|
cd57226a45 | ||
|
|
f5a11061ac | ||
|
|
93a3d814d6 | ||
|
|
a0e24880c3 | ||
|
|
e63ec7f22a | ||
|
|
6910a415a2 | ||
|
|
fccb42761c | ||
|
|
f75ff0d3be | ||
|
|
931ac2308d | ||
|
|
42c5ab642e | ||
|
|
8d8935c045 | ||
|
|
3baec2745b | ||
|
|
df72b55fe3 | ||
|
|
cbc5a35bcd | ||
|
|
959562c5ff | ||
|
|
84aa1dd79e | ||
|
|
d49a579cd6 |
@@ -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
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "cz_conventional_commits"
|
||||
tag_format = "v$version"
|
||||
version_scheme = "semver"
|
||||
version = "0.5.2"
|
||||
version = "0.6.2"
|
||||
update_changelog_on_bump = true
|
||||
major_version_zero = true
|
||||
changelog_file = "CHANGELOG.md"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
title: "[Milestone] "
|
||||
labels: ["#OKR", "#PLANNING"]
|
||||
body:
|
||||
- type: input
|
||||
id: has-version
|
||||
attributes:
|
||||
label: Version
|
||||
description: A tag for the associated milestone.
|
||||
placeholder: v0.6.0
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Objective
|
||||
description: Explain the objective of the OKR in less than 100 characters.
|
||||
placeholder: Ethereum IBC integration with Sonr.
|
||||
render: markdown
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Task List
|
||||
description: |
|
||||
Break down the objective into a list of tasks to be completed.
|
||||
value: |
|
||||
- [ ] #
|
||||
- [ ] #
|
||||
- [ ] #
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Bug Report
|
||||
description: File a bug report.
|
||||
title: "ERROR: "
|
||||
labels: ["#BUG", "#HELP"]
|
||||
projects: ["onsonr/39"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: What operating system are you using?
|
||||
placeholder: "Example: macOS Big Sur"
|
||||
value: operating system
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Network
|
||||
description: What network are you using?
|
||||
multiple: false
|
||||
options:
|
||||
- LocalNet
|
||||
- TestNet
|
||||
- MainNet
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description:
|
||||
The Code of Conduct helps create a safe space for everyone. We require
|
||||
that everyone agrees to it.
|
||||
options:
|
||||
- label: I agree to follow this project's [Code of Conduct](link/to/coc)
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for completing our form!"
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Community Discussions
|
||||
url: https://github.com/orgs/onsonr/discussions
|
||||
about: Please submit ideas and suggestions here.
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Default Todo
|
||||
about: Break down feature requirements into tasks.
|
||||
title: "Name of the new task"
|
||||
labels:
|
||||
- "#TODO"
|
||||
- "#OKR"
|
||||
assignees: "prnk28"
|
||||
projects: "onsonr/37"
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
The expected deliverable of the task.
|
||||
|
||||
### Associated Files
|
||||
|
||||
These files will be modified by this task.
|
||||
|
||||
### References
|
||||
|
||||
Use these documents to help you complete the task.
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
## 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):
|
||||
@@ -0,0 +1,3 @@
|
||||
"feature": ["feature/*", "feat/*"]
|
||||
"bugfix": fix/*
|
||||
"enhancement": enhancement/*
|
||||
@@ -0,0 +1,249 @@
|
||||
{
|
||||
"scopes": [
|
||||
"core-chain",
|
||||
"core-ibc",
|
||||
"x-did",
|
||||
"x-dwn",
|
||||
"x-svc",
|
||||
"security-mpc",
|
||||
"security-ucan",
|
||||
"security-zkp",
|
||||
"ci-cd",
|
||||
"dev-ops"
|
||||
],
|
||||
"docs": [
|
||||
{
|
||||
"keywords": ["github", "actions", "workflows", "syntax"],
|
||||
"url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "tooling", "cosmovisor"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor"
|
||||
},
|
||||
{
|
||||
"keywords": ["process-compose", "configuration"],
|
||||
"url": "https://f1bonacc1.github.io/process-compose/configuration/"
|
||||
},
|
||||
{
|
||||
"keywords": ["taskfile", "cli", "reference"],
|
||||
"url": "https://taskfile.dev/reference/cli"
|
||||
},
|
||||
{
|
||||
"keywords": [],
|
||||
"url": "https://taskfile.dev/reference/schema"
|
||||
},
|
||||
{
|
||||
"keywords": ["taskfile", "templating", "reference"],
|
||||
"url": "https://taskfile.dev/reference/templating/"
|
||||
},
|
||||
{
|
||||
"keywords": ["mkdocs", "material", "reference"],
|
||||
"url": "https://squidfunk.github.io/mkdocs-material/reference/"
|
||||
},
|
||||
{
|
||||
"keywords": ["pkl", "language", "reference"],
|
||||
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
|
||||
},
|
||||
{
|
||||
"keywords": ["pwa", "service-workers", "web"],
|
||||
"url": "https://web.dev/learn/pwa/service-workers/"
|
||||
},
|
||||
{
|
||||
"keywords": ["service-workers", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["web-authentication", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "cosmos", "manager"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "cosmos", "messages", "queries"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "messages", "service", "cosmos"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services"
|
||||
},
|
||||
{
|
||||
"keywords": ["sdk", "modules", "services", "cosmos", "query"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "depinject", "modules", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "apps", "sdk", "interchain-accounts"],
|
||||
"url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "apps", "sdk", "transfer"],
|
||||
"url": "https://ibc.cosmos.network/v8/apps/transfer/overview/"
|
||||
},
|
||||
{
|
||||
"keywords": ["osmosis", "modules", "ibc", "assets"],
|
||||
"url": "https://docs.osmosis.zone/osmosis-core/asset-info/"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "osmosis", "tokenfactory", "modules", "assets"],
|
||||
"url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "mint", "cctp", "noble", "assets"],
|
||||
"url": "https://docs.noble.xyz/cctp/mint"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "relayer", "nomic", "assets"],
|
||||
"url": "https://docs.nomic.io/network/ibc-relayer"
|
||||
},
|
||||
{
|
||||
"keywords": ["ibc", "cctp", "noble", "mint_forward", "assets"],
|
||||
"url": "https://docs.noble.xyz/cctp/mint_forward"
|
||||
},
|
||||
{
|
||||
"keywords": ["evmos", "erc20", "assets"],
|
||||
"url": "https://docs.evmos.org/protocol/modules/erc20"
|
||||
},
|
||||
{
|
||||
"keywords": ["nomic", "nbtc", "assets"],
|
||||
"url": "https://docs.nomic.io/nbtc"
|
||||
},
|
||||
{
|
||||
"keywords": ["mpc", "wallet", "cryptography", "capability", "invokation"],
|
||||
"url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
|
||||
},
|
||||
{
|
||||
"keywords": ["ucan", "spec", "cryptography", "authorization"],
|
||||
"url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
|
||||
},
|
||||
{
|
||||
"keywords": ["zero-knowledge", "proofs", "cryptography", "privacy"],
|
||||
"url": "https://eprint.iacr.org/2021/1672.pdf"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "sse"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/sse"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "websocket"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/websocket"
|
||||
},
|
||||
{
|
||||
"keywords": ["gateway", "http", "subdomain"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/subdomain"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "models", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/data-modeling"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "two=phase", "transfers", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/two-phase-transfers"
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"tigerbeetle",
|
||||
"oracle",
|
||||
"reliable",
|
||||
"transaction",
|
||||
"submission"
|
||||
],
|
||||
"url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission"
|
||||
},
|
||||
{
|
||||
"keywords": ["currency", "exchange", "tigerbeetle", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange"
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"balance",
|
||||
"tigerbeetle",
|
||||
"oracle",
|
||||
"conditional",
|
||||
"transfers"
|
||||
],
|
||||
"url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "account", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/reference/account"
|
||||
},
|
||||
{
|
||||
"keywords": ["tigerbeetle", "transfer", "oracle"],
|
||||
"url": "https://docs.tigerbeetle.com/reference/transfer"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "packages", "consumer", "oracle"],
|
||||
"url": "https://docs.substreams.dev/documentation/consume/packages"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "deploy", "service", "oracle"],
|
||||
"url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service"
|
||||
},
|
||||
{
|
||||
"keywords": ["substreams", "tutorial", "cosmos", "injective"],
|
||||
"url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "jwt"],
|
||||
"url": "https://echo.labstack.com/docs/cookbook/jwt"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "secure"],
|
||||
"url": "https://echo.labstack.com/docs/middleware/secure"
|
||||
},
|
||||
{
|
||||
"keywords": ["worker", "http", "service-workers", "web", "api"],
|
||||
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
|
||||
},
|
||||
{
|
||||
"keywords": ["synapse", "matrix", "configuration", "usage"],
|
||||
"url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "orm", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "auth"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/auth"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "bank"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/bank"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "authz", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/authz"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "collections", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "gov", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/gov"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "modules", "staking", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/staking"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "protobuf", "annotations", "sdk"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "group"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/group"
|
||||
},
|
||||
{
|
||||
"keywords": ["cosmos", "sdk", "modules", "nft"],
|
||||
"url": "https://docs.cosmos.network/v0.50/build/modules/nft"
|
||||
}
|
||||
],
|
||||
"next-milestone": "34"
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
name: Check PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
|
||||
jobs:
|
||||
verify-pr:
|
||||
name: Test Lints
|
||||
if: github.event_name == 'pull_request'
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required to fetch all history for merging
|
||||
|
||||
- uses: TimonVS/pr-labeler-action@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
|
||||
- name: Trunk Check
|
||||
uses: trunk-io/trunk-action@v1
|
||||
|
||||
test-builds:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Builds
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Run Sonrd Build
|
||||
run: make build
|
||||
|
||||
test-unit:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Unit
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make test-unit
|
||||
|
||||
validate-release:
|
||||
if: github.event_name == 'merge_group' || github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Version
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Version Check
|
||||
run: make validate-tag
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check GoReleaser Config
|
||||
run: make release-check
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,68 @@
|
||||
name: Merge Group
|
||||
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
permissions:
|
||||
contents: read # for TimonVS/pr-labeler-action to read config file
|
||||
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
|
||||
|
||||
jobs:
|
||||
test-race:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'merge_group'
|
||||
name: Test Race
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make test-race
|
||||
|
||||
test-cover:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'merge_group'
|
||||
name: Test Coverage
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make test-cover
|
||||
|
||||
test-release:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test Release
|
||||
if: github.event_name == 'merge_group'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: onsonr/sonr
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
|
||||
- name: Release Dry Run
|
||||
run: make release-dry
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Post Merge
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
bump-version:
|
||||
name: Cz Bump
|
||||
if: |
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.user.login != 'dependabot[bot]' &&
|
||||
github.event.pull_request.user.login != 'dependabot-preview[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ssh-key: "${{ secrets.COMMIT_KEY }}"
|
||||
|
||||
- name: Create bump and changelog
|
||||
uses: commitizen-tools/commitizen-action@master
|
||||
with:
|
||||
push: false
|
||||
increment: patch
|
||||
branch: main
|
||||
|
||||
- name: Push using ssh
|
||||
run: |
|
||||
git push origin main --tags
|
||||
@@ -0,0 +1,66 @@
|
||||
name: New Release
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
buf_push:
|
||||
name: Publish Protobufs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Run `git checkout`
|
||||
- uses: actions/checkout@v4
|
||||
# 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 }}
|
||||
|
||||
container-push:
|
||||
name: Publish Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ghcr.io/onsonr/sonr:latest
|
||||
|
||||
docs-push:
|
||||
runs-on: ubuntu-latest
|
||||
name: Publish Tech Docs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure Git Credentials
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
- run: pip install mkdocs-material
|
||||
- run: mkdocs gh-deploy --force
|
||||
@@ -1,17 +1,21 @@
|
||||
name: Scheduled Release
|
||||
name: New Tag
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
name: Release motr, sonrd, and DWN
|
||||
new-release:
|
||||
name: Create Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -24,7 +28,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
|
||||
- name: Login to Docker Hub
|
||||
@@ -33,16 +37,15 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser-pro
|
||||
version: latest
|
||||
args: release --clean
|
||||
- name: Run GoReleaser
|
||||
run: make release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_RELEASER_TOKEN }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
REDDIT_APP_ID: ${{ secrets.REDDIT_APP_ID }}
|
||||
REDDIT_SECRET: ${{ secrets.REDDIT_SECRET }}
|
||||
REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }}
|
||||
REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }}
|
||||
@@ -1,57 +0,0 @@
|
||||
name: Upload Public Assets
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
buf_push:
|
||||
name: Publish to buf.build/onsonr/sonr
|
||||
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
|
||||
name: Publish to pkl.sh
|
||||
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
|
||||
name: Publish to cdn.sonr.id
|
||||
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: .
|
||||
@@ -1,55 +0,0 @@
|
||||
name: Update Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
name: "Run tests"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
check-latest: true
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
||||
check-proto-changes:
|
||||
name: "Check Proto Changes"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
proto_changed: ${{ steps.check_proto.outputs.proto_changed }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check for changes in proto directory
|
||||
id: check_proto
|
||||
run: |
|
||||
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^proto/' && \
|
||||
echo "proto_changed=true" >> $GITHUB_OUTPUT || \
|
||||
echo "proto_changed=false" >> $GITHUB_OUTPUT
|
||||
|
||||
bump-version:
|
||||
needs: [run-tests, check-proto-changes]
|
||||
runs-on: ubuntu-latest
|
||||
name: "Bump Version"
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
|
||||
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 }}
|
||||
increment: ${{ needs.check-proto-changes.outputs.proto_changed == 'true' && 'MINOR' || 'PATCH' }}
|
||||
+33
-2
@@ -1,5 +1,13 @@
|
||||
# Aider related generated files
|
||||
.aider-context
|
||||
|
||||
# Binaries
|
||||
.task
|
||||
no
|
||||
.data
|
||||
schemas
|
||||
*.db
|
||||
tools-stamp
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
@@ -10,14 +18,21 @@
|
||||
.session.vim
|
||||
aof*
|
||||
dist
|
||||
**/.haptic
|
||||
static
|
||||
pkg/webapp/dist
|
||||
.agent
|
||||
|
||||
# Test binary
|
||||
*.test
|
||||
.devon*
|
||||
**/.DS_Store
|
||||
.task
|
||||
.wrangler
|
||||
|
||||
# Output of the go coverage tool
|
||||
*.out
|
||||
|
||||
tmp
|
||||
# Exclude embedded files
|
||||
!internal/files/dist
|
||||
|
||||
@@ -31,6 +46,7 @@ go.work.sum
|
||||
# Environment files
|
||||
.env
|
||||
**/*.env
|
||||
**/sonr.log
|
||||
|
||||
|
||||
# Terraform
|
||||
@@ -49,6 +65,7 @@ override.tf.json
|
||||
|
||||
.terraformrc
|
||||
terraform.rc
|
||||
flake.lock
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
@@ -71,10 +88,24 @@ deploy/**/data
|
||||
x/.DS_Store
|
||||
.aider*
|
||||
buildenv*
|
||||
nebula/node_modules
|
||||
node_modules
|
||||
cmd/gateway/node_modules
|
||||
pkg/nebula/node_modules
|
||||
configs/logs.json
|
||||
|
||||
mprocs.yaml
|
||||
build
|
||||
sonr.wiki
|
||||
|
||||
!devbox.lock
|
||||
!buf.lock
|
||||
|
||||
.air.toml
|
||||
mprocs.yaml
|
||||
mprocs.log
|
||||
tools-stamp
|
||||
sonr.log
|
||||
deploy/conf
|
||||
|
||||
interchaintest-downloader
|
||||
.haptic
|
||||
|
||||
+65
-100
@@ -2,68 +2,71 @@
|
||||
version: 2
|
||||
project_name: sonr
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- echo "Release date is {{ .Env.RELEASE_DATE }}"
|
||||
|
||||
builds:
|
||||
- id: sonr
|
||||
goos: [linux, darwin]
|
||||
goarch: [amd64, arm64]
|
||||
main: ./cmd/sonrd
|
||||
binary: sonrd
|
||||
builder: go
|
||||
gobinary: go
|
||||
command: build
|
||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
goamd64:
|
||||
- v1
|
||||
flags:
|
||||
- -mod=readonly
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||
|
||||
- id: hway
|
||||
goos: [linux, darwin]
|
||||
goarch: [amd64, arm64]
|
||||
main: ./cmd/hway
|
||||
binary: hway
|
||||
builder: go
|
||||
gobinary: go
|
||||
command: build
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||
|
||||
- id: motr
|
||||
goos: [js]
|
||||
goarch: [wasm]
|
||||
main: ./cmd/motr/motr.go
|
||||
binary: motr
|
||||
builder: go
|
||||
gobinary: go
|
||||
command: build
|
||||
- -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.Version={{.Version}}
|
||||
- -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
|
||||
- -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
|
||||
tags:
|
||||
- netgo
|
||||
- ledger
|
||||
|
||||
archives:
|
||||
- id: sonr
|
||||
builds: [sonr]
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||
name_template: >-
|
||||
sonr_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
format: tar.gz
|
||||
files:
|
||||
- src: README*
|
||||
- src: CHANGELOG*
|
||||
wrap_in_directory: true
|
||||
|
||||
- id: hway
|
||||
builds: [hway]
|
||||
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||
format: tar.gz
|
||||
files:
|
||||
nfpms:
|
||||
- id: sonr
|
||||
package_name: sonrd
|
||||
file_name_template: "sonrd_{{ .Os }}_{{ .Arch }}{{ .ConventionalExtension }}"
|
||||
builds: [sonr]
|
||||
vendor: Sonr
|
||||
homepage: "https://onsonr.dev"
|
||||
maintainer: "Sonr <support@onsonr.dev>"
|
||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||
license: "Apache 2.0"
|
||||
formats:
|
||||
- rpm
|
||||
- deb
|
||||
- apk
|
||||
dependencies:
|
||||
- ipfs
|
||||
contents:
|
||||
- src: README*
|
||||
- src: CHANGELOG*
|
||||
|
||||
release:
|
||||
github:
|
||||
owner: onsonr
|
||||
name: sonr
|
||||
name_template: '{{.Now.Format "2006.01.02"}}'
|
||||
draft: false
|
||||
replace_existing_draft: true
|
||||
replace_existing_artifacts: true
|
||||
extra_files:
|
||||
- glob: ./CHANGELOG*
|
||||
- glob: ./README*
|
||||
- glob: ./LICENSE*
|
||||
- glob: ./pkl/*
|
||||
dst: /usr/share/doc/sonrd
|
||||
bindir: /usr/bin
|
||||
section: net
|
||||
priority: optional
|
||||
# Add these lines to match build config
|
||||
|
||||
brews:
|
||||
- name: sonr
|
||||
@@ -73,7 +76,7 @@ brews:
|
||||
email: bot@goreleaser.com
|
||||
directory: Formula
|
||||
caveats: "Run a local sonr node and access it with the hway proxy"
|
||||
homepage: "https://sonr.io/"
|
||||
homepage: "https://onson.dev"
|
||||
description: "Sonr is a decentralized, permissionless, and censorship-resistant identity network."
|
||||
dependencies:
|
||||
- name: ipfs
|
||||
@@ -83,59 +86,21 @@ brews:
|
||||
branch: master
|
||||
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
|
||||
|
||||
- name: hway
|
||||
ids: [hway]
|
||||
commit_author:
|
||||
name: goreleaserbot
|
||||
email: bot@goreleaser.com
|
||||
directory: Formula
|
||||
caveats: "Use hway to interact with the Sonr network"
|
||||
homepage: "https://sonr.io/"
|
||||
description: "Motr is a proxy for interacting with the Sonr network."
|
||||
dependencies:
|
||||
- name: ipfs
|
||||
repository:
|
||||
owner: onsonr
|
||||
name: homebrew-tap
|
||||
branch: master
|
||||
|
||||
# .goreleaser.yaml
|
||||
dockers:
|
||||
- # Sonr Binary
|
||||
id: sonrd
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- sonr
|
||||
image_templates:
|
||||
- "onsonr/sonrd:latest"
|
||||
- "onsonr/sonrd:{{ .Tag }}"
|
||||
dockerfile: "./deploy/release/sonrd.Dockerfile"
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title=sonrd"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
|
||||
- # Motr Binary
|
||||
id: hway
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
ids:
|
||||
- hway
|
||||
image_templates:
|
||||
- "onsonr/hway:latest"
|
||||
- "onsonr/hway:{{ .Tag }}"
|
||||
dockerfile: "./deploy/release/hway.Dockerfile"
|
||||
build_flag_templates:
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title=hway"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
release:
|
||||
github:
|
||||
owner: onsonr
|
||||
name: sonr
|
||||
name_template: "{{ .Tag }} | {{ .Env.RELEASE_DATE }}"
|
||||
draft: false
|
||||
replace_existing_draft: true
|
||||
replace_existing_artifacts: true
|
||||
extra_files:
|
||||
- glob: ./README*
|
||||
- glob: ./scripts/install.sh
|
||||
- glob: ./scripts/test_node.sh
|
||||
- glob: ./scripts/test_ics_node.sh
|
||||
|
||||
announce:
|
||||
telegram:
|
||||
enabled: true
|
||||
chat_id: -1002222617755
|
||||
message_template: "__*New Sonr Release*__ *{{.Tag}}* is out"
|
||||
parse_mode: MarkdownV2
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
*out
|
||||
*logs
|
||||
*actions
|
||||
*notifications
|
||||
*tools
|
||||
plugins
|
||||
user_trunk.yaml
|
||||
user.yaml
|
||||
tmp
|
||||
@@ -0,0 +1,27 @@
|
||||
linters:
|
||||
disable:
|
||||
- unused # Disables unreachable code checking
|
||||
|
||||
run:
|
||||
# Exclude test files from analysis
|
||||
tests: false
|
||||
|
||||
# Define which files and directories to exclude
|
||||
issues:
|
||||
exclude-rules:
|
||||
# Exclude all test files
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- all
|
||||
|
||||
# Exclude specific directories
|
||||
exclude-dirs:
|
||||
- api/did/v1
|
||||
- api/dwn/v1
|
||||
- api/svc/v1
|
||||
- internal
|
||||
|
||||
# Exclude specific file patterns
|
||||
exclude-files:
|
||||
- ".*\\.pb\\.go$"
|
||||
- ".*_templ\\.go$"
|
||||
@@ -0,0 +1,4 @@
|
||||
# Following source doesn't work in most setups
|
||||
ignored:
|
||||
- SC1090
|
||||
- SC1091
|
||||
@@ -0,0 +1,2 @@
|
||||
# Prettier friendly markdownlint config (all formatting rules disabled)
|
||||
extends: markdownlint/style/prettier
|
||||
@@ -0,0 +1 @@
|
||||
edition = "2021"
|
||||
@@ -0,0 +1,7 @@
|
||||
enable=all
|
||||
source-path=SCRIPTDIR
|
||||
disable=SC2154
|
||||
|
||||
# If you're having issues with shellcheck following source, disable the errors via:
|
||||
# disable=SC1090
|
||||
# disable=SC1091
|
||||
@@ -0,0 +1,7 @@
|
||||
rules:
|
||||
quoted-strings:
|
||||
required: only-when-needed
|
||||
extra-allowed: ["{|}"]
|
||||
key-duplicates: {}
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
||||
@@ -0,0 +1,41 @@
|
||||
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
|
||||
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
|
||||
version: 0.1
|
||||
cli:
|
||||
version: 1.22.8
|
||||
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
|
||||
plugins:
|
||||
sources:
|
||||
- id: trunk
|
||||
ref: v1.6.6
|
||||
uri: https://github.com/trunk-io/plugins
|
||||
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
|
||||
runtimes:
|
||||
enabled:
|
||||
- go@1.23.0
|
||||
- node@18.20.5
|
||||
- python@3.10.8
|
||||
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
|
||||
lint:
|
||||
enabled:
|
||||
- actionlint@1.7.6
|
||||
- checkov@3.2.347
|
||||
- clippy@1.65.0
|
||||
- git-diff-check
|
||||
- gofmt@1.20.4
|
||||
- golangci-lint@1.62.2
|
||||
- hadolint@2.12.1-beta
|
||||
# - markdownlint@0.43.0
|
||||
- osv-scanner@1.9.2
|
||||
- prettier@3.4.2
|
||||
- rustfmt@1.65.0
|
||||
# - shellcheck@0.10.0
|
||||
# - shfmt@3.6.0
|
||||
- taplo@0.9.3
|
||||
- trufflehog@3.88.0
|
||||
actions:
|
||||
enabled:
|
||||
- trunk-announce
|
||||
- trunk-check-pre-push
|
||||
- trunk-fmt-pre-commit
|
||||
- trunk-upgrade-available
|
||||
+448
-13
@@ -1,3 +1,445 @@
|
||||
## v0.6.2 (2025-01-06)
|
||||
|
||||
### Refactor
|
||||
|
||||
- simplify release process and remove unnecessary tasks
|
||||
- remove devcontainer configuration
|
||||
|
||||
## v0.6.1 (2024-12-30)
|
||||
|
||||
### Feat
|
||||
|
||||
- convert highway sink schema to SQLite
|
||||
- **scopes**: add Web Authentication API documentation
|
||||
- add install script for Sonr binaries
|
||||
|
||||
### Fix
|
||||
|
||||
- Handle only 500 errors in ErrorHandler
|
||||
- Return only on 500 errors in error handler
|
||||
- update sqlc queries to match schema and use SQLite conventions
|
||||
- Rename DecodeWasmContext to decodeWasmContext
|
||||
- resolve lint errors in WASMMiddleware function
|
||||
- prevent automatic version bumps from dependabot
|
||||
- correct merge workflow to increment patch version
|
||||
|
||||
### Refactor
|
||||
|
||||
- remove outdated scopes
|
||||
- remove unnecessary seed message
|
||||
- Update sqlc queries to match schema and sqlite conventions
|
||||
- move gateway and vault components to new locations
|
||||
- **scopes**: simplify scopes.json structure
|
||||
- **scopes**: rename and reorganize scopes
|
||||
- **api**: remove unused Allocate RPC from Query service
|
||||
- remove postgresql tasks
|
||||
- remove unused AI PR body generator step
|
||||
- simplify Taskfile and remove unused chain configurations
|
||||
|
||||
## v0.6.0 (2024-12-24)
|
||||
|
||||
### Feat
|
||||
|
||||
- Add option to create draft issues from the new-issue script
|
||||
|
||||
### Refactor
|
||||
|
||||
- rename DID, DWN, and SVC modules to core-dids, core-dwns, and core-svcs respectively
|
||||
- rename MsgInitialize to MsgSpawn for clarity
|
||||
- rename scopes in .github/scopes.json for better clarity
|
||||
|
||||
## v0.5.28 (2024-12-22)
|
||||
|
||||
### Fix
|
||||
|
||||
- Sink
|
||||
|
||||
### Refactor
|
||||
|
||||
- update testnet configuration
|
||||
- optimize GitHub Actions workflow triggers (#1204)
|
||||
- Move embed
|
||||
|
||||
## v0.1.6 (2024-12-16)
|
||||
|
||||
## v0.5.26 (2024-12-13)
|
||||
|
||||
## v0.5.25 (2024-12-11)
|
||||
|
||||
### Feat
|
||||
|
||||
- enable GoReleaser releases on tags and snapshots
|
||||
- automate release on tag and workflow dispatch
|
||||
|
||||
### Fix
|
||||
|
||||
- Correct regular expression for version tags in release workflow
|
||||
|
||||
## v0.5.24 (2024-12-11)
|
||||
|
||||
### Feat
|
||||
|
||||
- prevent duplicate releases
|
||||
|
||||
## v0.5.23 (2024-12-11)
|
||||
|
||||
### Refactor
|
||||
|
||||
- rename scheduled release workflow to versioned release
|
||||
- remove changelog from release artifacts
|
||||
|
||||
## v0.5.22 (2024-12-11)
|
||||
|
||||
### Feat
|
||||
|
||||
- Implement passkey-based authentication and registration flow
|
||||
- allow manual triggering of deployment workflow
|
||||
- add start-tui command for interactive mode
|
||||
- add coin selection and update passkey input in registration form
|
||||
- add hway command for Sonr DID gateway
|
||||
- Conditionally install process-compose only if binary not found
|
||||
- Add process-compose support with custom start and down commands
|
||||
- implement passkey registration flow
|
||||
- Improve createProfile form layout with wider max-width and enhanced spacing
|
||||
- improve index page UI with new navigation buttons and remove redundant settings buttons
|
||||
- Make input rows responsive with grid layout for mobile and desktop
|
||||
- enhance index page with additional settings buttons and style adjustments
|
||||
- implement passkey-based authentication
|
||||
- add support for Cloudsmith releases
|
||||
- add go dependency and enhance devbox environment variables
|
||||
- update create profile form placeholders and handle
|
||||
- add DID-based authentication middleware
|
||||
- Add validation for human verification slider sum in CreateProfile form
|
||||
- implement passkey registration flow
|
||||
- Update WebAuthn credential handling with modern browser standards
|
||||
- Streamline passkey registration with automatic form submission
|
||||
- Add credential parsing and logging in register finish handler
|
||||
- Add credential details row with icon after passkey creation
|
||||
- Add form validation for passkey credential input
|
||||
- implement passkey registration flow
|
||||
- Add hidden input to store passkey credential data for form submission
|
||||
- add CI workflow for deploying network
|
||||
- add hway binary support and Homebrew formula
|
||||
- remove username from passkey creation
|
||||
- implement passkey registration flow
|
||||
- add passkey creation functionality
|
||||
- add CNAME for onsonr.dev domain
|
||||
|
||||
### Fix
|
||||
|
||||
- use Unix domain sockets for devnet processes
|
||||
- correct workflow name and improve devnet deployment process
|
||||
- correct title of profile creation page
|
||||
- rename devbox start script to up and remove stop script
|
||||
- Consolidate archive configuration and add LICENSE file
|
||||
- Improve cross-browser passkey credential handling and encoding
|
||||
- Remove commented-out code in passkey registration script
|
||||
- remove line-clamp from tailwind config
|
||||
- remove unnecessary background and restart settings from process-compose.yaml
|
||||
- suppress process-compose server output and log to file
|
||||
|
||||
### Refactor
|
||||
|
||||
- remove unnecessary git fetch step in deploy workflow
|
||||
- remove obsolete interchain test dependencies
|
||||
- update index views to use new nebula components
|
||||
- move Wasm related code to pkg/common/wasm
|
||||
- migrate config package to pkg directory
|
||||
- migrate to new configuration system and model definitions
|
||||
- move session package to pkg directory
|
||||
- Refactor registration forms to use UI components
|
||||
- move gateway config to vault package
|
||||
- improve command line flag descriptions and variable names
|
||||
- refactor hway command to use echo framework for server
|
||||
- Update root command to load EnvImpl from cobra flags
|
||||
- Modify command flags and environment loading logic in cmds.go
|
||||
- improve build process and move process-compose.yaml
|
||||
- remove unused devbox.json and related configurations
|
||||
- Improve mobile layout responsiveness for Rows and Columns components
|
||||
- Remove max-w-fit from Rows component
|
||||
- replace session package with context package
|
||||
- rename database initialization function
|
||||
- move session management to dedicated database module
|
||||
- remove unused UI components related to wallet and index pages
|
||||
- consolidate handlers into single files
|
||||
- move gateway and vault packages to internal directory
|
||||
- Move registration form components to dedicated directory
|
||||
- remove unused devbox package
|
||||
- remove devbox configuration
|
||||
- move vault package to app directory
|
||||
- improve code structure within gateway package
|
||||
- move gateway package to app directory
|
||||
- move vault package internal components to root
|
||||
- migrate layout imports to common styles package
|
||||
- Move form templates and styles to common directory
|
||||
- consolidate authentication and DID handling logic
|
||||
- Improve WebAuthn credential handling and validation in register finish route
|
||||
- remove profile card component
|
||||
- Simplify passkey registration UI and move profile component inline
|
||||
- Update credential logging with transport and ID type
|
||||
- Update register handler to use protocol.CredentialDescriptor struct
|
||||
- Update credential handling to use protocol.CredentialDescriptor
|
||||
- improve profile card styling and functionality
|
||||
- Simplify session management and browser information extraction
|
||||
- Update PeerInfo to extract and store comprehensive device information
|
||||
- improve address display in property details
|
||||
- remove unused documentation generation script
|
||||
- replace sonr/pkg/styles/layout with nebula/ui/layout
|
||||
- migrate UI components to nebula module
|
||||
- improve scopes.json structure and update scripts for better usability
|
||||
|
||||
## v0.5.20 (2024-12-07)
|
||||
|
||||
### Refactor
|
||||
|
||||
- simplify CI workflow by removing redundant asset publishing steps
|
||||
|
||||
## v0.5.19 (2024-12-06)
|
||||
|
||||
### Feat
|
||||
|
||||
- add support for parent field and resources list in Capability message
|
||||
- add fast reflection methods for Capability and Resource
|
||||
- add gum package and update devbox configuration
|
||||
- add new button components and layout improvements
|
||||
|
||||
### Fix
|
||||
|
||||
- adjust fullscreen modal close button margin
|
||||
- update devbox lockfile
|
||||
- resolve rendering issue in login modal
|
||||
|
||||
### Refactor
|
||||
|
||||
- rename accaddr package to address
|
||||
- Update Credential table to match WebAuthn Credential Descriptor
|
||||
- Deployment setup
|
||||
- migrate build system from Taskfile to Makefile
|
||||
- rename Assertion to Account and update related code
|
||||
- remove unused TUI components
|
||||
- Move IPFS interaction functions to common package
|
||||
- remove dependency on DWN.pkl
|
||||
- remove unused dependencies and simplify module imports
|
||||
- Rename x/vault -> x/dwn and x/service -> x/svc
|
||||
- move resolver formatter to services package
|
||||
- remove web documentation
|
||||
- update devbox configuration and scripts
|
||||
- rename layout component to root
|
||||
- refactor authentication pages into their own modules
|
||||
- update templ version to v0.2.778 and remove unused air config
|
||||
- move signer implementation to mpc package
|
||||
|
||||
## v0.5.18 (2024-11-06)
|
||||
|
||||
## v0.5.17 (2024-11-05)
|
||||
|
||||
### Feat
|
||||
|
||||
- add remote client constructor
|
||||
- add avatar image components
|
||||
- add SVG CDN Illustrations to marketing architecture
|
||||
- **marketing**: refactor marketing page components
|
||||
- Refactor intro video component to use a proper script template
|
||||
- Move Alpine.js script initialization to separate component
|
||||
- Add intro video modal component
|
||||
- add homepage architecture section
|
||||
- add Hero section component with stats and buttons
|
||||
- **css**: add new utility classes for group hover
|
||||
- implement authentication register finish endpoint
|
||||
- add controller creation step to allocate
|
||||
- Update service module README based on protobuf files
|
||||
- Update x/macaroon/README.md with details from protobuf files
|
||||
- update Vault README with details from proto files
|
||||
|
||||
### Fix
|
||||
|
||||
- update file paths in error messages
|
||||
- update intro video modal script
|
||||
|
||||
### Refactor
|
||||
|
||||
- update marketing section architecture
|
||||
- change verification table id
|
||||
- **proto**: remove macaroon proto
|
||||
- rename ValidateBasic to Validate
|
||||
- rename session cookie key
|
||||
- remove unused sync-initial endpoint
|
||||
- remove formatter.go from service module
|
||||
|
||||
## v0.5.16 (2024-10-21)
|
||||
|
||||
### Fix
|
||||
|
||||
- include assets generation in wasm build
|
||||
|
||||
## v0.5.15 (2024-10-21)
|
||||
|
||||
## v0.5.14 (2024-10-21)
|
||||
|
||||
### Refactor
|
||||
|
||||
- remove StakingKeeper dependency from GlobalFeeDecorator
|
||||
|
||||
## v0.5.13 (2024-10-21)
|
||||
|
||||
### Feat
|
||||
|
||||
- add custom secp256k1 pubkey
|
||||
|
||||
### Refactor
|
||||
|
||||
- update gRPC client to use new request types
|
||||
- use RawPublicKey instead of PublicKey in macaroon issuer
|
||||
- improve error handling in DID module
|
||||
|
||||
## v0.5.12 (2024-10-18)
|
||||
|
||||
### Feat
|
||||
|
||||
- add User-Agent and Platform to session
|
||||
- introduce AuthState enum for authentication state
|
||||
|
||||
### Fix
|
||||
|
||||
- **version**: revert version bump to 0.5.11
|
||||
- **version**: update version to 0.5.12
|
||||
|
||||
### Refactor
|
||||
|
||||
- remove dependency on proto change detection
|
||||
- update asset publishing configuration
|
||||
|
||||
## v0.5.11 (2024-10-10)
|
||||
|
||||
### Feat
|
||||
|
||||
- nebula assets served from CDN
|
||||
- use CDN for nebula frontend assets
|
||||
- add static hero section content to homepage
|
||||
- add wrangler scripts for development, build, and deployment
|
||||
- remove build configuration
|
||||
- move gateway web code to dedicated directory
|
||||
- add PubKey fast reflection
|
||||
- **macaroon**: add transaction allowlist/denylist caveats
|
||||
- add PR labeler
|
||||
- **devbox**: remove hway start command
|
||||
- add GitHub Actions workflow for running tests
|
||||
- add workflow for deploying Hway to Cloudflare Workers
|
||||
- Publish configs to R2
|
||||
- integrate nebula UI with worker-assets-gen
|
||||
- extract reusable layout components
|
||||
- Implement service worker for IPFS vault
|
||||
- implement CDN support for assets
|
||||
- add payment method support
|
||||
- add support for public key management
|
||||
- add ModalForm component
|
||||
- add LoginStart and RegisterStart routes
|
||||
- implement authentication views
|
||||
- add json tags to config structs
|
||||
- implement templ forms for consent privacy, credential assert, credential register, and profile details
|
||||
- **vault**: introduce assembly of the initial vault
|
||||
- add client logos to homepage
|
||||
- add tailwind utility classes
|
||||
- implement new profile card component
|
||||
|
||||
### Fix
|
||||
|
||||
- Correct source directory for asset publishing
|
||||
- install dependencies before nebula build
|
||||
- update Schema service to use new API endpoint
|
||||
- fix broken logo image path
|
||||
|
||||
### Refactor
|
||||
|
||||
- remove unnecessary branch configuration from scheduled release workflow
|
||||
- update dwn configuration generation import path
|
||||
- use nebula/routes instead of nebula/global
|
||||
- move index template to routes package
|
||||
- remove cdn package and move assets to global styles
|
||||
- move nebula assets to hway build directory
|
||||
- remove docker build and deployment
|
||||
- rename internal/session package to internal/ctx
|
||||
- remove unused fields from
|
||||
- rename PR_TEMPLATE to PULL_REQUEST_TEMPLATE
|
||||
- remove devbox.json init hook
|
||||
- rename sonrd dockerfile to Dockerfile
|
||||
- remove unused dependency
|
||||
- rename 'global/cdn' to 'assets'
|
||||
- move CDN assets to separate folder
|
||||
- move Pkl module definitions to dedicated package
|
||||
- move CDN assets to js/ folder
|
||||
- remove unused component templates
|
||||
- move ui components to global
|
||||
- move view handlers to router package
|
||||
|
||||
## v0.5.10 (2024-10-07)
|
||||
|
||||
### Feat
|
||||
|
||||
- **blocks**: remove button component
|
||||
|
||||
## v0.5.9 (2024-10-06)
|
||||
|
||||
### Feat
|
||||
|
||||
- add Motr support
|
||||
- update UIUX PKL to utilize optional fields
|
||||
|
||||
### Fix
|
||||
|
||||
- Update source directory for asset publishing
|
||||
|
||||
## v0.5.8 (2024-10-04)
|
||||
|
||||
### Refactor
|
||||
|
||||
- Remove unused logs configuration
|
||||
|
||||
## v0.5.7 (2024-10-04)
|
||||
|
||||
### Feat
|
||||
|
||||
- **devbox**: use process-compose for testnet services
|
||||
- remove motr.mjs dependency
|
||||
- add markdown rendering to issue templates
|
||||
- update issue templates for better clarity
|
||||
- add issue templates for tracking and task issues
|
||||
- add issue templates for bug report and tracking
|
||||
|
||||
### Refactor
|
||||
|
||||
- update issue template headings
|
||||
- rename bug-report issue template to bug
|
||||
|
||||
## v0.5.6 (2024-10-03)
|
||||
|
||||
### Feat
|
||||
|
||||
- introduce docker-compose based setup
|
||||
- add hway and sonr processes to dev environment
|
||||
|
||||
## v0.5.5 (2024-10-03)
|
||||
|
||||
### Feat
|
||||
|
||||
- add rudimentary DidController table
|
||||
- update home section with new features
|
||||
- introduce Home model and refactor views
|
||||
- **nebula**: create Home model for home page
|
||||
|
||||
### Refactor
|
||||
|
||||
- reorganize pkl files for better separation of concerns
|
||||
- rename msg_server_test.go to rpc_test.go
|
||||
|
||||
## v0.5.4 (2024-10-02)
|
||||
|
||||
## v0.5.3 (2024-10-02)
|
||||
|
||||
### Fix
|
||||
|
||||
- remove unnecessary telegram message template
|
||||
|
||||
## v0.5.2 (2024-10-02)
|
||||
|
||||
### Feat
|
||||
@@ -22,14 +464,6 @@
|
||||
|
||||
## v0.4.5 (2024-10-02)
|
||||
|
||||
### Fix
|
||||
|
||||
- use correct secret for docker login
|
||||
|
||||
## v0.4.4 (2024-10-02)
|
||||
|
||||
## v0.4.3 (2024-10-02)
|
||||
|
||||
### Feat
|
||||
|
||||
- **release**: add docker images for sonrd and motr
|
||||
@@ -41,6 +475,7 @@
|
||||
|
||||
### Fix
|
||||
|
||||
- use correct secret for docker login
|
||||
- **layout**: add missing favicon
|
||||
- **hero**: Use hx-swap for primary button to prevent flicker
|
||||
|
||||
@@ -69,9 +504,6 @@
|
||||
- add DWN resolver field
|
||||
- add stats section to homepage
|
||||
- implement hero section using Pkl
|
||||
- add PKL schema for message formats
|
||||
- add Homebrew tap for sonr
|
||||
- update release workflow to use latest tag
|
||||
|
||||
### Fix
|
||||
|
||||
@@ -90,13 +522,14 @@
|
||||
- rename motrd to motr
|
||||
- update hero image dimensions
|
||||
- move nebula configuration to static file
|
||||
- rename buf-publish.yml to publish-assets.yml
|
||||
- remove unused field from
|
||||
|
||||
## v0.4.0 (2024-09-30)
|
||||
|
||||
### Feat
|
||||
|
||||
- add PKL schema for message formats
|
||||
- add Homebrew tap for sonr
|
||||
- update release workflow to use latest tag
|
||||
- **dwn**: add wasm build for dwn
|
||||
- add macaroon and oracle genesis states
|
||||
- add scheduled binary release workflow
|
||||
@@ -111,6 +544,8 @@
|
||||
### Refactor
|
||||
|
||||
- remove old changelog entries
|
||||
- rename buf-publish.yml to publish-assets.yml
|
||||
- remove unused field from
|
||||
- remove unnecessary checkout in scheduled-release workflow
|
||||
- rename build ID to sonr
|
||||
- remove unnecessary release existence check
|
||||
|
||||
+3
-38
@@ -1,41 +1,4 @@
|
||||
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
|
||||
FROM golang:1.23-alpine AS go-builder
|
||||
|
||||
SHELL ["/bin/sh", "-ecuxo", "pipefail"]
|
||||
|
||||
@@ -68,6 +31,8 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
|
||||
# --------------------------------------------------------
|
||||
FROM debian:11-slim
|
||||
|
||||
LABEL org.opencontainers.image.source https://github.com/onsonr/sonr
|
||||
|
||||
COPY --from=go-builder /code/build/sonrd /usr/bin/sonrd
|
||||
|
||||
# Install dependencies for Debian 11
|
||||
|
||||
@@ -8,6 +8,13 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
|
||||
BINDIR ?= $(GOPATH)/bin
|
||||
SIMAPP = ./app
|
||||
|
||||
# Fetch from env
|
||||
RELEASE_DATE ?= $(shell date +%Y).$(shell date +%V).$(shell date +%u)
|
||||
VERSION ?= $(shell echo $(shell git describe --tags) | sed 's/^v//')
|
||||
COMMIT ?= $(shell git log -1 --format='%H')
|
||||
OS ?= $(shell uname -s)
|
||||
ROOT ?= $(shell git rev-parse --show-toplevel)
|
||||
|
||||
# for dockerized protobuf tools
|
||||
DOCKER := $(shell which docker)
|
||||
HTTPS_GIT := github.com/onsonr/sonr.git
|
||||
@@ -70,8 +77,6 @@ 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
|
||||
|
||||
build: go.sum
|
||||
@@ -82,6 +87,12 @@ else
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
|
||||
endif
|
||||
|
||||
build-motr: go.sum
|
||||
GOOS=js GOARCH=wasm go build -o static/wasm/app.wasm ./cmd/motr/main.go
|
||||
|
||||
build-hway: go.sum
|
||||
go build -o build/hway ./cmd/hway
|
||||
|
||||
build-windows-client: go.sum
|
||||
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd
|
||||
|
||||
@@ -94,10 +105,18 @@ endif
|
||||
|
||||
install: go.sum
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motr
|
||||
|
||||
install-hway: go.sum
|
||||
go install -mod=readonly ./cmd/hway
|
||||
|
||||
release: fmt-date
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
|
||||
|
||||
|
||||
########################################
|
||||
### Tools & dependencies
|
||||
########################################
|
||||
|
||||
go-mod-cache: go.sum
|
||||
@echo "--> Download go modules to local cache"
|
||||
@@ -113,13 +132,19 @@ draw-deps:
|
||||
@goviz -i ./cmd/sonrd -d 2 | dot -Tpng -o dependency-graph.png
|
||||
|
||||
clean:
|
||||
rm -rf .aider*
|
||||
rm -rf static
|
||||
rm -rf .out
|
||||
rm -rf hway.db
|
||||
rm -rf snapcraft-local.yaml build/
|
||||
rm -rf build
|
||||
|
||||
distclean: clean
|
||||
rm -rf vendor/
|
||||
|
||||
########################################
|
||||
### Testing
|
||||
########################################
|
||||
|
||||
test: test-unit
|
||||
test-all: test-race test-cover test-system
|
||||
@@ -171,7 +196,6 @@ format: format-tools
|
||||
|
||||
mod-tidy:
|
||||
go mod tidy
|
||||
cd interchaintest && go mod tidy
|
||||
|
||||
.PHONY: format-tools lint format mod-tidy
|
||||
|
||||
@@ -179,17 +203,14 @@ mod-tidy:
|
||||
###############################################################################
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
protoVer=0.13.2
|
||||
protoVer=0.15.1
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
proto-format:
|
||||
@@ -265,6 +286,9 @@ ictest-tokenfactory:
|
||||
### testnet ###
|
||||
###############################################################################
|
||||
|
||||
setup-ipfs:
|
||||
./scripts/ipfs_config.sh
|
||||
|
||||
setup-testnet: mod-tidy is-localic-installed install local-image set-testnet-configs setup-testnet-keys
|
||||
|
||||
# Run this before testnet keys are added
|
||||
@@ -289,51 +313,41 @@ testnet-basic: setup-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
|
||||
.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet dop-testnet
|
||||
|
||||
###############################################################################
|
||||
### templ & vault ###
|
||||
### extra utils ###
|
||||
###############################################################################
|
||||
|
||||
.PHONY: motr hway templ pkl nebula
|
||||
push-docker:
|
||||
@docker build -t ghcr.io/onsonr/sonr:latest .
|
||||
@docker tag ghcr.io/onsonr/sonr:latest ghcr.io/onsonr/sonr:$(VERSION)
|
||||
@docker push ghcr.io/onsonr/sonr:latest
|
||||
@docker push ghcr.io/onsonr/sonr:$(VERSION)
|
||||
|
||||
hway:
|
||||
@echo "(motr) Building Highway gateway"
|
||||
go build -o ./build/hway ./cmd/hway
|
||||
status:
|
||||
@gh run ls -L 3
|
||||
@gum format -- "# Sonr ($OS-$VERSION)" "- ($(COMMIT)) $ROOT" "- $(RELEASE_DATE)"
|
||||
@sleep 3
|
||||
|
||||
motr:
|
||||
@echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault"
|
||||
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/motr/motr.go
|
||||
release:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
|
||||
|
||||
templ:
|
||||
@echo "(templ) Generating templ files"
|
||||
go install github.com/a-h/templ/cmd/templ@latest
|
||||
templ generate
|
||||
release-dry:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --snapshot --clean --skip=publish
|
||||
|
||||
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
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl
|
||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/uiux.pkl
|
||||
|
||||
start-caddy:
|
||||
@echo "(start-caddy) Starting caddy"
|
||||
./build/caddy run --config ./config/caddy/Caddyfile
|
||||
|
||||
start-hway: hway
|
||||
@echo "(start-proxy) Starting proxy server"
|
||||
./build/hway start
|
||||
release-check:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser check
|
||||
|
||||
validate-tag:
|
||||
@sh ./scripts/validate_tag.sh
|
||||
###############################################################################
|
||||
### help ###
|
||||
###############################################################################
|
||||
|
||||
|
||||
help:
|
||||
@echo "Usage: make <target>"
|
||||
@echo ""
|
||||
@@ -345,7 +359,5 @@ help:
|
||||
@echo " sh-testnet : Shell local devnet"
|
||||
@echo " ictest-basic : Basic end-to-end test"
|
||||
@echo " ictest-ibc : IBC end-to-end test"
|
||||
@echo " templ : Generate templ files"
|
||||
@echo " vault : Build vault.wasm"
|
||||
|
||||
.PHONY: help
|
||||
|
||||
@@ -1,39 +1,29 @@
|
||||
<div align="center" style="text-align: center;">
|
||||
|
||||
# `sonr` - Sonr Chain
|
||||
|
||||
[](https://pkg.go.dev/github.com/onsonr/sonr)
|
||||

|
||||

|
||||
[](https://sonr.io)
|
||||
|
||||
[](https://goreportcard.com/report/github.com/onsonr/sonr)
|
||||
[](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr)
|
||||
|
||||
</div>
|
||||
<br />
|
||||
> 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.
|
||||
|
||||
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.
|
||||
# Documentation
|
||||
|
||||
<br />
|
||||
1. [Quick Start](https://github.com/onsonr/sonr/wiki/1-%E2%80%90-Quick-Start)
|
||||
2. [Chain Modules](https://github.com/onsonr/sonr/wiki/2-%E2%80%90-Chain-Modules)
|
||||
3. [System Architecture](https://github.com/onsonr/sonr/wiki/3-%E2%80%90-System-Architecture)
|
||||
4. [Token Economy](https://github.com/onsonr/sonr/wiki/4-%E2%80%90-Token-Economy)
|
||||
5. [Service Mangement](https://github.com/onsonr/sonr/wiki/5-%E2%80%90-Service-Management)
|
||||
6. [Design System](https://github.com/onsonr/sonr/wiki/6-%E2%80%90-Design-System)
|
||||
7. [Self Custody](https://github.com/onsonr/sonr/wiki/7-%E2%80%90-Self-Custody)
|
||||
|
||||
## Components
|
||||
# Stats
|
||||
|
||||
### `sonrd`
|
||||

|
||||
|
||||
The main blockchain node that runs the `sonr` chain. It is responsible for maintaining the state of the chain, including IPFS based vaults, and did documents.
|
||||
|
||||
### `vault`
|
||||
|
||||
The `vault` is a wasm module that is compiled and deployed to IPFS on behalf of the user. It is responsible for storing and retrieving encrypted data.
|
||||
|
||||
- SQLite Database backend
|
||||
- Encryption via admonition
|
||||
- Authentication via webauthn
|
||||
- Authorization via Macroons
|
||||
- HTTP API
|
||||
|
||||
## Acknowledgements
|
||||
# Acknowledgements
|
||||
|
||||
Sonr would not have been possible without the direct and indirect support of the following individuals:
|
||||
|
||||
@@ -42,11 +32,8 @@ Sonr would not have been possible without the direct and indirect support of the
|
||||
- **Steve Jobs**: For User first UX.
|
||||
- **Tim Berners-Lee**: For the Internet.
|
||||
|
||||
<br />
|
||||
|
||||
## Community & Support
|
||||
# Community & Support
|
||||
|
||||
- [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)
|
||||
|
||||
@@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName()))
|
||||
panic(fmt.Errorf("%s is not a oneof field in did.module.v1.Module", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -414,29 +414,24 @@ var File_did_module_v1_module_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_did_module_v1_module_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x6e,
|
||||
0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f,
|
||||
0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73,
|
||||
0x6f, 0x6e, 0x72, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x44, 0x4d, 0xaa, 0x02,
|
||||
0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x44, 0x69, 0x64,
|
||||
0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4f, 0x6e, 0x73,
|
||||
0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c,
|
||||
0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c,
|
||||
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||
0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x44,
|
||||
0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x69,
|
||||
0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a,
|
||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
||||
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
||||
0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0f, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -453,7 +448,7 @@ func file_did_module_v1_module_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_did_module_v1_module_proto_goTypes = []interface{}{
|
||||
(*Module)(nil), // 0: onsonr.sonr.did.module.v1.Module
|
||||
(*Module)(nil), // 0: did.module.v1.Module
|
||||
}
|
||||
var file_did_module_v1_module_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
|
||||
+2683
-632
File diff suppressed because it is too large
Load Diff
+35
-1258
File diff suppressed because it is too large
Load Diff
+28
-49
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: did/v1/query.proto
|
||||
|
||||
@@ -15,26 +15,25 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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)
|
||||
}
|
||||
@@ -48,8 +47,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
}
|
||||
|
||||
func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -57,17 +57,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryResolveResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Resolve_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...)
|
||||
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -75,8 +67,9 @@ func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...gr
|
||||
}
|
||||
|
||||
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryVerifyResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -85,22 +78,25 @@ func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts .
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedQueryServer struct {
|
||||
}
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
@@ -108,13 +104,11 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryPa
|
||||
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Sign(context.Context, *QuerySignRequest) (*QuerySignResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*QueryVerifyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -124,6 +118,13 @@ type UnsafeQueryServer interface {
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -163,24 +164,6 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
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)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Sign(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Sign_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Sign(ctx, req.(*QuerySignRequest))
|
||||
}
|
||||
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)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -214,10 +197,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Resolve",
|
||||
Handler: _Query_Resolve_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Sign",
|
||||
Handler: _Query_Sign_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Verify",
|
||||
Handler: _Query_Verify_Handler,
|
||||
|
||||
+171
-171
@@ -9,121 +9,121 @@ import (
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type AuthenticationTable interface {
|
||||
Insert(ctx context.Context, authentication *Authentication) error
|
||||
Update(ctx context.Context, authentication *Authentication) error
|
||||
Save(ctx context.Context, authentication *Authentication) error
|
||||
Delete(ctx context.Context, authentication *Authentication) error
|
||||
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, did string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, did string) (*Authentication, error)
|
||||
Get(ctx context.Context, did string) (*Account, error)
|
||||
HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error)
|
||||
// GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error)
|
||||
List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error)
|
||||
ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error
|
||||
GetByControllerSubject(ctx context.Context, controller string, subject 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 AuthenticationIterator struct {
|
||||
type AccountIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i AuthenticationIterator) Value() (*Authentication, error) {
|
||||
var authentication Authentication
|
||||
err := i.UnmarshalMessage(&authentication)
|
||||
return &authentication, err
|
||||
func (i AccountIterator) Value() (*Account, error) {
|
||||
var account Account
|
||||
err := i.UnmarshalMessage(&account)
|
||||
return &account, err
|
||||
}
|
||||
|
||||
type AuthenticationIndexKey interface {
|
||||
type AccountIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
authenticationIndexKey()
|
||||
accountIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type AuthenticationPrimaryKey = AuthenticationDidIndexKey
|
||||
type AccountPrimaryKey = AccountDidIndexKey
|
||||
|
||||
type AuthenticationDidIndexKey struct {
|
||||
type AccountDidIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AuthenticationDidIndexKey) id() uint32 { return 0 }
|
||||
func (x AuthenticationDidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AuthenticationDidIndexKey) authenticationIndexKey() {}
|
||||
func (x AccountDidIndexKey) id() uint32 { return 0 }
|
||||
func (x AccountDidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AccountDidIndexKey) accountIndexKey() {}
|
||||
|
||||
func (this AuthenticationDidIndexKey) WithDid(did string) AuthenticationDidIndexKey {
|
||||
func (this AccountDidIndexKey) WithDid(did string) AccountDidIndexKey {
|
||||
this.vs = []interface{}{did}
|
||||
return this
|
||||
}
|
||||
|
||||
type AuthenticationControllerSubjectIndexKey struct {
|
||||
type AccountControllerSubjectIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AuthenticationControllerSubjectIndexKey) id() uint32 { return 1 }
|
||||
func (x AuthenticationControllerSubjectIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AuthenticationControllerSubjectIndexKey) authenticationIndexKey() {}
|
||||
func (x AccountControllerSubjectIndexKey) id() uint32 { return 1 }
|
||||
func (x AccountControllerSubjectIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AccountControllerSubjectIndexKey) accountIndexKey() {}
|
||||
|
||||
func (this AuthenticationControllerSubjectIndexKey) WithController(controller string) AuthenticationControllerSubjectIndexKey {
|
||||
func (this AccountControllerSubjectIndexKey) WithController(controller string) AccountControllerSubjectIndexKey {
|
||||
this.vs = []interface{}{controller}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this AuthenticationControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AuthenticationControllerSubjectIndexKey {
|
||||
func (this AccountControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AccountControllerSubjectIndexKey {
|
||||
this.vs = []interface{}{controller, subject}
|
||||
return this
|
||||
}
|
||||
|
||||
type authenticationTable struct {
|
||||
type accountTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this authenticationTable) Insert(ctx context.Context, authentication *Authentication) error {
|
||||
return this.table.Insert(ctx, authentication)
|
||||
func (this accountTable) Insert(ctx context.Context, account *Account) error {
|
||||
return this.table.Insert(ctx, account)
|
||||
}
|
||||
|
||||
func (this authenticationTable) Update(ctx context.Context, authentication *Authentication) error {
|
||||
return this.table.Update(ctx, authentication)
|
||||
func (this accountTable) Update(ctx context.Context, account *Account) error {
|
||||
return this.table.Update(ctx, account)
|
||||
}
|
||||
|
||||
func (this authenticationTable) Save(ctx context.Context, authentication *Authentication) error {
|
||||
return this.table.Save(ctx, authentication)
|
||||
func (this accountTable) Save(ctx context.Context, account *Account) error {
|
||||
return this.table.Save(ctx, account)
|
||||
}
|
||||
|
||||
func (this authenticationTable) Delete(ctx context.Context, authentication *Authentication) error {
|
||||
return this.table.Delete(ctx, authentication)
|
||||
func (this accountTable) Delete(ctx context.Context, account *Account) error {
|
||||
return this.table.Delete(ctx, account)
|
||||
}
|
||||
|
||||
func (this authenticationTable) Has(ctx context.Context, did string) (found bool, err error) {
|
||||
func (this accountTable) Has(ctx context.Context, did string) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, did)
|
||||
}
|
||||
|
||||
func (this authenticationTable) Get(ctx context.Context, did string) (*Authentication, error) {
|
||||
var authentication Authentication
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &authentication, did)
|
||||
func (this accountTable) Get(ctx context.Context, did string) (*Account, error) {
|
||||
var account Account
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &account, did)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &authentication, nil
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func (this authenticationTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) {
|
||||
func (this accountTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
controller,
|
||||
subject,
|
||||
)
|
||||
}
|
||||
|
||||
func (this authenticationTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error) {
|
||||
var authentication Authentication
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &authentication,
|
||||
func (this accountTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Account, error) {
|
||||
var account Account
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
||||
controller,
|
||||
subject,
|
||||
)
|
||||
@@ -133,206 +133,206 @@ func (this authenticationTable) GetByControllerSubject(ctx context.Context, cont
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &authentication, nil
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func (this authenticationTable) List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) {
|
||||
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 AuthenticationIterator{it}, err
|
||||
return AccountIterator{it}, err
|
||||
}
|
||||
|
||||
func (this authenticationTable) ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) {
|
||||
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 AuthenticationIterator{it}, err
|
||||
return AccountIterator{it}, err
|
||||
}
|
||||
|
||||
func (this authenticationTable) DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error {
|
||||
func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this authenticationTable) DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error {
|
||||
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 authenticationTable) doNotImplement() {}
|
||||
func (this accountTable) doNotImplement() {}
|
||||
|
||||
var _ AuthenticationTable = authenticationTable{}
|
||||
var _ AccountTable = accountTable{}
|
||||
|
||||
func NewAuthenticationTable(db ormtable.Schema) (AuthenticationTable, error) {
|
||||
table := db.GetTable(&Authentication{})
|
||||
func NewAccountTable(db ormtable.Schema) (AccountTable, error) {
|
||||
table := db.GetTable(&Account{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Authentication{}).ProtoReflect().Descriptor().FullName()))
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return authenticationTable{table}, nil
|
||||
return accountTable{table}, nil
|
||||
}
|
||||
|
||||
type ControllerTable interface {
|
||||
Insert(ctx context.Context, controller *Controller) error
|
||||
InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error)
|
||||
type PublicKeyTable interface {
|
||||
Insert(ctx context.Context, publicKey *PublicKey) error
|
||||
InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error)
|
||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||
Update(ctx context.Context, controller *Controller) error
|
||||
Save(ctx context.Context, controller *Controller) error
|
||||
Delete(ctx context.Context, controller *Controller) error
|
||||
Update(ctx context.Context, publicKey *PublicKey) error
|
||||
Save(ctx context.Context, publicKey *PublicKey) error
|
||||
Delete(ctx context.Context, publicKey *PublicKey) error
|
||||
Has(ctx context.Context, number 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, number uint64) (*Controller, error)
|
||||
Get(ctx context.Context, number uint64) (*PublicKey, error)
|
||||
HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error)
|
||||
// GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error)
|
||||
GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error)
|
||||
HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error)
|
||||
// GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error)
|
||||
GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error)
|
||||
HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error)
|
||||
// GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error)
|
||||
GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error)
|
||||
HasByDid(ctx context.Context, did string) (found bool, err error)
|
||||
// GetByDid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByDid(ctx context.Context, did string) (*Controller, error)
|
||||
List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||
ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to ControllerIndexKey) error
|
||||
GetByDid(ctx context.Context, did string) (*PublicKey, error)
|
||||
List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error)
|
||||
ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type ControllerIterator struct {
|
||||
type PublicKeyIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i ControllerIterator) Value() (*Controller, error) {
|
||||
var controller Controller
|
||||
err := i.UnmarshalMessage(&controller)
|
||||
return &controller, err
|
||||
func (i PublicKeyIterator) Value() (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
err := i.UnmarshalMessage(&publicKey)
|
||||
return &publicKey, err
|
||||
}
|
||||
|
||||
type ControllerIndexKey interface {
|
||||
type PublicKeyIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
controllerIndexKey()
|
||||
publicKeyIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type ControllerPrimaryKey = ControllerNumberIndexKey
|
||||
type PublicKeyPrimaryKey = PublicKeyNumberIndexKey
|
||||
|
||||
type ControllerNumberIndexKey struct {
|
||||
type PublicKeyNumberIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerNumberIndexKey) id() uint32 { return 0 }
|
||||
func (x ControllerNumberIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerNumberIndexKey) controllerIndexKey() {}
|
||||
func (x PublicKeyNumberIndexKey) id() uint32 { return 0 }
|
||||
func (x PublicKeyNumberIndexKey) values() []interface{} { return x.vs }
|
||||
func (x PublicKeyNumberIndexKey) publicKeyIndexKey() {}
|
||||
|
||||
func (this ControllerNumberIndexKey) WithNumber(number uint64) ControllerNumberIndexKey {
|
||||
func (this PublicKeyNumberIndexKey) WithNumber(number uint64) PublicKeyNumberIndexKey {
|
||||
this.vs = []interface{}{number}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerSonrAddressIndexKey struct {
|
||||
type PublicKeySonrAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerSonrAddressIndexKey) id() uint32 { return 1 }
|
||||
func (x ControllerSonrAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerSonrAddressIndexKey) controllerIndexKey() {}
|
||||
func (x PublicKeySonrAddressIndexKey) id() uint32 { return 1 }
|
||||
func (x PublicKeySonrAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x PublicKeySonrAddressIndexKey) publicKeyIndexKey() {}
|
||||
|
||||
func (this ControllerSonrAddressIndexKey) WithSonrAddress(sonr_address string) ControllerSonrAddressIndexKey {
|
||||
func (this PublicKeySonrAddressIndexKey) WithSonrAddress(sonr_address string) PublicKeySonrAddressIndexKey {
|
||||
this.vs = []interface{}{sonr_address}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerEthAddressIndexKey struct {
|
||||
type PublicKeyEthAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerEthAddressIndexKey) id() uint32 { return 2 }
|
||||
func (x ControllerEthAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerEthAddressIndexKey) controllerIndexKey() {}
|
||||
func (x PublicKeyEthAddressIndexKey) id() uint32 { return 2 }
|
||||
func (x PublicKeyEthAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x PublicKeyEthAddressIndexKey) publicKeyIndexKey() {}
|
||||
|
||||
func (this ControllerEthAddressIndexKey) WithEthAddress(eth_address string) ControllerEthAddressIndexKey {
|
||||
func (this PublicKeyEthAddressIndexKey) WithEthAddress(eth_address string) PublicKeyEthAddressIndexKey {
|
||||
this.vs = []interface{}{eth_address}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerBtcAddressIndexKey struct {
|
||||
type PublicKeyBtcAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerBtcAddressIndexKey) id() uint32 { return 3 }
|
||||
func (x ControllerBtcAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerBtcAddressIndexKey) controllerIndexKey() {}
|
||||
func (x PublicKeyBtcAddressIndexKey) id() uint32 { return 3 }
|
||||
func (x PublicKeyBtcAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x PublicKeyBtcAddressIndexKey) publicKeyIndexKey() {}
|
||||
|
||||
func (this ControllerBtcAddressIndexKey) WithBtcAddress(btc_address string) ControllerBtcAddressIndexKey {
|
||||
func (this PublicKeyBtcAddressIndexKey) WithBtcAddress(btc_address string) PublicKeyBtcAddressIndexKey {
|
||||
this.vs = []interface{}{btc_address}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerDidIndexKey struct {
|
||||
type PublicKeyDidIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerDidIndexKey) id() uint32 { return 4 }
|
||||
func (x ControllerDidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerDidIndexKey) controllerIndexKey() {}
|
||||
func (x PublicKeyDidIndexKey) id() uint32 { return 4 }
|
||||
func (x PublicKeyDidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x PublicKeyDidIndexKey) publicKeyIndexKey() {}
|
||||
|
||||
func (this ControllerDidIndexKey) WithDid(did string) ControllerDidIndexKey {
|
||||
func (this PublicKeyDidIndexKey) WithDid(did string) PublicKeyDidIndexKey {
|
||||
this.vs = []interface{}{did}
|
||||
return this
|
||||
}
|
||||
|
||||
type controllerTable struct {
|
||||
type publicKeyTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
}
|
||||
|
||||
func (this controllerTable) Insert(ctx context.Context, controller *Controller) error {
|
||||
return this.table.Insert(ctx, controller)
|
||||
func (this publicKeyTable) Insert(ctx context.Context, publicKey *PublicKey) error {
|
||||
return this.table.Insert(ctx, publicKey)
|
||||
}
|
||||
|
||||
func (this controllerTable) Update(ctx context.Context, controller *Controller) error {
|
||||
return this.table.Update(ctx, controller)
|
||||
func (this publicKeyTable) Update(ctx context.Context, publicKey *PublicKey) error {
|
||||
return this.table.Update(ctx, publicKey)
|
||||
}
|
||||
|
||||
func (this controllerTable) Save(ctx context.Context, controller *Controller) error {
|
||||
return this.table.Save(ctx, controller)
|
||||
func (this publicKeyTable) Save(ctx context.Context, publicKey *PublicKey) error {
|
||||
return this.table.Save(ctx, publicKey)
|
||||
}
|
||||
|
||||
func (this controllerTable) Delete(ctx context.Context, controller *Controller) error {
|
||||
return this.table.Delete(ctx, controller)
|
||||
func (this publicKeyTable) Delete(ctx context.Context, publicKey *PublicKey) error {
|
||||
return this.table.Delete(ctx, publicKey)
|
||||
}
|
||||
|
||||
func (this controllerTable) InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, controller)
|
||||
func (this publicKeyTable) InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, publicKey)
|
||||
}
|
||||
|
||||
func (this controllerTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
func (this publicKeyTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
return this.table.LastInsertedSequence(ctx)
|
||||
}
|
||||
|
||||
func (this controllerTable) Has(ctx context.Context, number uint64) (found bool, err error) {
|
||||
func (this publicKeyTable) Has(ctx context.Context, number uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, number)
|
||||
}
|
||||
|
||||
func (this controllerTable) Get(ctx context.Context, number uint64) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &controller, number)
|
||||
func (this publicKeyTable) Get(ctx context.Context, number uint64) (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &publicKey, number)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
return &publicKey, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) {
|
||||
func (this publicKeyTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
sonr_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
func (this publicKeyTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
||||
sonr_address,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -341,18 +341,18 @@ func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address s
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
return &publicKey, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) {
|
||||
func (this publicKeyTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||
eth_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
func (this publicKeyTable) GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
||||
eth_address,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -361,18 +361,18 @@ func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address str
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
return &publicKey, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) {
|
||||
func (this publicKeyTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx,
|
||||
btc_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
func (this publicKeyTable) GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
||||
btc_address,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -381,18 +381,18 @@ func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address str
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
return &publicKey, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByDid(ctx context.Context, did string) (found bool, err error) {
|
||||
func (this publicKeyTable) HasByDid(ctx context.Context, did string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx,
|
||||
did,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByDid(ctx context.Context, did string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
func (this publicKeyTable) GetByDid(ctx context.Context, did string) (*PublicKey, error) {
|
||||
var publicKey PublicKey
|
||||
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &publicKey,
|
||||
did,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -401,37 +401,37 @@ func (this controllerTable) GetByDid(ctx context.Context, did string) (*Controll
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
return &publicKey, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) {
|
||||
func (this publicKeyTable) List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return ControllerIterator{it}, err
|
||||
return PublicKeyIterator{it}, err
|
||||
}
|
||||
|
||||
func (this controllerTable) ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) {
|
||||
func (this publicKeyTable) ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return ControllerIterator{it}, err
|
||||
return PublicKeyIterator{it}, err
|
||||
}
|
||||
|
||||
func (this controllerTable) DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error {
|
||||
func (this publicKeyTable) DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this controllerTable) DeleteRange(ctx context.Context, from, to ControllerIndexKey) error {
|
||||
func (this publicKeyTable) DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this controllerTable) doNotImplement() {}
|
||||
func (this publicKeyTable) doNotImplement() {}
|
||||
|
||||
var _ ControllerTable = controllerTable{}
|
||||
var _ PublicKeyTable = publicKeyTable{}
|
||||
|
||||
func NewControllerTable(db ormtable.Schema) (ControllerTable, error) {
|
||||
table := db.GetTable(&Controller{})
|
||||
func NewPublicKeyTable(db ormtable.Schema) (PublicKeyTable, error) {
|
||||
table := db.GetTable(&PublicKey{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Controller{}).ProtoReflect().Descriptor().FullName()))
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&PublicKey{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return controllerTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
return publicKeyTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
type VerificationTable interface {
|
||||
@@ -692,25 +692,25 @@ func NewVerificationTable(db ormtable.Schema) (VerificationTable, error) {
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
AuthenticationTable() AuthenticationTable
|
||||
ControllerTable() ControllerTable
|
||||
AccountTable() AccountTable
|
||||
PublicKeyTable() PublicKeyTable
|
||||
VerificationTable() VerificationTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
authentication AuthenticationTable
|
||||
controller ControllerTable
|
||||
verification VerificationTable
|
||||
account AccountTable
|
||||
publicKey PublicKeyTable
|
||||
verification VerificationTable
|
||||
}
|
||||
|
||||
func (x stateStore) AuthenticationTable() AuthenticationTable {
|
||||
return x.authentication
|
||||
func (x stateStore) AccountTable() AccountTable {
|
||||
return x.account
|
||||
}
|
||||
|
||||
func (x stateStore) ControllerTable() ControllerTable {
|
||||
return x.controller
|
||||
func (x stateStore) PublicKeyTable() PublicKeyTable {
|
||||
return x.publicKey
|
||||
}
|
||||
|
||||
func (x stateStore) VerificationTable() VerificationTable {
|
||||
@@ -722,12 +722,12 @@ func (stateStore) doNotImplement() {}
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
authenticationTable, err := NewAuthenticationTable(db)
|
||||
accountTable, err := NewAccountTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
controllerTable, err := NewControllerTable(db)
|
||||
publicKeyTable, err := NewPublicKeyTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -738,8 +738,8 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
authenticationTable,
|
||||
controllerTable,
|
||||
accountTable,
|
||||
publicKeyTable,
|
||||
verificationTable,
|
||||
}, nil
|
||||
}
|
||||
|
||||
+583
-3488
File diff suppressed because it is too large
Load Diff
+4053
-886
File diff suppressed because it is too large
Load Diff
+166
-30
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: did/v1/tx.proto
|
||||
|
||||
@@ -15,25 +15,35 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
|
||||
Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
|
||||
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
|
||||
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
|
||||
Msg_LinkAssertion_FullMethodName = "/did.v1.Msg/LinkAssertion"
|
||||
Msg_LinkAuthentication_FullMethodName = "/did.v1.Msg/LinkAuthentication"
|
||||
Msg_UnlinkAssertion_FullMethodName = "/did.v1.Msg/UnlinkAssertion"
|
||||
Msg_UnlinkAuthentication_FullMethodName = "/did.v1.Msg/UnlinkAuthentication"
|
||||
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgClient interface {
|
||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
||||
// Macaroon for verification.
|
||||
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
|
||||
// RegisterController initializes a controller with the given authentication
|
||||
// set, address, cid, publicKey, and user-defined alias.
|
||||
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
|
||||
// LinkAssertion links an assertion to a controller.
|
||||
LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error)
|
||||
// LinkAuthentication links an authentication to a controller.
|
||||
LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error)
|
||||
// UnlinkAssertion unlinks an assertion from a controller.
|
||||
UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error)
|
||||
// UnlinkAuthentication unlinks an authentication from a controller.
|
||||
UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error)
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
}
|
||||
@@ -47,17 +57,49 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
}
|
||||
|
||||
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgExecuteTxResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, cOpts...)
|
||||
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...)
|
||||
func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgLinkAssertionResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_LinkAssertion_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgLinkAuthenticationResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_LinkAuthentication_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUnlinkAssertionResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UnlinkAssertion_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUnlinkAuthenticationResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UnlinkAuthentication_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -65,8 +107,9 @@ func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterContr
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -75,33 +118,53 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgServer interface {
|
||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
||||
// Macaroon for verification.
|
||||
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
|
||||
// RegisterController initializes a controller with the given authentication
|
||||
// set, address, cid, publicKey, and user-defined alias.
|
||||
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
|
||||
// LinkAssertion links an assertion to a controller.
|
||||
LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error)
|
||||
// LinkAuthentication links an authentication to a controller.
|
||||
LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error)
|
||||
// UnlinkAssertion unlinks an assertion from a controller.
|
||||
UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error)
|
||||
// UnlinkAuthentication unlinks an authentication from a controller.
|
||||
UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error)
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMsgServer struct {
|
||||
}
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
|
||||
func (UnimplementedMsgServer) LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LinkAssertion not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LinkAuthentication not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnlinkAssertion not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnlinkAuthentication not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -111,6 +174,13 @@ type UnsafeMsgServer interface {
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -132,20 +202,74 @@ func _Msg_ExecuteTx_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgRegisterController)
|
||||
func _Msg_LinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgLinkAssertion)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).RegisterController(ctx, in)
|
||||
return srv.(MsgServer).LinkAssertion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_RegisterController_FullMethodName,
|
||||
FullMethod: Msg_LinkAssertion_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController))
|
||||
return srv.(MsgServer).LinkAssertion(ctx, req.(*MsgLinkAssertion))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_LinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgLinkAuthentication)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).LinkAuthentication(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_LinkAuthentication_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).LinkAuthentication(ctx, req.(*MsgLinkAuthentication))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UnlinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUnlinkAssertion)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UnlinkAssertion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UnlinkAssertion_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UnlinkAssertion(ctx, req.(*MsgUnlinkAssertion))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UnlinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUnlinkAuthentication)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UnlinkAuthentication(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UnlinkAuthentication_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UnlinkAuthentication(ctx, req.(*MsgUnlinkAuthentication))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -180,8 +304,20 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _Msg_ExecuteTx_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RegisterController",
|
||||
Handler: _Msg_RegisterController_Handler,
|
||||
MethodName: "LinkAssertion",
|
||||
Handler: _Msg_LinkAssertion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LinkAuthentication",
|
||||
Handler: _Msg_LinkAuthentication_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnlinkAssertion",
|
||||
Handler: _Msg_UnlinkAssertion_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnlinkAuthentication",
|
||||
Handler: _Msg_UnlinkAuthentication_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
|
||||
@@ -18,8 +18,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_vault_module_v1_module_proto_init()
|
||||
md_Module = File_vault_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 +31,7 @@ func (x *Module) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_vault_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 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message vault.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 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in vault.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 +373,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
// protoc (unknown)
|
||||
// source: vault/module/v1/module.proto
|
||||
// source: dwn/module/v1/module.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
@@ -393,7 +393,7 @@ type Module struct {
|
||||
func (x *Module) Reset() {
|
||||
*x = Module{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_vault_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,51 +407,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_dwn_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_vault_module_v1_module_proto protoreflect.FileDescriptor
|
||||
var File_dwn_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,
|
||||
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, 0x28, 0x0a,
|
||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x64, 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, 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, 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_vault_module_v1_module_proto_rawDescOnce sync.Once
|
||||
file_vault_module_v1_module_proto_rawDescData = file_vault_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_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_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_vault_module_v1_module_proto_rawDescData
|
||||
return file_dwn_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_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_vault_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
|
||||
@@ -459,13 +458,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_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_vault_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
|
||||
@@ -482,18 +481,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_dwn_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_dwn_module_v1_module_proto_goTypes,
|
||||
DependencyIndexes: file_dwn_module_v1_module_proto_depIdxs,
|
||||
MessageInfos: file_dwn_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_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
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package oraclev1
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
@@ -18,8 +18,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_oracle_v1_query_proto_init()
|
||||
md_QueryParamsRequest = File_oracle_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
||||
file_dwn_v1_query_proto_init()
|
||||
md_QueryParamsRequest = File_dwn_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
|
||||
@@ -31,7 +31,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||
mi := &file_dwn_v1_query_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -104,9 +104,9 @@ func (x *fastReflection_QueryParamsRequest) Has(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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,9 +120,9 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,9 +156,9 @@ func (x *fastReflection_QueryParamsRequest) Set(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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,9 +176,9 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,9 +189,9 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsRequest does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri
|
||||
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(fmt.Errorf("%s is not a oneof field in dwn.v1.QueryParamsRequest", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -375,8 +375,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_oracle_v1_query_proto_init()
|
||||
md_QueryParamsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
||||
file_dwn_v1_query_proto_init()
|
||||
md_QueryParamsResponse = File_dwn_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
||||
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||
mi := &file_dwn_v1_query_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -466,13 +466,13 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,13 +484,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,14 +502,14 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,13 +525,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,16 +547,16 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,14 +565,14 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri
|
||||
// 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":
|
||||
case "dwn.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("proto3 declared messages do not support extensions: dwn.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message dwn.v1.QueryParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescr
|
||||
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(fmt.Errorf("%s is not a oneof field in dwn.v1.QueryParamsResponse", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -808,7 +808,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
// protoc (unknown)
|
||||
// source: oracle/v1/query.proto
|
||||
// source: dwn/v1/query.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
@@ -827,7 +827,7 @@ type QueryParamsRequest struct {
|
||||
func (x *QueryParamsRequest) Reset() {
|
||||
*x = QueryParamsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||
mi := &file_dwn_v1_query_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -841,7 +841,7 @@ func (*QueryParamsRequest) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_oracle_v1_query_proto_rawDescGZIP(), []int{0}
|
||||
return file_dwn_v1_query_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
@@ -857,7 +857,7 @@ type QueryParamsResponse struct {
|
||||
func (x *QueryParamsResponse) Reset() {
|
||||
*x = QueryParamsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||
mi := &file_dwn_v1_query_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -871,7 +871,7 @@ func (*QueryParamsResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_oracle_v1_query_proto_rawDescGZIP(), []int{1}
|
||||
return file_dwn_v1_query_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) GetParams() *Params {
|
||||
@@ -881,61 +881,58 @@ func (x *QueryParamsResponse) GetParams() *Params {
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_oracle_v1_query_proto protoreflect.FileDescriptor
|
||||
var File_dwn_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_dwn_v1_query_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x77, 0x6e, 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, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a,
|
||||
0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||
0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x64, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5b,
|
||||
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x7a, 0x0a, 0x0a, 0x63,
|
||||
0x6f, 0x6d, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31,
|
||||
0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x06, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56,
|
||||
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07,
|
||||
0x44, 0x77, 0x6e, 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
|
||||
file_dwn_v1_query_proto_rawDescOnce sync.Once
|
||||
file_dwn_v1_query_proto_rawDescData = file_dwn_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)
|
||||
func file_dwn_v1_query_proto_rawDescGZIP() []byte {
|
||||
file_dwn_v1_query_proto_rawDescOnce.Do(func() {
|
||||
file_dwn_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_v1_query_proto_rawDescData)
|
||||
})
|
||||
return file_oracle_v1_query_proto_rawDescData
|
||||
return file_dwn_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_dwn_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_dwn_v1_query_proto_goTypes = []interface{}{
|
||||
(*QueryParamsRequest)(nil), // 0: dwn.v1.QueryParamsRequest
|
||||
(*QueryParamsResponse)(nil), // 1: dwn.v1.QueryParamsResponse
|
||||
(*Params)(nil), // 2: dwn.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
|
||||
var file_dwn_v1_query_proto_depIdxs = []int32{
|
||||
2, // 0: dwn.v1.QueryParamsResponse.params:type_name -> dwn.v1.Params
|
||||
0, // 1: dwn.v1.Query.Params:input_type -> dwn.v1.QueryParamsRequest
|
||||
1, // 2: dwn.v1.Query.Params:output_type -> dwn.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
|
||||
@@ -943,14 +940,14 @@ var file_oracle_v1_query_proto_depIdxs = []int32{
|
||||
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 {
|
||||
func init() { file_dwn_v1_query_proto_init() }
|
||||
func file_dwn_v1_query_proto_init() {
|
||||
if File_dwn_v1_query_proto != nil {
|
||||
return
|
||||
}
|
||||
file_oracle_v1_genesis_proto_init()
|
||||
file_dwn_v1_genesis_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_oracle_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_dwn_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryParamsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -962,7 +959,7 @@ func file_oracle_v1_query_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_oracle_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_dwn_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryParamsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -979,18 +976,18 @@ func file_oracle_v1_query_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_oracle_v1_query_proto_rawDesc,
|
||||
RawDescriptor: file_dwn_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,
|
||||
GoTypes: file_dwn_v1_query_proto_goTypes,
|
||||
DependencyIndexes: file_dwn_v1_query_proto_depIdxs,
|
||||
MessageInfos: file_dwn_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
|
||||
File_dwn_v1_query_proto = out.File
|
||||
file_dwn_v1_query_proto_rawDesc = nil
|
||||
file_dwn_v1_query_proto_goTypes = nil
|
||||
file_dwn_v1_query_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: service/v1/query.proto
|
||||
// source: dwn/v1/query.proto
|
||||
|
||||
package servicev1
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -15,16 +15,18 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/service.v1.Query/Params"
|
||||
Query_Params_FullMethodName = "/dwn.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.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
type QueryClient interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
@@ -39,8 +41,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
}
|
||||
|
||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -49,21 +52,27 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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 {
|
||||
}
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -73,6 +82,13 @@ type UnsafeQueryServer interface {
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -98,7 +114,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
// 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",
|
||||
ServiceName: "dwn.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@@ -107,5 +123,5 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service/v1/query.proto",
|
||||
Metadata: "dwn/v1/query.proto",
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type CredentialTable interface {
|
||||
Insert(ctx context.Context, credential *Credential) error
|
||||
Update(ctx context.Context, credential *Credential) error
|
||||
Save(ctx context.Context, credential *Credential) error
|
||||
Delete(ctx context.Context, credential *Credential) error
|
||||
Has(ctx context.Context, id []byte) (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 []byte) (*Credential, error)
|
||||
List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error)
|
||||
ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to CredentialIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type CredentialIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i CredentialIterator) Value() (*Credential, error) {
|
||||
var credential Credential
|
||||
err := i.UnmarshalMessage(&credential)
|
||||
return &credential, err
|
||||
}
|
||||
|
||||
type CredentialIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
credentialIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type CredentialPrimaryKey = CredentialIdIndexKey
|
||||
|
||||
type CredentialIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x CredentialIdIndexKey) id() uint32 { return 0 }
|
||||
func (x CredentialIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x CredentialIdIndexKey) credentialIndexKey() {}
|
||||
|
||||
func (this CredentialIdIndexKey) WithId(id []byte) CredentialIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type credentialTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this credentialTable) Insert(ctx context.Context, credential *Credential) error {
|
||||
return this.table.Insert(ctx, credential)
|
||||
}
|
||||
|
||||
func (this credentialTable) Update(ctx context.Context, credential *Credential) error {
|
||||
return this.table.Update(ctx, credential)
|
||||
}
|
||||
|
||||
func (this credentialTable) Save(ctx context.Context, credential *Credential) error {
|
||||
return this.table.Save(ctx, credential)
|
||||
}
|
||||
|
||||
func (this credentialTable) Delete(ctx context.Context, credential *Credential) error {
|
||||
return this.table.Delete(ctx, credential)
|
||||
}
|
||||
|
||||
func (this credentialTable) Has(ctx context.Context, id []byte) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this credentialTable) Get(ctx context.Context, id []byte) (*Credential, error) {
|
||||
var credential Credential
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &credential, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &credential, nil
|
||||
}
|
||||
|
||||
func (this credentialTable) List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return CredentialIterator{it}, err
|
||||
}
|
||||
|
||||
func (this credentialTable) ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return CredentialIterator{it}, err
|
||||
}
|
||||
|
||||
func (this credentialTable) DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this credentialTable) DeleteRange(ctx context.Context, from, to CredentialIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this credentialTable) doNotImplement() {}
|
||||
|
||||
var _ CredentialTable = credentialTable{}
|
||||
|
||||
func NewCredentialTable(db ormtable.Schema) (CredentialTable, error) {
|
||||
table := db.GetTable(&Credential{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Credential{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return credentialTable{table}, 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, account []byte) (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 []byte) (*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 = ProfileAccountIndexKey
|
||||
|
||||
type ProfileAccountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ProfileAccountIndexKey) id() uint32 { return 0 }
|
||||
func (x ProfileAccountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ProfileAccountIndexKey) profileIndexKey() {}
|
||||
|
||||
func (this ProfileAccountIndexKey) WithAccount(account []byte) ProfileAccountIndexKey {
|
||||
this.vs = []interface{}{account}
|
||||
return this
|
||||
}
|
||||
|
||||
type ProfileAmountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ProfileAmountIndexKey) id() uint32 { return 1 }
|
||||
func (x ProfileAmountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ProfileAmountIndexKey) profileIndexKey() {}
|
||||
|
||||
func (this ProfileAmountIndexKey) WithAmount(amount uint64) ProfileAmountIndexKey {
|
||||
this.vs = []interface{}{amount}
|
||||
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, account []byte) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, account)
|
||||
}
|
||||
|
||||
func (this profileTable) Get(ctx context.Context, account []byte) (*Profile, error) {
|
||||
var profile Profile
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &profile, account)
|
||||
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 {
|
||||
CredentialTable() CredentialTable
|
||||
ProfileTable() ProfileTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
credential CredentialTable
|
||||
profile ProfileTable
|
||||
}
|
||||
|
||||
func (x stateStore) CredentialTable() CredentialTable {
|
||||
return x.credential
|
||||
}
|
||||
|
||||
func (x stateStore) ProfileTable() ProfileTable {
|
||||
return x.profile
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
credentialTable, err := NewCredentialTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
profileTable, err := NewProfileTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
credentialTable,
|
||||
profileTable,
|
||||
}, nil
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: vault/v1/tx.proto
|
||||
// source: dwn/v1/tx.proto
|
||||
|
||||
package vaultv1
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -15,26 +15,26 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_AllocateVault_FullMethodName = "/vault.v1.Msg/AllocateVault"
|
||||
Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams"
|
||||
Msg_UpdateParams_FullMethodName = "/dwn.v1.Msg/UpdateParams"
|
||||
Msg_Initialize_FullMethodName = "/dwn.v1.Msg/Initialize"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
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)
|
||||
// Spawn spawns a new Vault
|
||||
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@@ -45,18 +45,20 @@ 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...)
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
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...)
|
||||
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgInitializeResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -65,30 +67,34 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
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)
|
||||
// Spawn spawns a new Vault
|
||||
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMsgServer struct {
|
||||
}
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
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) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -98,27 +104,16 @@ type UnsafeMsgServer interface {
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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 {
|
||||
@@ -137,22 +132,40 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgInitialize)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Initialize(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Initialize_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
|
||||
}
|
||||
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",
|
||||
ServiceName: "dwn.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AllocateVault",
|
||||
Handler: _Msg_AllocateVault_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Initialize",
|
||||
Handler: _Msg_Initialize_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "vault/v1/tx.proto",
|
||||
Metadata: "dwn/v1/tx.proto",
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,385 +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 MacaroonTable interface {
|
||||
Insert(ctx context.Context, macaroon *Macaroon) error
|
||||
InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error)
|
||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||
Update(ctx context.Context, macaroon *Macaroon) error
|
||||
Save(ctx context.Context, macaroon *Macaroon) error
|
||||
Delete(ctx context.Context, macaroon *Macaroon) 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) (*Macaroon, 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) (*Macaroon, error)
|
||||
List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
|
||||
ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type MacaroonIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i MacaroonIterator) Value() (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
err := i.UnmarshalMessage(&macaroon)
|
||||
return &macaroon, err
|
||||
}
|
||||
|
||||
type MacaroonIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
macaroonIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type MacaroonPrimaryKey = MacaroonIdIndexKey
|
||||
|
||||
type MacaroonIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MacaroonIdIndexKey) id() uint32 { return 0 }
|
||||
func (x MacaroonIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MacaroonIdIndexKey) macaroonIndexKey() {}
|
||||
|
||||
func (this MacaroonIdIndexKey) WithId(id uint64) MacaroonIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type MacaroonSubjectOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MacaroonSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x MacaroonSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MacaroonSubjectOriginIndexKey) macaroonIndexKey() {}
|
||||
|
||||
func (this MacaroonSubjectOriginIndexKey) WithSubject(subject string) MacaroonSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this MacaroonSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MacaroonSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject, origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type macaroonTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
}
|
||||
|
||||
func (this macaroonTable) Insert(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Insert(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Update(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Update(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Save(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Save(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Delete(ctx context.Context, macaroon *Macaroon) error {
|
||||
return this.table.Delete(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, macaroon)
|
||||
}
|
||||
|
||||
func (this macaroonTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
return this.table.LastInsertedSequence(ctx)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this macaroonTable) Get(ctx context.Context, id uint64) (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &macaroon, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &macaroon, nil
|
||||
}
|
||||
|
||||
func (this macaroonTable) 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 macaroonTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error) {
|
||||
var macaroon Macaroon
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &macaroon,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &macaroon, nil
|
||||
}
|
||||
|
||||
func (this macaroonTable) List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return MacaroonIterator{it}, err
|
||||
}
|
||||
|
||||
func (this macaroonTable) ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return MacaroonIterator{it}, err
|
||||
}
|
||||
|
||||
func (this macaroonTable) DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this macaroonTable) DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this macaroonTable) doNotImplement() {}
|
||||
|
||||
var _ MacaroonTable = macaroonTable{}
|
||||
|
||||
func NewMacaroonTable(db ormtable.Schema) (MacaroonTable, error) {
|
||||
table := db.GetTable(&Macaroon{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Macaroon{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return macaroonTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
GrantTable() GrantTable
|
||||
MacaroonTable() MacaroonTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
grant GrantTable
|
||||
macaroon MacaroonTable
|
||||
}
|
||||
|
||||
func (x stateStore) GrantTable() GrantTable {
|
||||
return x.grant
|
||||
}
|
||||
|
||||
func (x stateStore) MacaroonTable() MacaroonTable {
|
||||
return x.macaroon
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
grantTable, err := NewGrantTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
macaroonTable, err := NewMacaroonTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
grantTable,
|
||||
macaroonTable,
|
||||
}, nil
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
}
|
||||
@@ -1,500 +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_oracle_module_v1_module_proto_init()
|
||||
md_Module = File_oracle_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_oracle_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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.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 oracle.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: oracle/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_oracle_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_oracle_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_oracle_module_v1_module_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_oracle_module_v1_module_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
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_oracle_module_v1_module_proto_rawDescOnce sync.Once
|
||||
file_oracle_module_v1_module_proto_rawDescData = file_oracle_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)
|
||||
})
|
||||
return file_oracle_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_oracle_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_oracle_module_v1_module_proto_init() }
|
||||
func file_oracle_module_v1_module_proto_init() {
|
||||
if File_oracle_module_v1_module_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_oracle_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_oracle_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,
|
||||
}.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 diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
}
|
||||
@@ -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
@@ -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",
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,8 +18,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 +31,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 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: 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 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in 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 +373,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 +393,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 +407,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,
|
||||
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, 0x28, 0x0a,
|
||||
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a,
|
||||
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
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, 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, 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, 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,
|
||||
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 +458,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 +481,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
@@ -1,10 +1,10 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: macaroon/v1/query.proto
|
||||
// source: svc/v1/query.proto
|
||||
|
||||
package macaroonv1
|
||||
package svcv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -15,25 +15,27 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/macaroon.v1.Query/Params"
|
||||
Query_RefreshToken_FullMethodName = "/macaroon.v1.Query/RefreshToken"
|
||||
Query_ValidateToken_FullMethodName = "/macaroon.v1.Query/ValidateToken"
|
||||
Query_Params_FullMethodName = "/svc.v1.Query/Params"
|
||||
Query_OriginExists_FullMethodName = "/svc.v1.Query/OriginExists"
|
||||
Query_ResolveOrigin_FullMethodName = "/svc.v1.Query/ResolveOrigin"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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)
|
||||
// OriginExists queries if a given origin exists.
|
||||
OriginExists(ctx context.Context, in *QueryOriginExistsRequest, opts ...grpc.CallOption) (*QueryOriginExistsResponse, error)
|
||||
// ResolveOrigin queries the domain of a given service and returns its record with capabilities.
|
||||
ResolveOrigin(ctx context.Context, in *QueryResolveOriginRequest, opts ...grpc.CallOption) (*QueryResolveOriginResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -45,26 +47,29 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
}
|
||||
|
||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
||||
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...)
|
||||
func (c *queryClient) OriginExists(ctx context.Context, in *QueryOriginExistsRequest, opts ...grpc.CallOption) (*QueryOriginExistsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryOriginExistsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_OriginExists_FullMethodName, in, out, cOpts...)
|
||||
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...)
|
||||
func (c *queryClient) ResolveOrigin(ctx context.Context, in *QueryResolveOriginRequest, opts ...grpc.CallOption) (*QueryResolveOriginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryResolveOriginResponse)
|
||||
err := c.cc.Invoke(ctx, Query_ResolveOrigin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -73,31 +78,37 @@ func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenR
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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)
|
||||
// OriginExists queries if a given origin exists.
|
||||
OriginExists(context.Context, *QueryOriginExistsRequest) (*QueryOriginExistsResponse, error)
|
||||
// ResolveOrigin queries the domain of a given service and returns its record with capabilities.
|
||||
ResolveOrigin(context.Context, *QueryResolveOriginRequest) (*QueryResolveOriginResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedQueryServer struct {
|
||||
}
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
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) OriginExists(context.Context, *QueryOriginExistsRequest) (*QueryOriginExistsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OriginExists not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented")
|
||||
func (UnimplementedQueryServer) ResolveOrigin(context.Context, *QueryResolveOriginRequest) (*QueryResolveOriginResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResolveOrigin not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -107,6 +118,13 @@ type UnsafeQueryServer interface {
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -128,38 +146,38 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
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)
|
||||
func _Query_OriginExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryOriginExistsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).RefreshToken(ctx, in)
|
||||
return srv.(QueryServer).OriginExists(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_RefreshToken_FullMethodName,
|
||||
FullMethod: Query_OriginExists_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).RefreshToken(ctx, req.(*QueryRefreshTokenRequest))
|
||||
return srv.(QueryServer).OriginExists(ctx, req.(*QueryOriginExistsRequest))
|
||||
}
|
||||
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)
|
||||
func _Query_ResolveOrigin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryResolveOriginRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).ValidateToken(ctx, in)
|
||||
return srv.(QueryServer).ResolveOrigin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_ValidateToken_FullMethodName,
|
||||
FullMethod: Query_ResolveOrigin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).ValidateToken(ctx, req.(*QueryValidateTokenRequest))
|
||||
return srv.(QueryServer).ResolveOrigin(ctx, req.(*QueryResolveOriginRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -168,7 +186,7 @@ func _Query_ValidateToken_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 Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "macaroon.v1.Query",
|
||||
ServiceName: "svc.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@@ -176,14 +194,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _Query_RefreshToken_Handler,
|
||||
MethodName: "OriginExists",
|
||||
Handler: _Query_OriginExists_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ValidateToken",
|
||||
Handler: _Query_ValidateToken_Handler,
|
||||
MethodName: "ResolveOrigin",
|
||||
Handler: _Query_ResolveOrigin_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "macaroon/v1/query.proto",
|
||||
Metadata: "svc/v1/query.proto",
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||
|
||||
package servicev1
|
||||
package svcv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -9,19 +9,177 @@ import (
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type DomainTable interface {
|
||||
Insert(ctx context.Context, domain *Domain) error
|
||||
InsertReturningId(ctx context.Context, domain *Domain) (uint64, error)
|
||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||
Update(ctx context.Context, domain *Domain) error
|
||||
Save(ctx context.Context, domain *Domain) error
|
||||
Delete(ctx context.Context, domain *Domain) 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) (*Domain, 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) (*Domain, error)
|
||||
List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error)
|
||||
ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to DomainIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type DomainIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i DomainIterator) Value() (*Domain, error) {
|
||||
var domain Domain
|
||||
err := i.UnmarshalMessage(&domain)
|
||||
return &domain, err
|
||||
}
|
||||
|
||||
type DomainIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
domainIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type DomainPrimaryKey = DomainIdIndexKey
|
||||
|
||||
type DomainIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x DomainIdIndexKey) id() uint32 { return 0 }
|
||||
func (x DomainIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x DomainIdIndexKey) domainIndexKey() {}
|
||||
|
||||
func (this DomainIdIndexKey) WithId(id uint64) DomainIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type DomainOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x DomainOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x DomainOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x DomainOriginIndexKey) domainIndexKey() {}
|
||||
|
||||
func (this DomainOriginIndexKey) WithOrigin(origin string) DomainOriginIndexKey {
|
||||
this.vs = []interface{}{origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type domainTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
}
|
||||
|
||||
func (this domainTable) Insert(ctx context.Context, domain *Domain) error {
|
||||
return this.table.Insert(ctx, domain)
|
||||
}
|
||||
|
||||
func (this domainTable) Update(ctx context.Context, domain *Domain) error {
|
||||
return this.table.Update(ctx, domain)
|
||||
}
|
||||
|
||||
func (this domainTable) Save(ctx context.Context, domain *Domain) error {
|
||||
return this.table.Save(ctx, domain)
|
||||
}
|
||||
|
||||
func (this domainTable) Delete(ctx context.Context, domain *Domain) error {
|
||||
return this.table.Delete(ctx, domain)
|
||||
}
|
||||
|
||||
func (this domainTable) InsertReturningId(ctx context.Context, domain *Domain) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, domain)
|
||||
}
|
||||
|
||||
func (this domainTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
return this.table.LastInsertedSequence(ctx)
|
||||
}
|
||||
|
||||
func (this domainTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this domainTable) Get(ctx context.Context, id uint64) (*Domain, error) {
|
||||
var domain Domain
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &domain, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &domain, nil
|
||||
}
|
||||
|
||||
func (this domainTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
origin,
|
||||
)
|
||||
}
|
||||
|
||||
func (this domainTable) GetByOrigin(ctx context.Context, origin string) (*Domain, error) {
|
||||
var domain Domain
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &domain,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &domain, nil
|
||||
}
|
||||
|
||||
func (this domainTable) List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return DomainIterator{it}, err
|
||||
}
|
||||
|
||||
func (this domainTable) ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return DomainIterator{it}, err
|
||||
}
|
||||
|
||||
func (this domainTable) DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this domainTable) DeleteRange(ctx context.Context, from, to DomainIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this domainTable) doNotImplement() {}
|
||||
|
||||
var _ DomainTable = domainTable{}
|
||||
|
||||
func NewDomainTable(db ormtable.Schema) (DomainTable, error) {
|
||||
table := db.GetTable(&Domain{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Domain{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return domainTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
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)
|
||||
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 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)
|
||||
Get(ctx context.Context, id string) (*Metadata, 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) (*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
|
||||
@@ -57,26 +215,31 @@ 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 {
|
||||
func (this MetadataIdIndexKey) WithId(id string) MetadataIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type MetadataOriginIndexKey struct {
|
||||
type MetadataSubjectOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MetadataOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x MetadataOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MetadataOriginIndexKey) metadataIndexKey() {}
|
||||
func (x MetadataSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x MetadataSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MetadataSubjectOriginIndexKey) metadataIndexKey() {}
|
||||
|
||||
func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey {
|
||||
this.vs = []interface{}{origin}
|
||||
func (this MetadataSubjectOriginIndexKey) WithSubject(subject string) MetadataSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this MetadataSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MetadataSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject, origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type metadataTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error {
|
||||
@@ -95,19 +258,11 @@ 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) {
|
||||
func (this metadataTable) Has(ctx context.Context, id string) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) {
|
||||
func (this metadataTable) Get(ctx context.Context, id string) (*Metadata, error) {
|
||||
var metadata Metadata
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &metadata, id)
|
||||
if err != nil {
|
||||
@@ -119,15 +274,17 @@ func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error)
|
||||
return &metadata, nil
|
||||
}
|
||||
|
||||
func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
|
||||
func (this metadataTable) 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 metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) {
|
||||
func (this metadataTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Metadata, error) {
|
||||
var metadata Metadata
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -166,203 +323,46 @@ func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) {
|
||||
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
|
||||
return metadataTable{table}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
DomainTable() DomainTable
|
||||
MetadataTable() MetadataTable
|
||||
ProfileTable() ProfileTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
domain DomainTable
|
||||
metadata MetadataTable
|
||||
profile ProfileTable
|
||||
}
|
||||
|
||||
func (x stateStore) DomainTable() DomainTable {
|
||||
return x.domain
|
||||
}
|
||||
|
||||
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) {
|
||||
domainTable, err := NewDomainTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
metadataTable, err := NewMetadataTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
profileTable, err := NewProfileTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
domainTable,
|
||||
metadataTable,
|
||||
profileTable,
|
||||
}, nil
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package servicev1
|
||||
package svcv1
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/cosmos/msg/v1"
|
||||
@@ -22,8 +22,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_service_v1_tx_proto_init()
|
||||
md_MsgUpdateParams = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParams")
|
||||
file_svc_v1_tx_proto_init()
|
||||
md_MsgUpdateParams = File_svc_v1_tx_proto.Messages().ByName("MsgUpdateParams")
|
||||
fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority")
|
||||
fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params")
|
||||
}
|
||||
@@ -37,7 +37,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[0]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -120,15 +120,15 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
return x.Authority != ""
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
return x.Params != nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,15 +140,15 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
x.Authority = ""
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
x.Params = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,17 +160,17 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor)
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
value := x.Authority
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
value := x.Params
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,15 +186,15 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
x.Authority = value.Interface().(string)
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
x.Params = value.Message().Interface().(*Params)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,18 +210,18 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
if x.Params == nil {
|
||||
x.Params = new(Params)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
panic(fmt.Errorf("field authority of message service.v1.MsgUpdateParams is not mutable"))
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
panic(fmt.Errorf("field authority of message svc.v1.MsgUpdateParams is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,16 +230,16 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgUpdateParams.authority":
|
||||
case "svc.v1.MsgUpdateParams.authority":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "service.v1.MsgUpdateParams.params":
|
||||
case "svc.v1.MsgUpdateParams.params":
|
||||
m := new(Params)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParams"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParams does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto
|
||||
func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParams", d.FullName()))
|
||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgUpdateParams", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -519,8 +519,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_service_v1_tx_proto_init()
|
||||
md_MsgUpdateParamsResponse = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse")
|
||||
file_svc_v1_tx_proto_init()
|
||||
md_MsgUpdateParamsResponse = File_svc_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil)
|
||||
@@ -532,7 +532,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[1]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -605,9 +605,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,9 +621,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,9 +637,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,9 +657,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,9 +677,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDe
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -690,9 +690,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgUpdateParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD
|
||||
func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParamsResponse", d.FullName()))
|
||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgUpdateParamsResponse", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -877,8 +877,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_service_v1_tx_proto_init()
|
||||
md_MsgRegisterService = File_service_v1_tx_proto.Messages().ByName("MsgRegisterService")
|
||||
file_svc_v1_tx_proto_init()
|
||||
md_MsgRegisterService = File_svc_v1_tx_proto.Messages().ByName("MsgRegisterService")
|
||||
fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller")
|
||||
fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service")
|
||||
}
|
||||
@@ -892,7 +892,7 @@ func (x *MsgRegisterService) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[2]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -975,15 +975,15 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
return x.Controller != ""
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
return x.Service != nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -995,15 +995,15 @@ func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor)
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
x.Controller = ""
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
x.Service = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,17 +1015,17 @@ func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescripto
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
value := x.Controller
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
value := x.Service
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1041,15 +1041,15 @@ func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDes
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
x.Controller = value.Interface().(string)
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
x.Service = value.Message().Interface().(*Service)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,18 +1065,18 @@ func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor,
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
if x.Service == nil {
|
||||
x.Service = new(Service)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
panic(fmt.Errorf("field controller of message service.v1.MsgRegisterService is not mutable"))
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
panic(fmt.Errorf("field controller of message svc.v1.MsgRegisterService is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1085,16 +1085,16 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterService.controller":
|
||||
case "svc.v1.MsgRegisterService.controller":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "service.v1.MsgRegisterService.service":
|
||||
case "svc.v1.MsgRegisterService.service":
|
||||
m := new(Service)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterService"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterService does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1104,7 +1104,7 @@ func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescri
|
||||
func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterService", d.FullName()))
|
||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgRegisterService", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -1376,8 +1376,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_service_v1_tx_proto_init()
|
||||
md_MsgRegisterServiceResponse = File_service_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse")
|
||||
file_svc_v1_tx_proto_init()
|
||||
md_MsgRegisterServiceResponse = File_svc_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse")
|
||||
fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success")
|
||||
fd_MsgRegisterServiceResponse_did = md_MsgRegisterServiceResponse.Fields().ByName("did")
|
||||
}
|
||||
@@ -1391,7 +1391,7 @@ func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[3]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -1474,15 +1474,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.Fi
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
return x.Success != false
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
return x.Did != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1494,15 +1494,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDes
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
x.Success = false
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
x.Did = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1514,17 +1514,17 @@ func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldD
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
value := x.Success
|
||||
return protoreflect.ValueOfBool(value)
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
value := x.Did
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1540,15 +1540,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
x.Success = value.Bool()
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
x.Did = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1564,15 +1564,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDes
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
panic(fmt.Errorf("field success of message service.v1.MsgRegisterServiceResponse is not mutable"))
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
panic(fmt.Errorf("field did of message service.v1.MsgRegisterServiceResponse is not mutable"))
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
panic(fmt.Errorf("field success of message svc.v1.MsgRegisterServiceResponse is not mutable"))
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
panic(fmt.Errorf("field did of message svc.v1.MsgRegisterServiceResponse is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1581,15 +1581,15 @@ func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.Fiel
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "service.v1.MsgRegisterServiceResponse.success":
|
||||
case "svc.v1.MsgRegisterServiceResponse.success":
|
||||
return protoreflect.ValueOfBool(false)
|
||||
case "service.v1.MsgRegisterServiceResponse.did":
|
||||
case "svc.v1.MsgRegisterServiceResponse.did":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse"))
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.MsgRegisterServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
panic(fmt.Errorf("message svc.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1599,7 +1599,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.Fie
|
||||
func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterServiceResponse", d.FullName()))
|
||||
panic(fmt.Errorf("%s is not a oneof field in svc.v1.MsgRegisterServiceResponse", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -1847,7 +1847,7 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
// protoc (unknown)
|
||||
// source: service/v1/tx.proto
|
||||
// source: svc/v1/tx.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
@@ -1875,7 +1875,7 @@ type MsgUpdateParams struct {
|
||||
func (x *MsgUpdateParams) Reset() {
|
||||
*x = MsgUpdateParams{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[0]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -1889,7 +1889,7 @@ func (*MsgUpdateParams) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead.
|
||||
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
|
||||
return file_service_v1_tx_proto_rawDescGZIP(), []int{0}
|
||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *MsgUpdateParams) GetAuthority() string {
|
||||
@@ -1919,7 +1919,7 @@ type MsgUpdateParamsResponse struct {
|
||||
func (x *MsgUpdateParamsResponse) Reset() {
|
||||
*x = MsgUpdateParamsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[1]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -1933,7 +1933,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_v1_tx_proto_rawDescGZIP(), []int{1}
|
||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// MsgRegisterService is the message type for the RegisterService RPC.
|
||||
@@ -1952,7 +1952,7 @@ type MsgRegisterService struct {
|
||||
func (x *MsgRegisterService) Reset() {
|
||||
*x = MsgRegisterService{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[2]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -1966,7 +1966,7 @@ func (*MsgRegisterService) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead.
|
||||
func (*MsgRegisterService) Descriptor() ([]byte, []int) {
|
||||
return file_service_v1_tx_proto_rawDescGZIP(), []int{2}
|
||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *MsgRegisterService) GetController() string {
|
||||
@@ -1996,7 +1996,7 @@ type MsgRegisterServiceResponse struct {
|
||||
func (x *MsgRegisterServiceResponse) Reset() {
|
||||
*x = MsgRegisterServiceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_v1_tx_proto_msgTypes[3]
|
||||
mi := &file_svc_v1_tx_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2010,7 +2010,7 @@ func (*MsgRegisterServiceResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_v1_tx_proto_rawDescGZIP(), []int{3}
|
||||
return file_svc_v1_tx_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MsgRegisterServiceResponse) GetSuccess() bool {
|
||||
@@ -2027,94 +2027,90 @@ func (x *MsgRegisterServiceResponse) GetDid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_service_v1_tx_proto protoreflect.FileDescriptor
|
||||
var File_svc_v1_tx_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_v1_tx_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x8b, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74,
|
||||
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4,
|
||||
0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||
0x79, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||
var file_svc_v1_tx_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x06, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x14, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73,
|
||||
0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x4d, 0x73,
|
||||
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a,
|
||||
0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12,
|
||||
0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f,
|
||||
0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22,
|
||||
0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
||||
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xb9, 0x01, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||
0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0f, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a,
|
||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d,
|
||||
0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xa9, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a,
|
||||
0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e,
|
||||
0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x76, 0x63,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x26, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05,
|
||||
0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 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,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a,
|
||||
0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42,
|
||||
0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76,
|
||||
0x63, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e,
|
||||
0x56, 0x31, 0xca, 0x02, 0x06, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76,
|
||||
0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0xea, 0x02, 0x07, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_service_v1_tx_proto_rawDescOnce sync.Once
|
||||
file_service_v1_tx_proto_rawDescData = file_service_v1_tx_proto_rawDesc
|
||||
file_svc_v1_tx_proto_rawDescOnce sync.Once
|
||||
file_svc_v1_tx_proto_rawDescData = file_svc_v1_tx_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_v1_tx_proto_rawDescGZIP() []byte {
|
||||
file_service_v1_tx_proto_rawDescOnce.Do(func() {
|
||||
file_service_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_tx_proto_rawDescData)
|
||||
func file_svc_v1_tx_proto_rawDescGZIP() []byte {
|
||||
file_svc_v1_tx_proto_rawDescOnce.Do(func() {
|
||||
file_svc_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_v1_tx_proto_rawDescData)
|
||||
})
|
||||
return file_service_v1_tx_proto_rawDescData
|
||||
return file_svc_v1_tx_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_v1_tx_proto_goTypes = []interface{}{
|
||||
(*MsgUpdateParams)(nil), // 0: service.v1.MsgUpdateParams
|
||||
(*MsgUpdateParamsResponse)(nil), // 1: service.v1.MsgUpdateParamsResponse
|
||||
(*MsgRegisterService)(nil), // 2: service.v1.MsgRegisterService
|
||||
(*MsgRegisterServiceResponse)(nil), // 3: service.v1.MsgRegisterServiceResponse
|
||||
(*Params)(nil), // 4: service.v1.Params
|
||||
(*Service)(nil), // 5: service.v1.Service
|
||||
var file_svc_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_svc_v1_tx_proto_goTypes = []interface{}{
|
||||
(*MsgUpdateParams)(nil), // 0: svc.v1.MsgUpdateParams
|
||||
(*MsgUpdateParamsResponse)(nil), // 1: svc.v1.MsgUpdateParamsResponse
|
||||
(*MsgRegisterService)(nil), // 2: svc.v1.MsgRegisterService
|
||||
(*MsgRegisterServiceResponse)(nil), // 3: svc.v1.MsgRegisterServiceResponse
|
||||
(*Params)(nil), // 4: svc.v1.Params
|
||||
(*Service)(nil), // 5: svc.v1.Service
|
||||
}
|
||||
var file_service_v1_tx_proto_depIdxs = []int32{
|
||||
4, // 0: service.v1.MsgUpdateParams.params:type_name -> service.v1.Params
|
||||
5, // 1: service.v1.MsgRegisterService.service:type_name -> service.v1.Service
|
||||
0, // 2: service.v1.Msg.UpdateParams:input_type -> service.v1.MsgUpdateParams
|
||||
2, // 3: service.v1.Msg.RegisterService:input_type -> service.v1.MsgRegisterService
|
||||
1, // 4: service.v1.Msg.UpdateParams:output_type -> service.v1.MsgUpdateParamsResponse
|
||||
3, // 5: service.v1.Msg.RegisterService:output_type -> service.v1.MsgRegisterServiceResponse
|
||||
var file_svc_v1_tx_proto_depIdxs = []int32{
|
||||
4, // 0: svc.v1.MsgUpdateParams.params:type_name -> svc.v1.Params
|
||||
5, // 1: svc.v1.MsgRegisterService.service:type_name -> svc.v1.Service
|
||||
0, // 2: svc.v1.Msg.UpdateParams:input_type -> svc.v1.MsgUpdateParams
|
||||
2, // 3: svc.v1.Msg.RegisterService:input_type -> svc.v1.MsgRegisterService
|
||||
1, // 4: svc.v1.Msg.UpdateParams:output_type -> svc.v1.MsgUpdateParamsResponse
|
||||
3, // 5: svc.v1.Msg.RegisterService:output_type -> svc.v1.MsgRegisterServiceResponse
|
||||
4, // [4:6] is the sub-list for method output_type
|
||||
2, // [2:4] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
@@ -2122,14 +2118,14 @@ var file_service_v1_tx_proto_depIdxs = []int32{
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_service_v1_tx_proto_init() }
|
||||
func file_service_v1_tx_proto_init() {
|
||||
if File_service_v1_tx_proto != nil {
|
||||
func init() { file_svc_v1_tx_proto_init() }
|
||||
func file_svc_v1_tx_proto_init() {
|
||||
if File_svc_v1_tx_proto != nil {
|
||||
return
|
||||
}
|
||||
file_service_v1_genesis_proto_init()
|
||||
file_svc_v1_genesis_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_svc_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MsgUpdateParams); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -2141,7 +2137,7 @@ func file_service_v1_tx_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_svc_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MsgUpdateParamsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -2153,7 +2149,7 @@ func file_service_v1_tx_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_svc_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MsgRegisterService); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -2165,7 +2161,7 @@ func file_service_v1_tx_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_svc_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MsgRegisterServiceResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -2182,18 +2178,18 @@ func file_service_v1_tx_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_v1_tx_proto_rawDesc,
|
||||
RawDescriptor: file_svc_v1_tx_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_service_v1_tx_proto_goTypes,
|
||||
DependencyIndexes: file_service_v1_tx_proto_depIdxs,
|
||||
MessageInfos: file_service_v1_tx_proto_msgTypes,
|
||||
GoTypes: file_svc_v1_tx_proto_goTypes,
|
||||
DependencyIndexes: file_svc_v1_tx_proto_depIdxs,
|
||||
MessageInfos: file_svc_v1_tx_proto_msgTypes,
|
||||
}.Build()
|
||||
File_service_v1_tx_proto = out.File
|
||||
file_service_v1_tx_proto_rawDesc = nil
|
||||
file_service_v1_tx_proto_goTypes = nil
|
||||
file_service_v1_tx_proto_depIdxs = nil
|
||||
File_svc_v1_tx_proto = out.File
|
||||
file_svc_v1_tx_proto_rawDesc = nil
|
||||
file_svc_v1_tx_proto_goTypes = nil
|
||||
file_svc_v1_tx_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: service/v1/tx.proto
|
||||
// source: svc/v1/tx.proto
|
||||
|
||||
package servicev1
|
||||
package svcv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@@ -15,17 +15,19 @@ import (
|
||||
|
||||
// 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams"
|
||||
Msg_RegisterService_FullMethodName = "/service.v1.Msg/RegisterService"
|
||||
Msg_UpdateParams_FullMethodName = "/svc.v1.Msg/UpdateParams"
|
||||
Msg_RegisterService_FullMethodName = "/svc.v1.Msg/RegisterService"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
@@ -45,8 +47,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -54,8 +57,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
}
|
||||
|
||||
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgRegisterServiceResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -64,7 +68,9 @@ func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService,
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
@@ -76,9 +82,12 @@ type MsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMsgServer struct {
|
||||
}
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
@@ -87,6 +96,7 @@ func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterServi
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
@@ -96,6 +106,13 @@ type UnsafeMsgServer interface {
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -139,7 +156,7 @@ 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{
|
||||
{
|
||||
@@ -152,5 +169,5 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service/v1/tx.proto",
|
||||
Metadata: "svc/v1/tx.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,772 +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
|
||||
fd_DWN_resolver 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")
|
||||
fd_DWN_resolver = md_DWN.Fields().ByName("resolver")
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
if x.Resolver != "" {
|
||||
value := protoreflect.ValueOfString(x.Resolver)
|
||||
if !f(fd_DWN_resolver, 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 != ""
|
||||
case "vault.v1.DWN.resolver":
|
||||
return x.Resolver != ""
|
||||
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 = ""
|
||||
case "vault.v1.DWN.resolver":
|
||||
x.Resolver = ""
|
||||
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)
|
||||
case "vault.v1.DWN.resolver":
|
||||
value := x.Resolver
|
||||
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)
|
||||
case "vault.v1.DWN.resolver":
|
||||
x.Resolver = 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"))
|
||||
case "vault.v1.DWN.resolver":
|
||||
panic(fmt.Errorf("field resolver 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("")
|
||||
case "vault.v1.DWN.resolver":
|
||||
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))
|
||||
}
|
||||
l = len(x.Resolver)
|
||||
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.Resolver) > 0 {
|
||||
i -= len(x.Resolver)
|
||||
copy(dAtA[i:], x.Resolver)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resolver)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
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
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolver", 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.Resolver = 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"`
|
||||
Resolver string `protobuf:"bytes,4,opt,name=resolver,proto3" json:"resolver,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 ""
|
||||
}
|
||||
|
||||
func (x *DWN) GetResolver() string {
|
||||
if x != nil {
|
||||
return x.Resolver
|
||||
}
|
||||
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, 0x83, 0x01, 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, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x6c, 0x76, 0x65, 0x72, 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
|
||||
}
|
||||
+1
-1
@@ -58,7 +58,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
|
||||
ante.NewTxTimeoutHeightDecorator(),
|
||||
ante.NewValidateMemoDecorator(options.AccountKeeper),
|
||||
// ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
|
||||
globalfeeante.NewFeeDecorator(options.BypassMinFeeMsgTypes, options.GlobalFeeKeeper, options.StakingKeeper, 2_000_000),
|
||||
globalfeeante.NewFeeDecorator(options.BypassMinFeeMsgTypes, options.GlobalFeeKeeper, 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),
|
||||
|
||||
+56
-82
@@ -134,6 +134,15 @@ import (
|
||||
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
||||
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
|
||||
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
|
||||
did "github.com/onsonr/sonr/x/did"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
didtypes "github.com/onsonr/sonr/x/did/types"
|
||||
dwn "github.com/onsonr/sonr/x/dwn"
|
||||
dwnkeeper "github.com/onsonr/sonr/x/dwn/keeper"
|
||||
dwntypes "github.com/onsonr/sonr/x/dwn/types"
|
||||
svc "github.com/onsonr/sonr/x/svc"
|
||||
svckeeper "github.com/onsonr/sonr/x/svc/keeper"
|
||||
svctypes "github.com/onsonr/sonr/x/svc/types"
|
||||
"github.com/spf13/cast"
|
||||
globalfee "github.com/strangelove-ventures/globalfee/x/globalfee"
|
||||
globalfeekeeper "github.com/strangelove-ventures/globalfee/x/globalfee/keeper"
|
||||
@@ -144,22 +153,6 @@ import (
|
||||
tokenfactory "github.com/strangelove-ventures/tokenfactory/x/tokenfactory"
|
||||
tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper"
|
||||
tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
|
||||
|
||||
did "github.com/onsonr/sonr/x/did"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
didtypes "github.com/onsonr/sonr/x/did/types"
|
||||
macaroon "github.com/onsonr/sonr/x/macaroon"
|
||||
macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper"
|
||||
macaroontypes "github.com/onsonr/sonr/x/macaroon/types"
|
||||
oracle "github.com/onsonr/sonr/x/oracle"
|
||||
oraclekeeper "github.com/onsonr/sonr/x/oracle/keeper"
|
||||
oracletypes "github.com/onsonr/sonr/x/oracle/types"
|
||||
service "github.com/onsonr/sonr/x/service"
|
||||
servicekeeper "github.com/onsonr/sonr/x/service/keeper"
|
||||
servicetypes "github.com/onsonr/sonr/x/service/types"
|
||||
vault "github.com/onsonr/sonr/x/vault"
|
||||
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||
vaulttypes "github.com/onsonr/sonr/x/vault/types"
|
||||
)
|
||||
|
||||
const appName = "sonr"
|
||||
@@ -238,10 +231,8 @@ type SonrApp struct {
|
||||
CrisisKeeper *crisiskeeper.Keeper
|
||||
UpgradeKeeper *upgradekeeper.Keeper
|
||||
legacyAmino *codec.LegacyAmino
|
||||
VaultKeeper vaultkeeper.Keeper
|
||||
MacaroonKeeper macaroonkeeper.Keeper
|
||||
ServiceKeeper servicekeeper.Keeper
|
||||
OracleKeeper oraclekeeper.Keeper
|
||||
DwnKeeper dwnkeeper.Keeper
|
||||
SvcKeeper svckeeper.Keeper
|
||||
sm *module.SimulationManager
|
||||
BasicModuleManager module.BasicManager
|
||||
ModuleManager *module.Manager
|
||||
@@ -374,10 +365,8 @@ func NewChainApp(
|
||||
globalfeetypes.StoreKey,
|
||||
packetforwardtypes.StoreKey,
|
||||
didtypes.StoreKey,
|
||||
vaulttypes.StoreKey,
|
||||
macaroontypes.StoreKey,
|
||||
servicetypes.StoreKey,
|
||||
oracletypes.StoreKey,
|
||||
dwntypes.StoreKey,
|
||||
svctypes.StoreKey,
|
||||
)
|
||||
|
||||
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
|
||||
@@ -637,45 +626,43 @@ func NewChainApp(
|
||||
app.StakingKeeper,
|
||||
)
|
||||
|
||||
// Create the vault Keeper
|
||||
app.VaultKeeper = vaultkeeper.NewKeeper(
|
||||
// Create the svc Keeper
|
||||
app.SvcKeeper = svckeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.DidKeeper,
|
||||
)
|
||||
// Create the macaroon Keeper
|
||||
app.MacaroonKeeper = macaroonkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[macaroontypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.DidKeeper,
|
||||
)
|
||||
|
||||
// Create the service Keeper
|
||||
app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.DidKeeper,
|
||||
app.GroupKeeper,
|
||||
app.MacaroonKeeper,
|
||||
app.NFTKeeper,
|
||||
)
|
||||
|
||||
// Create the oracle Keeper
|
||||
app.OracleKeeper = oraclekeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[oracletypes.StoreKey]),
|
||||
sdkruntime.NewKVStoreService(keys[svctypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
|
||||
// Create the dwn Keeper
|
||||
app.DwnKeeper = dwnkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[dwntypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
// // Create the vault Keeper
|
||||
// app.VaultKeeper = vaultkeeper.NewKeeper(
|
||||
// appCodec,
|
||||
// sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||
// logger,
|
||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
// app.AccountKeeper,
|
||||
// app.DidKeeper,
|
||||
// )
|
||||
//
|
||||
// // Create the service Keeper
|
||||
// app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
// appCodec,
|
||||
// sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
// logger,
|
||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
// app.DidKeeper,
|
||||
// app.GroupKeeper,
|
||||
// app.NFTKeeper,
|
||||
// app.VaultKeeper,
|
||||
// )
|
||||
//
|
||||
// Create the globalfee keeper
|
||||
app.GlobalFeeKeeper = globalfeekeeper.NewKeeper(
|
||||
appCodec,
|
||||
@@ -933,12 +920,8 @@ func NewChainApp(
|
||||
),
|
||||
|
||||
did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper),
|
||||
|
||||
macaroon.NewAppModule(appCodec, app.MacaroonKeeper, app.DidKeeper),
|
||||
vault.NewAppModule(appCodec, app.VaultKeeper, app.DidKeeper),
|
||||
|
||||
service.NewAppModule(appCodec, app.ServiceKeeper, app.DidKeeper, app.MacaroonKeeper),
|
||||
oracle.NewAppModule(appCodec, app.OracleKeeper, app.DidKeeper, app.MacaroonKeeper),
|
||||
dwn.NewAppModule(appCodec, app.DwnKeeper),
|
||||
svc.NewAppModule(appCodec, app.SvcKeeper),
|
||||
)
|
||||
|
||||
// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
|
||||
@@ -987,10 +970,8 @@ func NewChainApp(
|
||||
tokenfactorytypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
macaroontypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
oracletypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
)
|
||||
|
||||
app.ModuleManager.SetOrderEndBlockers(
|
||||
@@ -1010,10 +991,8 @@ func NewChainApp(
|
||||
tokenfactorytypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
macaroontypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
oracletypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
)
|
||||
|
||||
// NOTE: The genutils module must occur after staking so that pools are
|
||||
@@ -1042,10 +1021,8 @@ func NewChainApp(
|
||||
globalfeetypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
macaroontypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
oracletypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
}
|
||||
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
|
||||
app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...)
|
||||
@@ -1204,8 +1181,7 @@ func GetDefaultBypassFeeMessages() []string {
|
||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenTry{}),
|
||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenConfirm{}),
|
||||
sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenAck{}),
|
||||
sdk.MsgTypeURL(&vaulttypes.MsgAllocateVault{}),
|
||||
sdk.MsgTypeURL(&didtypes.MsgRegisterController{}),
|
||||
sdk.MsgTypeURL(&didtypes.MsgLinkAuthentication{}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1505,10 +1481,8 @@ func initParamsKeeper(
|
||||
paramsKeeper.Subspace(packetforwardtypes.ModuleName).
|
||||
WithKeyTable(packetforwardtypes.ParamKeyTable())
|
||||
paramsKeeper.Subspace(didtypes.ModuleName)
|
||||
paramsKeeper.Subspace(vaulttypes.ModuleName)
|
||||
paramsKeeper.Subspace(macaroontypes.ModuleName)
|
||||
paramsKeeper.Subspace(servicetypes.ModuleName)
|
||||
paramsKeeper.Subspace(oracletypes.ModuleName)
|
||||
paramsKeeper.Subspace(dwntypes.ModuleName)
|
||||
paramsKeeper.Subspace(svctypes.ModuleName)
|
||||
|
||||
return paramsKeeper
|
||||
}
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
package dexmodel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/charmbracelet/bubbles/table"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
|
||||
highlight = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#7D56F4"}
|
||||
special = lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"}
|
||||
|
||||
titleStyle = lipgloss.NewStyle().
|
||||
MarginLeft(1).
|
||||
MarginRight(5).
|
||||
Padding(0, 1).
|
||||
Italic(true).
|
||||
Foreground(lipgloss.Color("#FFF7DB")).
|
||||
SetString("Cosmos Block Explorer")
|
||||
|
||||
infoStyle = lipgloss.NewStyle().
|
||||
BorderStyle(lipgloss.NormalBorder()).
|
||||
BorderTop(true).
|
||||
BorderForeground(subtle)
|
||||
)
|
||||
|
||||
type model struct {
|
||||
blocks []string
|
||||
transactionTable table.Model
|
||||
stats map[string]string
|
||||
width int
|
||||
height int
|
||||
}
|
||||
|
||||
func initialModel() model {
|
||||
columns := []table.Column{
|
||||
{Title: "Hash", Width: 10},
|
||||
{Title: "Type", Width: 15},
|
||||
{Title: "Height", Width: 10},
|
||||
{Title: "Time", Width: 20},
|
||||
}
|
||||
|
||||
rows := []table.Row{
|
||||
{"abc123", "Transfer", "1000", time.Now().Format(time.RFC3339)},
|
||||
{"def456", "Delegate", "999", time.Now().Add(-1 * time.Minute).Format(time.RFC3339)},
|
||||
{"ghi789", "Vote", "998", time.Now().Add(-2 * time.Minute).Format(time.RFC3339)},
|
||||
}
|
||||
|
||||
t := table.New(
|
||||
table.WithColumns(columns),
|
||||
table.WithRows(rows),
|
||||
table.WithFocused(true),
|
||||
table.WithHeight(7),
|
||||
)
|
||||
|
||||
s := table.DefaultStyles()
|
||||
s.Header = s.Header.
|
||||
BorderStyle(lipgloss.NormalBorder()).
|
||||
BorderForeground(lipgloss.Color("240")).
|
||||
BorderBottom(true).
|
||||
Bold(false)
|
||||
s.Selected = s.Selected.
|
||||
Foreground(lipgloss.Color("229")).
|
||||
Background(lipgloss.Color("57")).
|
||||
Bold(false)
|
||||
t.SetStyles(s)
|
||||
|
||||
return model{
|
||||
blocks: []string{"Block 1", "Block 2", "Block 3"},
|
||||
transactionTable: t,
|
||||
stats: map[string]string{
|
||||
"Latest Block": "1000",
|
||||
"Validators": "100",
|
||||
"Bonded Tokens": "1,000,000",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (m model) Init() tea.Cmd {
|
||||
return tick
|
||||
}
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
var cmd tea.Cmd
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
switch msg.String() {
|
||||
case "q", "ctrl+c":
|
||||
return m, tea.Quit
|
||||
case "enter":
|
||||
return m, tea.Batch(
|
||||
tea.Printf("Selected transaction: %s", m.transactionTable.SelectedRow()[0]),
|
||||
)
|
||||
}
|
||||
case tea.WindowSizeMsg:
|
||||
m.height = msg.Height
|
||||
m.width = msg.Width
|
||||
case tickMsg:
|
||||
// Update data here
|
||||
m.blocks = append([]string{"New Block"}, m.blocks...)
|
||||
if len(m.blocks) > 5 {
|
||||
m.blocks = m.blocks[:5]
|
||||
}
|
||||
|
||||
// Add a new transaction to the table
|
||||
newRow := table.Row{
|
||||
fmt.Sprintf("tx%d", time.Now().Unix()),
|
||||
"NewTxType",
|
||||
fmt.Sprintf("%d", 1000+len(m.transactionTable.Rows())),
|
||||
time.Now().Format(time.RFC3339),
|
||||
}
|
||||
m.transactionTable.SetRows(append([]table.Row{newRow}, m.transactionTable.Rows()...))
|
||||
if len(m.transactionTable.Rows()) > 10 {
|
||||
m.transactionTable.SetRows(m.transactionTable.Rows()[:10])
|
||||
}
|
||||
|
||||
return m, tick
|
||||
}
|
||||
m.transactionTable, cmd = m.transactionTable.Update(msg)
|
||||
return m, cmd
|
||||
}
|
||||
|
||||
func (m model) View() string {
|
||||
s := titleStyle.Render("Cosmos Block Explorer")
|
||||
s += "\n\n"
|
||||
|
||||
// Blocks
|
||||
s += lipgloss.NewStyle().Bold(true).Render("Recent Blocks") + "\n"
|
||||
for _, block := range m.blocks {
|
||||
s += "• " + block + "\n"
|
||||
}
|
||||
s += "\n"
|
||||
|
||||
// Transactions
|
||||
s += lipgloss.NewStyle().Bold(true).Render("Recent Transactions") + "\n"
|
||||
s += m.transactionTable.View() + "\n\n"
|
||||
|
||||
// Stats
|
||||
s += lipgloss.NewStyle().Bold(true).Render("Network Statistics") + "\n"
|
||||
for key, value := range m.stats {
|
||||
s += fmt.Sprintf("%s: %s\n", key, value)
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
type tickMsg time.Time
|
||||
|
||||
func tick() tea.Msg {
|
||||
time.Sleep(time.Second)
|
||||
return tickMsg{}
|
||||
}
|
||||
|
||||
func RunExplorerTUI(cmd *cobra.Command, args []string) error {
|
||||
p := tea.NewProgram(initialModel(), tea.WithAltScreen())
|
||||
if _, err := p.Run(); err != nil {
|
||||
return fmt.Errorf("error running explorer: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/onsonr/sonr/app/cli/dexmodel"
|
||||
"github.com/onsonr/sonr/app/cli/txmodel"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func NewBuildTxnTUICmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "dash",
|
||||
Short: "TUI for managing the local Sonr validator node",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
txBody, err := txmodel.RunBuildTxnTUI()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
interfaceRegistry := codectypes.NewInterfaceRegistry()
|
||||
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||
jsonBytes, err := marshaler.MarshalJSON(txBody)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal tx body: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println("Generated Protobuf Message (JSON format):")
|
||||
fmt.Println(string(jsonBytes))
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func NewExplorerTUICmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "cosmos-explorer",
|
||||
Short: "A terminal-based Cosmos blockchain explorer",
|
||||
RunE: dexmodel.RunExplorerTUI,
|
||||
}
|
||||
}
|
||||
@@ -1,322 +0,0 @@
|
||||
package txmodel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/huh"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/tx"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
const maxWidth = 100
|
||||
|
||||
var (
|
||||
red = lipgloss.AdaptiveColor{Light: "#FE5F86", Dark: "#FE5F86"}
|
||||
indigo = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"}
|
||||
green = lipgloss.AdaptiveColor{Light: "#02BA84", Dark: "#02BF87"}
|
||||
)
|
||||
|
||||
type Styles struct {
|
||||
Base,
|
||||
HeaderText,
|
||||
Status,
|
||||
StatusHeader,
|
||||
Highlight,
|
||||
ErrorHeaderText,
|
||||
Help lipgloss.Style
|
||||
}
|
||||
|
||||
func NewStyles(lg *lipgloss.Renderer) *Styles {
|
||||
s := Styles{}
|
||||
s.Base = lg.NewStyle().
|
||||
Padding(1, 2, 0, 1)
|
||||
s.HeaderText = lg.NewStyle().
|
||||
Foreground(indigo).
|
||||
Bold(true).
|
||||
Padding(0, 1, 0, 1)
|
||||
s.Status = lg.NewStyle().
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(indigo).
|
||||
PaddingLeft(1).
|
||||
MarginTop(1)
|
||||
s.StatusHeader = lg.NewStyle().
|
||||
Foreground(green).
|
||||
Bold(true)
|
||||
s.Highlight = lg.NewStyle().
|
||||
Foreground(lipgloss.Color("212"))
|
||||
s.ErrorHeaderText = s.HeaderText.
|
||||
Foreground(red)
|
||||
s.Help = lg.NewStyle().
|
||||
Foreground(lipgloss.Color("240"))
|
||||
return &s
|
||||
}
|
||||
|
||||
type state int
|
||||
|
||||
const (
|
||||
statusNormal state = iota
|
||||
stateDone
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
state state
|
||||
lg *lipgloss.Renderer
|
||||
styles *Styles
|
||||
form *huh.Form
|
||||
width int
|
||||
message *tx.TxBody
|
||||
}
|
||||
|
||||
func NewModel() Model {
|
||||
m := Model{width: maxWidth}
|
||||
m.lg = lipgloss.DefaultRenderer()
|
||||
m.styles = NewStyles(m.lg)
|
||||
|
||||
m.form = huh.NewForm(
|
||||
huh.NewGroup(
|
||||
huh.NewInput().
|
||||
Key("from").
|
||||
Title("From Address").
|
||||
Placeholder("cosmos1...").
|
||||
Validate(func(s string) error {
|
||||
if !strings.HasPrefix(s, "cosmos1") {
|
||||
return fmt.Errorf("invalid address format")
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
|
||||
huh.NewInput().
|
||||
Key("to").
|
||||
Title("To Address").
|
||||
Placeholder("cosmos1...").
|
||||
Validate(func(s string) error {
|
||||
if !strings.HasPrefix(s, "cosmos1") {
|
||||
return fmt.Errorf("invalid address format")
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
|
||||
huh.NewInput().
|
||||
Key("amount").
|
||||
Title("Amount").
|
||||
Placeholder("100").
|
||||
Validate(func(s string) error {
|
||||
if _, err := sdk.ParseCoinNormalized(s + "atom"); err != nil {
|
||||
return fmt.Errorf("invalid coin amount")
|
||||
}
|
||||
return nil
|
||||
}),
|
||||
|
||||
huh.NewSelect[string]().
|
||||
Key("denom").
|
||||
Title("Denom").
|
||||
Options(huh.NewOptions("atom", "osmo", "usnr", "snr")...),
|
||||
|
||||
huh.NewInput().
|
||||
Key("memo").
|
||||
Title("Memo").
|
||||
Placeholder("Optional"),
|
||||
|
||||
huh.NewConfirm().
|
||||
Key("done").
|
||||
Title("Ready to convert?").
|
||||
Validate(func(v bool) error {
|
||||
if !v {
|
||||
return fmt.Errorf("Please confirm when you're ready to convert")
|
||||
}
|
||||
return nil
|
||||
}).
|
||||
Affirmative("Yes, convert!").
|
||||
Negative("Not yet"),
|
||||
),
|
||||
).
|
||||
WithWidth(60).
|
||||
WithShowHelp(false).
|
||||
WithShowErrors(false)
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (m Model) Init() tea.Cmd {
|
||||
return m.form.Init()
|
||||
}
|
||||
|
||||
func min(x, y int) int {
|
||||
if x > y {
|
||||
return y
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case tea.WindowSizeMsg:
|
||||
m.width = min(msg.Width, maxWidth) - m.styles.Base.GetHorizontalFrameSize()
|
||||
case tea.KeyMsg:
|
||||
switch msg.String() {
|
||||
case "esc", "ctrl+c", "q":
|
||||
return m, tea.Quit
|
||||
}
|
||||
}
|
||||
|
||||
var cmds []tea.Cmd
|
||||
|
||||
form, cmd := m.form.Update(msg)
|
||||
if f, ok := form.(*huh.Form); ok {
|
||||
m.form = f
|
||||
cmds = append(cmds, cmd)
|
||||
}
|
||||
|
||||
if m.form.State == huh.StateCompleted {
|
||||
m.buildMessage()
|
||||
cmds = append(cmds, tea.Quit)
|
||||
}
|
||||
|
||||
return m, tea.Batch(cmds...)
|
||||
}
|
||||
|
||||
func (m Model) View() string {
|
||||
s := m.styles
|
||||
|
||||
switch m.form.State {
|
||||
case huh.StateCompleted:
|
||||
pklCode := m.generatePkl()
|
||||
messageView := m.getMessageView()
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "Final Tx:\n\n%s\n\n%s", pklCode, messageView)
|
||||
return s.Status.Margin(0, 1).Padding(1, 2).Width(80).Render(b.String()) + "\n\n"
|
||||
default:
|
||||
var schemaType string
|
||||
if m.form.GetString("schemaType") != "" {
|
||||
schemaType = "Schema Type: " + m.form.GetString("schemaType")
|
||||
}
|
||||
|
||||
v := strings.TrimSuffix(m.form.View(), "\n\n")
|
||||
form := m.lg.NewStyle().Margin(1, 0).Render(v)
|
||||
|
||||
var status string
|
||||
{
|
||||
preview := "(Preview will appear here)"
|
||||
if m.form.GetString("schema") != "" {
|
||||
preview = m.generatePkl()
|
||||
}
|
||||
|
||||
const statusWidth = 40
|
||||
statusMarginLeft := m.width - statusWidth - lipgloss.Width(form) - s.Status.GetMarginRight()
|
||||
status = s.Status.
|
||||
Height(lipgloss.Height(form)).
|
||||
Width(statusWidth).
|
||||
MarginLeft(statusMarginLeft).
|
||||
Render(s.StatusHeader.Render("Pkl Preview") + "\n" +
|
||||
schemaType + "\n\n" +
|
||||
preview)
|
||||
}
|
||||
|
||||
errors := m.form.Errors()
|
||||
header := m.appBoundaryView("Sonr TX Builder")
|
||||
if len(errors) > 0 {
|
||||
header = m.appErrorBoundaryView(m.errorView())
|
||||
}
|
||||
body := lipgloss.JoinHorizontal(lipgloss.Top, form, status)
|
||||
|
||||
footer := m.appBoundaryView(m.form.Help().ShortHelpView(m.form.KeyBinds()))
|
||||
if len(errors) > 0 {
|
||||
footer = m.appErrorBoundaryView("")
|
||||
}
|
||||
|
||||
return s.Base.Render(header + "\n" + body + "\n\n" + footer)
|
||||
}
|
||||
}
|
||||
|
||||
func (m Model) errorView() string {
|
||||
var s string
|
||||
for _, err := range m.form.Errors() {
|
||||
s += err.Error()
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func (m Model) appBoundaryView(text string) string {
|
||||
return lipgloss.PlaceHorizontal(
|
||||
m.width,
|
||||
lipgloss.Left,
|
||||
m.styles.HeaderText.Render(text),
|
||||
lipgloss.WithWhitespaceChars("="),
|
||||
lipgloss.WithWhitespaceForeground(indigo),
|
||||
)
|
||||
}
|
||||
|
||||
func (m Model) appErrorBoundaryView(text string) string {
|
||||
return lipgloss.PlaceHorizontal(
|
||||
m.width,
|
||||
lipgloss.Left,
|
||||
m.styles.ErrorHeaderText.Render(text),
|
||||
lipgloss.WithWhitespaceChars("="),
|
||||
lipgloss.WithWhitespaceForeground(red),
|
||||
)
|
||||
}
|
||||
|
||||
func (m Model) generatePkl() string {
|
||||
schemaType := m.form.GetString("schemaType")
|
||||
schema := m.form.GetString("schema")
|
||||
|
||||
// This is a placeholder for the actual conversion logic
|
||||
// In a real implementation, you would parse the schema and generate Pkl code
|
||||
return fmt.Sprintf("// Converted from %s\n\nclass ConvertedSchema {\n // TODO: Implement conversion from %s\n // Original schema:\n /*\n%s\n */\n}", schemaType, schemaType, schema)
|
||||
}
|
||||
|
||||
func (m *Model) buildMessage() {
|
||||
from := m.form.GetString("from")
|
||||
to := m.form.GetString("to")
|
||||
amount := m.form.GetString("amount")
|
||||
denom := m.form.GetString("denom")
|
||||
memo := m.form.GetString("memo")
|
||||
|
||||
coin, _ := sdk.ParseCoinNormalized(fmt.Sprintf("%s%s", amount, denom))
|
||||
sendMsg := &banktypes.MsgSend{
|
||||
FromAddress: from,
|
||||
ToAddress: to,
|
||||
Amount: sdk.NewCoins(coin),
|
||||
}
|
||||
|
||||
anyMsg, _ := codectypes.NewAnyWithValue(sendMsg)
|
||||
m.message = &tx.TxBody{
|
||||
Messages: []*codectypes.Any{anyMsg},
|
||||
Memo: memo,
|
||||
}
|
||||
}
|
||||
|
||||
func (m Model) getMessageView() string {
|
||||
if m.message == nil {
|
||||
return "Current Message: None"
|
||||
}
|
||||
|
||||
interfaceRegistry := codectypes.NewInterfaceRegistry()
|
||||
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||
jsonBytes, _ := marshaler.MarshalJSON(m.message)
|
||||
|
||||
return fmt.Sprintf("Current Message:\n%s", string(jsonBytes))
|
||||
}
|
||||
|
||||
func RunBuildTxnTUI() (*tx.TxBody, error) {
|
||||
m := NewModel()
|
||||
p := tea.NewProgram(m)
|
||||
|
||||
finalModel, err := p.Run()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to run program: %w", err)
|
||||
}
|
||||
|
||||
finalM, ok := finalModel.(Model)
|
||||
if !ok || finalM.message == nil {
|
||||
return nil, fmt.Errorf("form not completed")
|
||||
}
|
||||
|
||||
return finalM.message, nil
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"time"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/nebula"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
)
|
||||
|
||||
func NewProxyCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "dwn-proxy",
|
||||
Short: "Starts the DWN proxy server for the local IPFS node",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// Echo instance
|
||||
e := echo.New()
|
||||
e.Logger.SetLevel(log.INFO)
|
||||
|
||||
// Configure the server
|
||||
if err := nebula.UseAssets(e); err != nil {
|
||||
e.Logger.Fatal(err)
|
||||
}
|
||||
|
||||
e.GET("/", pages.Home)
|
||||
e.GET("/allocate", pages.Profile)
|
||||
|
||||
// Start server
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
// Start server
|
||||
go func() {
|
||||
if err := e.Start(":1323"); err != nil && err != http.ErrServerClosed {
|
||||
e.Logger.Fatal("shutting down the server")
|
||||
}
|
||||
}()
|
||||
|
||||
// Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds.
|
||||
<-ctx.Done()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
// Shutdown the server with 10 seconds timeout.
|
||||
if err := e.Shutdown(ctx); err != nil {
|
||||
e.Logger.Fatal(err)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
version: v1
|
||||
directories:
|
||||
- proto
|
||||
@@ -1,10 +0,0 @@
|
||||
# Local Interchain Configurations
|
||||
|
||||
RUN:
|
||||
- `make testnet` *(full setup: docker image, binary, keys, and ibc testnet start)*
|
||||
- `spawn local-ic start testnet` *(Standalone start)*
|
||||
|
||||
## Documentation
|
||||
|
||||
* https://github.com/strangelove-ventures/interchaintest/tree/main/local-interchain
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
{
|
||||
"chains": [
|
||||
{
|
||||
"name": "core",
|
||||
"ibc_paths": ["ibc-connection-1"],
|
||||
"chain_id": "chainid-1",
|
||||
"denom": "usnr",
|
||||
"binary": "sonrd",
|
||||
"bech32_prefix": "idx",
|
||||
"docker_image": {
|
||||
"repository": "core",
|
||||
"version": "local"
|
||||
},
|
||||
"gas_prices": "0usnr",
|
||||
"chain_type": "cosmos",
|
||||
"coin_type": 118,
|
||||
"trusting_period": "336h",
|
||||
"gas_adjustment": 1.5,
|
||||
"number_vals": 1,
|
||||
"number_node": 0,
|
||||
"debugging": true,
|
||||
"block_time": "1000ms",
|
||||
"host_port_override": {
|
||||
"26657": "26657",
|
||||
"1317": "1317",
|
||||
"9090": "9090"
|
||||
},
|
||||
"encoding-options": ["wasm", "tokenfactory"],
|
||||
"config_file_overrides": [
|
||||
{
|
||||
"file": "config/config.toml",
|
||||
"paths": {
|
||||
"moniker": "localvalmoniker",
|
||||
"rpc.cors_allowed_origins": ["*"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"genesis": {
|
||||
"modify": [
|
||||
{
|
||||
"key": "app_state.gov.params.voting_period",
|
||||
"value": "15s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.expedited_voting_period",
|
||||
"value": "10s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.max_deposit_period",
|
||||
"value": "15s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.min_deposit.0.denom",
|
||||
"value": "usnr"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.min_deposit.0.amount",
|
||||
"value": "1"
|
||||
}
|
||||
],
|
||||
"accounts": [
|
||||
{
|
||||
"name": "acc0",
|
||||
"address": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
|
||||
"amount": "10000000000usnr",
|
||||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry"
|
||||
},
|
||||
{
|
||||
"name": "acc1",
|
||||
"address": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
|
||||
"amount": "10000000000usnr",
|
||||
"mnemonic": "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise"
|
||||
}
|
||||
],
|
||||
"startup_commands": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gaia",
|
||||
"chain_id": "localcosmos-1",
|
||||
"denom": "uatom",
|
||||
"binary": "gaiad",
|
||||
"bech32_prefix": "cosmos",
|
||||
"docker_image": {
|
||||
"version": "v9.1.0"
|
||||
},
|
||||
"block_time": "1000ms",
|
||||
"gas_prices": "0%DENOM%",
|
||||
"gas_adjustment": 2.0,
|
||||
"ibc_paths": ["ibc-connection-1"],
|
||||
"genesis": {
|
||||
"accounts": [
|
||||
{
|
||||
"name": "acc0",
|
||||
"address": "cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr",
|
||||
"amount": "10000000%DENOM%",
|
||||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
{
|
||||
"chains": [
|
||||
{
|
||||
"name": "core",
|
||||
"chain_id": "chainid-1",
|
||||
"denom": "usnr",
|
||||
"binary": "sonrd",
|
||||
"bech32_prefix": "idx",
|
||||
"docker_image": {
|
||||
"repository": "core",
|
||||
"version": "local"
|
||||
},
|
||||
"gas_prices": "0usnr",
|
||||
"chain_type": "cosmos",
|
||||
"coin_type": 118,
|
||||
"trusting_period": "336h",
|
||||
"gas_adjustment": 1.5,
|
||||
"number_vals": 1,
|
||||
"number_node": 0,
|
||||
"debugging": true,
|
||||
"block_time": "1000ms",
|
||||
"host_port_override": {
|
||||
"26657": "26657",
|
||||
"1317": "1317",
|
||||
"9090": "9090"
|
||||
},
|
||||
"encoding-options": ["wasm", "tokenfactory"],
|
||||
"config_file_overrides": [
|
||||
{
|
||||
"file": "config/config.toml",
|
||||
"paths": {
|
||||
"moniker": "localvalmoniker",
|
||||
"rpc.cors_allowed_origins": ["*"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"genesis": {
|
||||
"modify": [
|
||||
{
|
||||
"key": "app_state.gov.params.voting_period",
|
||||
"value": "15s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.expedited_voting_period",
|
||||
"value": "10s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.max_deposit_period",
|
||||
"value": "15s"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.min_deposit.0.denom",
|
||||
"value": "usnr"
|
||||
},
|
||||
{
|
||||
"key": "app_state.gov.params.min_deposit.0.amount",
|
||||
"value": "1"
|
||||
}
|
||||
],
|
||||
"accounts": [
|
||||
{
|
||||
"name": "acc0",
|
||||
"address": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
|
||||
"amount": "10000000000usnr",
|
||||
"mnemonic": "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry"
|
||||
},
|
||||
{
|
||||
"name": "acc1",
|
||||
"address": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
|
||||
"amount": "10000000000usnr",
|
||||
"mnemonic": "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise"
|
||||
}
|
||||
],
|
||||
"startup_commands": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package commands
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
func NewRootCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "motr",
|
||||
Short: "Manage a local DWN instance for the Sonr blockchain",
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/onsonr/sonr/cmd/hway/server"
|
||||
)
|
||||
|
||||
func NewStartCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "start",
|
||||
Short: "Starts the DWN proxy server for the local IPFS node",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
s := server.New()
|
||||
s.Start()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/cmd/hway/commands"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := commands.NewRootCmd()
|
||||
rootCmd.AddCommand(commands.NewStartCmd())
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
package handlers
|
||||
@@ -1 +0,0 @@
|
||||
package handlers
|
||||
@@ -1 +0,0 @@
|
||||
package handlers
|
||||
@@ -1 +0,0 @@
|
||||
package handlers
|
||||
@@ -1,41 +0,0 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/gommon/log"
|
||||
|
||||
"github.com/onsonr/sonr/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/nebula"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
*echo.Echo
|
||||
}
|
||||
|
||||
func New() *Server {
|
||||
s := &Server{Echo: echo.New()}
|
||||
s.Logger.SetLevel(log.INFO)
|
||||
s.Use(session.UseSession)
|
||||
|
||||
// Configure the server
|
||||
if err := nebula.UseAssets(s.Echo); err != nil {
|
||||
s.Logger.Fatal(err)
|
||||
}
|
||||
|
||||
s.GET("/", pages.Home)
|
||||
s.GET("/login", pages.Login)
|
||||
s.GET("/register", pages.Register)
|
||||
s.GET("/profile", pages.Profile)
|
||||
s.GET("/allocate", pages.Profile)
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Server) Start() {
|
||||
if err := s.Echo.Start(":1323"); err != http.ErrServerClosed {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
//go:build js && wasm
|
||||
// +build js,wasm
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"syscall/js"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
promise "github.com/nlepage/go-js-promise"
|
||||
|
||||
"github.com/onsonr/sonr/cmd/motr/state"
|
||||
"github.com/onsonr/sonr/internal/session"
|
||||
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||
)
|
||||
|
||||
func main() {
|
||||
e := echo.New()
|
||||
e.Use(session.UseSession)
|
||||
registerViews(e)
|
||||
registerState(e)
|
||||
Serve(e)
|
||||
}
|
||||
|
||||
func registerState(e *echo.Echo) {
|
||||
g := e.Group("state")
|
||||
g.POST("/login/:identifier", state.HandleCredentialAssertion)
|
||||
// g.GET("/discovery", state.GetDiscovery)
|
||||
g.GET("/jwks", state.GetJWKS)
|
||||
g.GET("/token", state.GetToken)
|
||||
g.POST("/:origin/grant/:subject", state.GrantAuthorization)
|
||||
g.POST("/register/:subject", state.HandleCredentialCreation)
|
||||
g.POST("/register/:subject/check", state.CheckSubjectIsValid)
|
||||
}
|
||||
|
||||
func registerViews(e *echo.Echo) {
|
||||
e.GET("/home", pages.Home)
|
||||
e.GET("/login", pages.Login)
|
||||
e.GET("/register", pages.Register)
|
||||
e.GET("/profile", pages.Profile)
|
||||
e.GET("/authorize", pages.Authorize)
|
||||
}
|
||||
|
||||
// Serve serves HTTP requests using handler or http.DefaultServeMux if handler is nil.
|
||||
func Serve(handler http.Handler) func() {
|
||||
h := handler
|
||||
if h == nil {
|
||||
h = http.DefaultServeMux
|
||||
}
|
||||
|
||||
prefix := js.Global().Get("wasmhttp").Get("path").String()
|
||||
for strings.HasSuffix(prefix, "/") {
|
||||
prefix = strings.TrimSuffix(prefix, "/")
|
||||
}
|
||||
|
||||
if prefix != "" {
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(prefix+"/", http.StripPrefix(prefix, h))
|
||||
h = mux
|
||||
}
|
||||
|
||||
cb := js.FuncOf(func(_ js.Value, args []js.Value) interface{} {
|
||||
resPromise, resolve, reject := promise.New()
|
||||
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
if err, ok := r.(error); ok {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %+v\n", err))
|
||||
} else {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %v\n", r))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
res := NewResponseRecorder()
|
||||
|
||||
h.ServeHTTP(res, Request(args[0]))
|
||||
|
||||
resolve(res.JSResponse())
|
||||
}()
|
||||
|
||||
return resPromise
|
||||
})
|
||||
|
||||
js.Global().Get("wasmhttp").Call("setHandler", cb)
|
||||
|
||||
return cb.Release
|
||||
}
|
||||
|
||||
// Request builds and returns the equivalent http.Request
|
||||
func Request(r js.Value) *http.Request {
|
||||
jsBody := js.Global().Get("Uint8Array").New(promise.Await(r.Call("arrayBuffer")))
|
||||
body := make([]byte, jsBody.Get("length").Int())
|
||||
js.CopyBytesToGo(body, jsBody)
|
||||
|
||||
req := httptest.NewRequest(
|
||||
r.Get("method").String(),
|
||||
r.Get("url").String(),
|
||||
bytes.NewBuffer(body),
|
||||
)
|
||||
|
||||
headersIt := r.Get("headers").Call("entries")
|
||||
for {
|
||||
e := headersIt.Call("next")
|
||||
if e.Get("done").Bool() {
|
||||
break
|
||||
}
|
||||
v := e.Get("value")
|
||||
req.Header.Set(v.Index(0).String(), v.Index(1).String())
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
|
||||
// ResponseRecorder uses httptest.ResponseRecorder to build a JS Response
|
||||
type ResponseRecorder struct {
|
||||
*httptest.ResponseRecorder
|
||||
}
|
||||
|
||||
// NewResponseRecorder returns a new ResponseRecorder
|
||||
func NewResponseRecorder() ResponseRecorder {
|
||||
return ResponseRecorder{httptest.NewRecorder()}
|
||||
}
|
||||
|
||||
// JSResponse builds and returns the equivalent JS Response
|
||||
func (rr ResponseRecorder) JSResponse() js.Value {
|
||||
res := rr.Result()
|
||||
|
||||
body := js.Undefined()
|
||||
if res.ContentLength != 0 {
|
||||
b, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
body = js.Global().Get("Uint8Array").New(len(b))
|
||||
js.CopyBytesToJS(body, b)
|
||||
}
|
||||
|
||||
init := make(map[string]interface{}, 2)
|
||||
|
||||
if res.StatusCode != 0 {
|
||||
init["status"] = res.StatusCode
|
||||
}
|
||||
|
||||
if len(res.Header) != 0 {
|
||||
headers := make(map[string]interface{}, len(res.Header))
|
||||
for k := range res.Header {
|
||||
headers[k] = res.Header.Get(k)
|
||||
}
|
||||
init["headers"] = headers
|
||||
}
|
||||
|
||||
return js.Global().Get("Response").New(body, init)
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package state
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func CheckSubjectIsValid(e echo.Context) error {
|
||||
credentialID := e.FormValue("credentialID")
|
||||
return e.JSON(200, credentialID)
|
||||
}
|
||||
|
||||
func HandleCredentialAssertion(e echo.Context) error {
|
||||
return e.JSON(200, "HandleCredentialAssertion")
|
||||
}
|
||||
|
||||
func HandleCredentialCreation(e echo.Context) error {
|
||||
// Get the serialized credential data from the form
|
||||
credentialDataJSON := e.FormValue("credentialData")
|
||||
|
||||
// Deserialize the JSON into a temporary struct
|
||||
var ccr protocol.CredentialCreationResponse
|
||||
err := json.Unmarshal([]byte(credentialDataJSON), &ccr)
|
||||
if err != nil {
|
||||
return e.JSON(500, err.Error())
|
||||
}
|
||||
//
|
||||
// // Parse the CredentialCreationResponse
|
||||
// parsedData, err := ccr.Parse()
|
||||
// if err != nil {
|
||||
// return e.JSON(500, err.Error())
|
||||
// }
|
||||
//
|
||||
// // Create the Credential
|
||||
// // credential := orm.NewCredential(parsedData, e.Request().Host, "")
|
||||
//
|
||||
// // Set additional fields
|
||||
// credential.Controller = "" // Set this to the appropriate controller value
|
||||
return e.JSON(200, fmt.Sprintf("REGISTER: %s", string(ccr.ID)))
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
package state
|
||||
@@ -1,23 +0,0 @@
|
||||
package state
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func GrantAuthorization(e echo.Context) error {
|
||||
// Implement authorization endpoint using passkey authentication
|
||||
// Store session data in cache
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetJWKS(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetToken(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
package state
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
|
||||
)
|
||||
|
||||
// TODO: Load this from PKL
|
||||
// initCometBFTConfig helps to override default CometBFT Config values.
|
||||
// return cmtcfg.DefaultConfig if no custom configuration is required for the application.
|
||||
func initCometBFTConfig() *cmtcfg.Config {
|
||||
@@ -46,12 +47,13 @@ func initCometBFTConfig() *cmtcfg.Config {
|
||||
return cfg
|
||||
}
|
||||
|
||||
// TODO: Load this from PKL
|
||||
// initAppConfig helps to override default appConfig template and configs.
|
||||
// return "", nil if no custom configuration is required for the application.
|
||||
func initAppConfig() (string, interface{}) {
|
||||
// The following code snippet is just for reference.
|
||||
|
||||
type CustomAppConfig struct {
|
||||
type SonrAppConfig struct {
|
||||
serverconfig.Config
|
||||
}
|
||||
|
||||
@@ -73,7 +75,7 @@ func initAppConfig() (string, interface{}) {
|
||||
srvCfg.MinGasPrices = "0stake"
|
||||
// srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default
|
||||
|
||||
customAppConfig := CustomAppConfig{
|
||||
customAppConfig := SonrAppConfig{
|
||||
Config: *srvCfg,
|
||||
}
|
||||
|
||||
|
||||
@@ -8,16 +8,10 @@ import (
|
||||
_ "github.com/joho/godotenv/autoload"
|
||||
|
||||
"github.com/onsonr/sonr/app"
|
||||
"github.com/onsonr/sonr/app/cli"
|
||||
"github.com/onsonr/sonr/app/proxy"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := NewRootCmd()
|
||||
rootCmd.AddCommand(cli.NewBuildTxnTUICmd())
|
||||
rootCmd.AddCommand(cli.NewExplorerTUICmd())
|
||||
rootCmd.AddCommand(proxy.NewProxyCmd())
|
||||
|
||||
if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil {
|
||||
log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
package main
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,85 +0,0 @@
|
||||
###
|
||||
# Find OS and Go environment
|
||||
# GO contains the Go binary
|
||||
# FS contains the OS file separator
|
||||
###
|
||||
ifeq ($(OS),Windows_NT)
|
||||
GO := $(shell where go.exe 2> NUL)
|
||||
FS := "\\"
|
||||
else
|
||||
GO := $(shell command -v go 2> /dev/null)
|
||||
FS := "/"
|
||||
endif
|
||||
|
||||
ifeq ($(GO),)
|
||||
$(error could not find go. Is it in PATH? $(GO))
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
### Functions ###
|
||||
###############################################################################
|
||||
|
||||
go_get = $(if $(findstring Windows_NT,$(OS)),\
|
||||
IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS) ( mkdir $(GITHUBDIR)$(FS)$(1) ) else (cd .) &\
|
||||
IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS)$(2)$(FS) ( cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2) ) else (cd .) &\
|
||||
,\
|
||||
mkdir -p $(GITHUBDIR)$(FS)$(1) &&\
|
||||
(test ! -d $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2)) || true &&\
|
||||
)\
|
||||
cd $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && git fetch origin && git checkout -q $(3)
|
||||
|
||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd)
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Tools ###
|
||||
###############################################################################
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BIN ?= $(PREFIX)/bin
|
||||
UNAME_S ?= $(shell uname -s)
|
||||
UNAME_M ?= $(shell uname -m)
|
||||
|
||||
GOPATH ?= $(shell $(GO) env GOPATH)
|
||||
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
|
||||
|
||||
BUF_VERSION ?= 0.11.0
|
||||
|
||||
TOOLS_DESTDIR ?= $(GOPATH)/bin
|
||||
STATIK = $(TOOLS_DESTDIR)/statik
|
||||
RUNSIM = $(TOOLS_DESTDIR)/runsim
|
||||
GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint
|
||||
|
||||
tools: tools-stamp
|
||||
tools-stamp: statik runsim golangci-lint
|
||||
# Create dummy file to satisfy dependency and avoid
|
||||
# rebuilding when this Makefile target is hit twice
|
||||
# in a row.
|
||||
touch $@
|
||||
|
||||
statik: $(STATIK)
|
||||
$(STATIK):
|
||||
@echo "Installing statik..."
|
||||
@(cd /tmp && go install github.com/rakyll/statik@v0.1.6)
|
||||
|
||||
# Install the runsim binary with a temporary workaround of entering an outside
|
||||
# directory as the "go get" command ignores the -mod option and will polute the
|
||||
# go.{mod, sum} files.
|
||||
#
|
||||
# ref: https://github.com/golang/go/issues/30515
|
||||
runsim: $(RUNSIM)
|
||||
$(RUNSIM):
|
||||
@echo "Installing runsim..."
|
||||
@(cd /tmp && go install github.com/cosmos/tools/cmd/runsim@v1.0.0)
|
||||
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
$(GOLANGCI_LINT):
|
||||
@echo "Installing golangci-lint..."
|
||||
@(cd /tmp && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0)
|
||||
|
||||
tools-clean:
|
||||
rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM)
|
||||
rm -f tools-stamp
|
||||
|
||||
.PHONY: tools-clean statik runsim
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user