diff options
164 files changed, 6457 insertions, 257 deletions
diff --git a/.buildbot/build.sh b/.buildbot/build.sh new file mode 100755 index 0000000..2aad486 --- /dev/null +++ b/.buildbot/build.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | make | ||
diff --git a/.buildbot/firefly-x86_64-amdepyc_deploy.sh b/.buildbot/firefly-x86_64-amdepyc_deploy.sh new file mode 100755 index 0000000..a7f8ea5 --- /dev/null +++ b/.buildbot/firefly-x86_64-amdepyc_deploy.sh | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Deploy rest api from buildbot | ||
4 | |||
5 | chmod -R ag+rX _build | ||
6 | rsync --exclude=".*" --exclude="Makefile" --exclude="conf.py" -a --delete ./_build/ handbook@firefly.gnunet.org:~/gana/_build/ | ||
@@ -1 +1,6 @@ | |||
1 | __pycache__ | ||
2 | _build | ||
1 | *~ | 3 | *~ |
4 | *.h | ||
5 | *.tmp | ||
6 | */*.rst | ||
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ca57b10 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,61 @@ | |||
1 | # Minimal makefile for Sphinx documentation | ||
2 | # | ||
3 | |||
4 | REGISTRIES = dot-alt \ | ||
5 | gnu-name-system-default-tlds \ | ||
6 | gnu-name-system-record-flags \ | ||
7 | gnu-name-system-record-types \ | ||
8 | gnu-taler-db-events \ | ||
9 | gnu-taler-error-codes \ | ||
10 | gnu-taler-extensions \ | ||
11 | gnu-taler-kyc-attributes \ | ||
12 | gnunet-dht-block-types \ | ||
13 | gnunet-error-codes \ | ||
14 | gnunet-protocols \ | ||
15 | gnunet-signatures \ | ||
16 | http-status-codes \ | ||
17 | payto-payment-target-types \ | ||
18 | gns-protocol-numbers \ | ||
19 | gns-service-port-numbers | ||
20 | |||
21 | # You can set these variables from the command line, and also | ||
22 | # from the environment for the first two. | ||
23 | SPHINXOPTS ?= | ||
24 | SPHINXBUILD ?= sphinx-build | ||
25 | SOURCEDIR = . | ||
26 | BUILDDIR = _build | ||
27 | |||
28 | |||
29 | all: rsts html | ||
30 | |||
31 | # Put it first so that "make" without argument is like "make help". | ||
32 | help: | ||
33 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
34 | |||
35 | .PHONY: all clean help texinfo info Makefile | ||
36 | |||
37 | rsts: | ||
38 | for dir in $(REGISTRIES); do \ | ||
39 | $(MAKE) -C $$dir; \ | ||
40 | done | ||
41 | |||
42 | html: | ||
43 | @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
44 | |||
45 | texinfo: | ||
46 | @$(SPHINXBUILD) -M texinfo "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
47 | |||
48 | info: | ||
49 | @$(SPHINXBUILD) -M info "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
50 | |||
51 | clean: | ||
52 | rm -rf $(BUILDDIR) | ||
53 | for dir in $(REGISTRIES); do \ | ||
54 | $(MAKE) -C $$dir; \ | ||
55 | done | ||
56 | |||
57 | distclean: clean | ||
58 | |||
59 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
60 | #%: Makefile | ||
61 | # @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
@@ -8,6 +8,21 @@ protocols. If you need to open a new registry, please feel free | |||
8 | to contact us at gana@gnunet.org. | 8 | to contact us at gana@gnunet.org. |
9 | 9 | ||
10 | 10 | ||
11 | Contributors | ||
12 | ============ | ||
13 | |||
14 | If you have Git access to GANA, you are generally authorized to add | ||
15 | new entries to the registries. Most registries are under a simple | ||
16 | first-come first-use policy. If you are unsure about the registration | ||
17 | policy of a particular registry, do ask gana@gnunet.org before making | ||
18 | changes. | ||
19 | |||
20 | Deleting or modifying existing entries (except improving comments) | ||
21 | should be done particularly carefully, so if unsure you might want to | ||
22 | double-check with gana@gnunet.org before changing or deleting | ||
23 | anything. | ||
24 | |||
25 | |||
11 | History | 26 | History |
12 | ======= | 27 | ======= |
13 | 28 | ||
@@ -52,3 +67,4 @@ Each registry must include at least the following files: | |||
52 | Ideally, the registry.rec should be written such that the 'check' target | 67 | Ideally, the registry.rec should be written such that the 'check' target |
53 | is simply invoking "recfix --check registry.rec". | 68 | is simply invoking "recfix --check registry.rec". |
54 | Additional targets to convert data.rec to various formats may be defined. | 69 | Additional targets to convert data.rec to various formats may be defined. |
70 | In particular, see format.sh in this directory (try --help). | ||
diff --git a/_exts/httpdomain/__init__.py b/_exts/httpdomain/__init__.py new file mode 100644 index 0000000..b5a7dc2 --- /dev/null +++ b/_exts/httpdomain/__init__.py | |||
@@ -0,0 +1,14 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | """ | ||
3 | sphinxcontrib | ||
4 | ~~~~~~~~~~~~~ | ||
5 | |||
6 | This package is a namespace package that contains all extensions | ||
7 | distributed in the ``sphinx-contrib`` distribution. | ||
8 | |||
9 | :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS. | ||
10 | :license: BSD, see LICENSE for details. | ||
11 | """ | ||
12 | |||
13 | __import__('pkg_resources').declare_namespace(__name__) | ||
14 | |||
diff --git a/_exts/httpdomain/autohttp/__init__.py b/_exts/httpdomain/autohttp/__init__.py new file mode 100644 index 0000000..95372d4 --- /dev/null +++ b/_exts/httpdomain/autohttp/__init__.py | |||
@@ -0,0 +1,11 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API reference builder | ||
6 | for sphinxcontrib.httpdomain. | ||
7 | |||
8 | :copyright: Copyright 2011 by Hong Minhee | ||
9 | :license: BSD, see LICENSE for details. | ||
10 | |||
11 | """ | ||
diff --git a/_exts/httpdomain/autohttp/bottle.py b/_exts/httpdomain/autohttp/bottle.py new file mode 100644 index 0000000..d8c1859 --- /dev/null +++ b/_exts/httpdomain/autohttp/bottle.py | |||
@@ -0,0 +1,114 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.bottle | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API reference builder (from Bottle) | ||
6 | for sphinxcontrib.httpdomain. | ||
7 | |||
8 | :copyright: Copyright 2012 by Jameel Al-Aziz | ||
9 | :license: BSD, see LICENSE for details. | ||
10 | |||
11 | """ | ||
12 | |||
13 | import re | ||
14 | import six | ||
15 | |||
16 | from docutils import nodes | ||
17 | from docutils.parsers.rst import directives | ||
18 | from docutils.statemachine import ViewList | ||
19 | |||
20 | from sphinx.util import force_decode | ||
21 | from sphinx.util.compat import Directive | ||
22 | from sphinx.util.nodes import nested_parse_with_titles | ||
23 | from sphinx.util.docstrings import prepare_docstring | ||
24 | from sphinx.pycode import ModuleAnalyzer | ||
25 | |||
26 | from sphinxcontrib import httpdomain | ||
27 | from sphinxcontrib.autohttp.common import http_directive, import_object | ||
28 | |||
29 | |||
30 | def translate_bottle_rule(app, rule): | ||
31 | buf = six.StringIO() | ||
32 | if hasattr(app.router, "parse_rule"): | ||
33 | iterator = app.router.parse_rule(rule) # bottle 0.11 | ||
34 | else: | ||
35 | iterator = app.router._itertokens(rule) # bottle 0.12 | ||
36 | for name, filter, conf in iterator: | ||
37 | if filter: | ||
38 | buf.write('(') | ||
39 | buf.write(name) | ||
40 | if (filter != app.router.default_filter and filter != 'default')\ | ||
41 | or conf: | ||
42 | buf.write(':') | ||
43 | buf.write(filter) | ||
44 | if conf: | ||
45 | buf.write(':') | ||
46 | buf.write(conf) | ||
47 | buf.write(')') | ||
48 | else: | ||
49 | buf.write(name) | ||
50 | return buf.getvalue() | ||
51 | |||
52 | |||
53 | def get_routes(app): | ||
54 | for route in app.routes: | ||
55 | path = translate_bottle_rule(app, route.rule) | ||
56 | yield route.method, path, route | ||
57 | |||
58 | |||
59 | class AutobottleDirective(Directive): | ||
60 | |||
61 | has_content = True | ||
62 | required_arguments = 1 | ||
63 | option_spec = {'endpoints': directives.unchanged, | ||
64 | 'undoc-endpoints': directives.unchanged, | ||
65 | 'include-empty-docstring': directives.unchanged} | ||
66 | |||
67 | @property | ||
68 | def endpoints(self): | ||
69 | endpoints = self.options.get('endpoints', None) | ||
70 | if not endpoints: | ||
71 | return None | ||
72 | return frozenset(re.split(r'\s*,\s*', endpoints)) | ||
73 | |||
74 | @property | ||
75 | def undoc_endpoints(self): | ||
76 | undoc_endpoints = self.options.get('undoc-endpoints', None) | ||
77 | if not undoc_endpoints: | ||
78 | return frozenset() | ||
79 | return frozenset(re.split(r'\s*,\s*', undoc_endpoints)) | ||
80 | |||
81 | def make_rst(self): | ||
82 | app = import_object(self.arguments[0]) | ||
83 | for method, path, target in get_routes(app): | ||
84 | endpoint = target.name or target.callback.__name__ | ||
85 | if self.endpoints and endpoint not in self.endpoints: | ||
86 | continue | ||
87 | if endpoint in self.undoc_endpoints: | ||
88 | continue | ||
89 | view = target.callback | ||
90 | docstring = view.__doc__ or '' | ||
91 | if not isinstance(docstring, six.text_type): | ||
92 | analyzer = ModuleAnalyzer.for_module(view.__module__) | ||
93 | docstring = force_decode(docstring, analyzer.encoding) | ||
94 | if not docstring and 'include-empty-docstring' not in self.options: | ||
95 | continue | ||
96 | docstring = prepare_docstring(docstring) | ||
97 | for line in http_directive(method, path, docstring): | ||
98 | yield line | ||
99 | |||
100 | def run(self): | ||
101 | node = nodes.section() | ||
102 | node.document = self.state.document | ||
103 | result = ViewList() | ||
104 | for line in self.make_rst(): | ||
105 | result.append(line, '<autobottle>') | ||
106 | nested_parse_with_titles(self.state, result, node) | ||
107 | return node.children | ||
108 | |||
109 | |||
110 | def setup(app): | ||
111 | if 'http' not in app.domains: | ||
112 | httpdomain.setup(app) | ||
113 | app.add_directive('autobottle', AutobottleDirective) | ||
114 | |||
diff --git a/_exts/httpdomain/autohttp/common.py b/_exts/httpdomain/autohttp/common.py new file mode 100644 index 0000000..199e297 --- /dev/null +++ b/_exts/httpdomain/autohttp/common.py | |||
@@ -0,0 +1,36 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.common | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The common functions for web framework reflection. | ||
6 | |||
7 | :copyright: Copyright 2011 by Hong Minhee | ||
8 | :license: BSD, see LICENSE for details. | ||
9 | |||
10 | """ | ||
11 | import six | ||
12 | from six.moves import builtins | ||
13 | from six.moves import reduce | ||
14 | |||
15 | def import_object(import_name): | ||
16 | module_name, expr = import_name.split(':', 1) | ||
17 | mod = __import__(module_name) | ||
18 | mod = reduce(getattr, module_name.split('.')[1:], mod) | ||
19 | globals = builtins | ||
20 | if not isinstance(globals, dict): | ||
21 | globals = globals.__dict__ | ||
22 | return eval(expr, globals, mod.__dict__) | ||
23 | |||
24 | |||
25 | def http_directive(method, path, content): | ||
26 | method = method.lower().strip() | ||
27 | if isinstance(content, six.string_types): | ||
28 | content = content.splitlines() | ||
29 | yield '' | ||
30 | paths = [path] if isinstance(path, six.string_types) else path | ||
31 | for path in paths: | ||
32 | yield '.. http:{method}:: {path}'.format(**locals()) | ||
33 | yield '' | ||
34 | for line in content: | ||
35 | yield ' ' + line | ||
36 | yield '' | ||
diff --git a/_exts/httpdomain/autohttp/flask.py b/_exts/httpdomain/autohttp/flask.py new file mode 100644 index 0000000..4bd5232 --- /dev/null +++ b/_exts/httpdomain/autohttp/flask.py | |||
@@ -0,0 +1,48 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.flask | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API reference builder (from Flask) | ||
6 | for sphinxcontrib.httpdomain. | ||
7 | |||
8 | :copyright: Copyright 2011 by Hong Minhee | ||
9 | :license: BSD, see LICENSE for details. | ||
10 | |||
11 | """ | ||
12 | from __future__ import absolute_import | ||
13 | |||
14 | import re | ||
15 | import itertools | ||
16 | import six | ||
17 | |||
18 | from docutils import nodes | ||
19 | from docutils.parsers.rst import directives | ||
20 | from docutils.statemachine import ViewList | ||
21 | |||
22 | from sphinx.util import force_decode | ||
23 | from sphinx.util.compat import Directive | ||
24 | from sphinx.util.nodes import nested_parse_with_titles | ||
25 | from sphinx.util.docstrings import prepare_docstring | ||
26 | from sphinx.pycode import ModuleAnalyzer | ||
27 | |||
28 | from sphinxcontrib import httpdomain | ||
29 | from sphinxcontrib.autohttp.common import http_directive, import_object | ||
30 | |||
31 | from .flask_base import AutoflaskBase | ||
32 | |||
33 | class AutoflaskDirective(AutoflaskBase): | ||
34 | |||
35 | def run(self): | ||
36 | node = nodes.section() | ||
37 | node.document = self.state.document | ||
38 | result = ViewList() | ||
39 | for line in self.make_rst(): | ||
40 | result.append(line, '<autoflask>') | ||
41 | nested_parse_with_titles(self.state, result, node) | ||
42 | return node.children | ||
43 | |||
44 | |||
45 | def setup(app): | ||
46 | if 'http' not in app.domains: | ||
47 | httpdomain.setup(app) | ||
48 | app.add_directive('autoflask', AutoflaskDirective) | ||
diff --git a/_exts/httpdomain/autohttp/flask_base.py b/_exts/httpdomain/autohttp/flask_base.py new file mode 100644 index 0000000..50454fe --- /dev/null +++ b/_exts/httpdomain/autohttp/flask_base.py | |||
@@ -0,0 +1,215 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.flask | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API reference builder (from Flask) | ||
6 | for sphinxcontrib.httpdomain. | ||
7 | |||
8 | :copyright: Copyright 2011 by Hong Minhee | ||
9 | :license: BSD, see LICENSE for details. | ||
10 | |||
11 | """ | ||
12 | |||
13 | import re | ||
14 | import itertools | ||
15 | import six | ||
16 | |||
17 | from docutils import nodes | ||
18 | from docutils.parsers.rst import directives | ||
19 | from docutils.statemachine import ViewList | ||
20 | |||
21 | from sphinx.util import force_decode | ||
22 | from sphinx.util.compat import Directive | ||
23 | from sphinx.util.nodes import nested_parse_with_titles | ||
24 | from sphinx.util.docstrings import prepare_docstring | ||
25 | from sphinx.pycode import ModuleAnalyzer | ||
26 | |||
27 | from sphinxcontrib import httpdomain | ||
28 | from sphinxcontrib.autohttp.common import http_directive, import_object | ||
29 | |||
30 | |||
31 | def translate_werkzeug_rule(rule): | ||
32 | from werkzeug.routing import parse_rule | ||
33 | buf = six.StringIO() | ||
34 | for conv, arg, var in parse_rule(rule): | ||
35 | if conv: | ||
36 | buf.write('(') | ||
37 | if conv != 'default': | ||
38 | buf.write(conv) | ||
39 | buf.write(':') | ||
40 | buf.write(var) | ||
41 | buf.write(')') | ||
42 | else: | ||
43 | buf.write(var) | ||
44 | return buf.getvalue() | ||
45 | |||
46 | |||
47 | def get_routes(app, endpoint=None, order=None): | ||
48 | endpoints = [] | ||
49 | for rule in app.url_map.iter_rules(endpoint): | ||
50 | url_with_endpoint = ( | ||
51 | six.text_type(next(app.url_map.iter_rules(rule.endpoint))), | ||
52 | rule.endpoint | ||
53 | ) | ||
54 | if url_with_endpoint not in endpoints: | ||
55 | endpoints.append(url_with_endpoint) | ||
56 | if order == 'path': | ||
57 | endpoints.sort() | ||
58 | endpoints = [e for _, e in endpoints] | ||
59 | for endpoint in endpoints: | ||
60 | methodrules = {} | ||
61 | for rule in app.url_map.iter_rules(endpoint): | ||
62 | methods = rule.methods.difference(['OPTIONS', 'HEAD']) | ||
63 | path = translate_werkzeug_rule(rule.rule) | ||
64 | for method in methods: | ||
65 | if method in methodrules: | ||
66 | methodrules[method].append(path) | ||
67 | else: | ||
68 | methodrules[method] = [path] | ||
69 | for method, paths in methodrules.items(): | ||
70 | yield method, paths, endpoint | ||
71 | |||
72 | |||
73 | def quickref_directive(method, path, content): | ||
74 | rcomp = re.compile("^\s*.. :quickref:\s*(?P<quick>.*)$") | ||
75 | method = method.lower().strip() | ||
76 | if isinstance(content, six.string_types): | ||
77 | content = content.splitlines() | ||
78 | description="" | ||
79 | name="" | ||
80 | ref = path.replace("<","(").replace(">",")").replace("/","-").replace(":","-") | ||
81 | for line in content: | ||
82 | qref = rcomp.match(line) | ||
83 | if qref: | ||
84 | quickref = qref.group("quick") | ||
85 | parts = quickref.split(";",1) | ||
86 | if len(parts)>1: | ||
87 | name = parts[0] | ||
88 | description= parts[1] | ||
89 | else: | ||
90 | description= quickref | ||
91 | break | ||
92 | |||
93 | row ={} | ||
94 | row['name'] = name | ||
95 | row['operation'] = ' - `%s %s <#%s-%s>`_' % (method.upper(), path, method.lower(), ref) | ||
96 | row['description'] = description | ||
97 | |||
98 | return row | ||
99 | |||
100 | class AutoflaskBase(Directive): | ||
101 | |||
102 | has_content = True | ||
103 | required_arguments = 1 | ||
104 | option_spec = {'endpoints': directives.unchanged, | ||
105 | 'blueprints': directives.unchanged, | ||
106 | 'modules': directives.unchanged, | ||
107 | 'order': directives.unchanged, | ||
108 | 'undoc-endpoints': directives.unchanged, | ||
109 | 'undoc-blueprints': directives.unchanged, | ||
110 | 'undoc-modules': directives.unchanged, | ||
111 | 'undoc-static': directives.unchanged, | ||
112 | 'include-empty-docstring': directives.unchanged} | ||
113 | |||
114 | @property | ||
115 | def endpoints(self): | ||
116 | endpoints = self.options.get('endpoints', None) | ||
117 | if not endpoints: | ||
118 | return None | ||
119 | return re.split(r'\s*,\s*', endpoints) | ||
120 | |||
121 | @property | ||
122 | def undoc_endpoints(self): | ||
123 | undoc_endpoints = self.options.get('undoc-endpoints', None) | ||
124 | if not undoc_endpoints: | ||
125 | return frozenset() | ||
126 | return frozenset(re.split(r'\s*,\s*', undoc_endpoints)) | ||
127 | |||
128 | @property | ||
129 | def blueprints(self): | ||
130 | blueprints = self.options.get('blueprints', None) | ||
131 | if not blueprints: | ||
132 | return None | ||
133 | return frozenset(re.split(r'\s*,\s*', blueprints)) | ||
134 | |||
135 | @property | ||
136 | def undoc_blueprints(self): | ||
137 | undoc_blueprints = self.options.get('undoc-blueprints', None) | ||
138 | if not undoc_blueprints: | ||
139 | return frozenset() | ||
140 | return frozenset(re.split(r'\s*,\s*', undoc_blueprints)) | ||
141 | |||
142 | @property | ||
143 | def modules(self): | ||
144 | modules = self.options.get('modules', None) | ||
145 | if not modules: | ||
146 | return frozenset() | ||
147 | return frozenset(re.split(r'\s*,\s*', modules)) | ||
148 | |||
149 | @property | ||
150 | def undoc_modules(self): | ||
151 | undoc_modules = self.options.get('undoc-modules', None) | ||
152 | if not undoc_modules: | ||
153 | return frozenset() | ||
154 | return frozenset(re.split(r'\s*,\s*', undoc_modules)) | ||
155 | |||
156 | @property | ||
157 | def order(self): | ||
158 | order = self.options.get('order', None) | ||
159 | if order not in (None, 'path'): | ||
160 | raise ValueError('Invalid value for :order:') | ||
161 | return order | ||
162 | |||
163 | def make_rst(self, qref=False): | ||
164 | app = import_object(self.arguments[0]) | ||
165 | if self.endpoints: | ||
166 | routes = itertools.chain(*[get_routes(app, endpoint, self.order) | ||
167 | for endpoint in self.endpoints]) | ||
168 | else: | ||
169 | routes = get_routes(app, order=self.order) | ||
170 | for method, paths, endpoint in routes: | ||
171 | try: | ||
172 | blueprint, _, endpoint_internal = endpoint.rpartition('.') | ||
173 | if self.blueprints and blueprint not in self.blueprints: | ||
174 | continue | ||
175 | if blueprint in self.undoc_blueprints: | ||
176 | continue | ||
177 | except ValueError: | ||
178 | pass # endpoint is not within a blueprint | ||
179 | |||
180 | if endpoint in self.undoc_endpoints: | ||
181 | continue | ||
182 | try: | ||
183 | static_url_path = app.static_url_path # Flask 0.7 or higher | ||
184 | except AttributeError: | ||
185 | static_url_path = app.static_path # Flask 0.6 or under | ||
186 | if ('undoc-static' in self.options and endpoint == 'static' and | ||
187 | static_url_path + '/(path:filename)' in paths): | ||
188 | continue | ||
189 | view = app.view_functions[endpoint] | ||
190 | |||
191 | if self.modules and view.__module__ not in self.modules: | ||
192 | continue | ||
193 | |||
194 | if self.undoc_modules and view.__module__ in self.modules: | ||
195 | continue | ||
196 | |||
197 | docstring = view.__doc__ or '' | ||
198 | if hasattr(view, 'view_class'): | ||
199 | meth_func = getattr(view.view_class, method.lower(), None) | ||
200 | if meth_func and meth_func.__doc__: | ||
201 | docstring = meth_func.__doc__ | ||
202 | if not isinstance(docstring, six.text_type): | ||
203 | analyzer = ModuleAnalyzer.for_module(view.__module__) | ||
204 | docstring = force_decode(docstring, analyzer.encoding) | ||
205 | |||
206 | if not docstring and 'include-empty-docstring' not in self.options: | ||
207 | continue | ||
208 | docstring = prepare_docstring(docstring) | ||
209 | if qref == True: | ||
210 | for path in paths: | ||
211 | row = quickref_directive(method, path, docstring) | ||
212 | yield row | ||
213 | else: | ||
214 | for line in http_directive(method, paths, docstring): | ||
215 | yield line | ||
diff --git a/_exts/httpdomain/autohttp/flaskqref.py b/_exts/httpdomain/autohttp/flaskqref.py new file mode 100644 index 0000000..c28bb15 --- /dev/null +++ b/_exts/httpdomain/autohttp/flaskqref.py | |||
@@ -0,0 +1,80 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.flaskqref | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API quick reference | ||
6 | builder (from Flask) | ||
7 | for sphinxcontrib.httpdomain. | ||
8 | |||
9 | :copyright: Copyright 2011 by Hong Minhee | ||
10 | :license: BSD, see LICENSE for details. | ||
11 | |||
12 | """ | ||
13 | |||
14 | from docutils import nodes | ||
15 | from docutils.statemachine import ViewList | ||
16 | |||
17 | from sphinxcontrib import httpdomain | ||
18 | from sphinx.util.nodes import nested_parse_with_titles | ||
19 | |||
20 | from .flask import AutoflaskBase | ||
21 | |||
22 | |||
23 | class QuickReferenceFlaskDirective(AutoflaskBase): | ||
24 | |||
25 | |||
26 | header = [ '', | ||
27 | '.. list-table::', | ||
28 | ' :widths: 20 45 35', | ||
29 | ' :header-rows: 1', | ||
30 | '', | ||
31 | ' * - Resource', | ||
32 | ' - Operation', | ||
33 | ' - Description' | ||
34 | ] | ||
35 | |||
36 | def run(self): | ||
37 | node = nodes.section() | ||
38 | node.document = self.state.document | ||
39 | result = ViewList() | ||
40 | for line in QuickReferenceFlaskDirective.header: | ||
41 | result.append(line, '<qrefflask>') | ||
42 | table={} | ||
43 | table_sorted_names=[] | ||
44 | |||
45 | for table_row in self.make_rst(qref=True): | ||
46 | name = table_row['name'] | ||
47 | if table.get(name) is None: | ||
48 | table[name]=[] | ||
49 | table[name].append(table_row) | ||
50 | if name not in table_sorted_names: | ||
51 | table_sorted_names.append(name) | ||
52 | |||
53 | table_sorted_names.sort() | ||
54 | |||
55 | for name in table_sorted_names: | ||
56 | # Keep table display clean by not repeating duplicate | ||
57 | # resource names and descriptions | ||
58 | display_name = name | ||
59 | previous_description=None | ||
60 | for row in table[name]: | ||
61 | result.append(' * - %s' % display_name, '<qrefflask>') | ||
62 | display_name ="" | ||
63 | result.append(row['operation'], '<qrefflask>') | ||
64 | description = row['description'] | ||
65 | if previous_description is not None and previous_description == description: | ||
66 | description ="" | ||
67 | else: | ||
68 | previous_description = description | ||
69 | |||
70 | result.append(' - %s' % description, '<qrefflask>') | ||
71 | |||
72 | result.append('', '<qrefflask>') | ||
73 | nested_parse_with_titles(self.state, result, node) | ||
74 | return node.children | ||
75 | |||
76 | def setup(app): | ||
77 | if 'http' not in app.domains: | ||
78 | httpdomain.setup(app) | ||
79 | app.add_directive('qrefflask', QuickReferenceFlaskDirective) | ||
80 | |||
diff --git a/_exts/httpdomain/autohttp/tornado.py b/_exts/httpdomain/autohttp/tornado.py new file mode 100644 index 0000000..9a514fe --- /dev/null +++ b/_exts/httpdomain/autohttp/tornado.py | |||
@@ -0,0 +1,128 @@ | |||
1 | """ | ||
2 | sphinxcontrib.autohttp.tornado | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The sphinx.ext.autodoc-style HTTP API reference builder (from Tornado) | ||
6 | for sphinxcontrib.httpdomain. | ||
7 | |||
8 | :copyright: Copyright 2013 by Rodrigo Machado | ||
9 | :license: BSD, see LICENSE for details. | ||
10 | |||
11 | """ | ||
12 | |||
13 | import inspect | ||
14 | import re | ||
15 | import six | ||
16 | |||
17 | from docutils import nodes | ||
18 | from docutils.parsers.rst import directives | ||
19 | from docutils.statemachine import ViewList | ||
20 | |||
21 | from sphinx.util import force_decode | ||
22 | from sphinx.util.compat import Directive | ||
23 | from sphinx.util.nodes import nested_parse_with_titles | ||
24 | from sphinx.util.docstrings import prepare_docstring | ||
25 | from sphinx.pycode import ModuleAnalyzer | ||
26 | |||
27 | from sphinxcontrib import httpdomain | ||
28 | from sphinxcontrib.autohttp.common import http_directive, import_object | ||
29 | |||
30 | |||
31 | def translate_tornado_rule(app, rule): | ||
32 | buf = six.StringIO() | ||
33 | for name, filter, conf in app.router.parse_rule(rule): | ||
34 | if filter: | ||
35 | buf.write('(') | ||
36 | buf.write(name) | ||
37 | if filter != app.router.default_filter or conf: | ||
38 | buf.write(':') | ||
39 | buf.write(filter) | ||
40 | if conf: | ||
41 | buf.write(':') | ||
42 | buf.write(conf) | ||
43 | buf.write(')') | ||
44 | else: | ||
45 | buf.write(name) | ||
46 | return buf.getvalue() | ||
47 | |||
48 | |||
49 | def get_routes(app): | ||
50 | for spec in app.handlers[0][1]: | ||
51 | handler = spec.handler_class | ||
52 | doc_methods = list(handler.SUPPORTED_METHODS) | ||
53 | if 'HEAD' in doc_methods: | ||
54 | doc_methods.remove('HEAD') | ||
55 | if 'OPTIONS' in doc_methods: | ||
56 | doc_methods.remove('OPTIONS') | ||
57 | |||
58 | for method in doc_methods: | ||
59 | maybe_method = getattr(handler, method.lower(), None) | ||
60 | if (inspect.isfunction(maybe_method) or | ||
61 | inspect.ismethod(maybe_method)): | ||
62 | yield method.lower(), spec.regex.pattern, handler | ||
63 | |||
64 | |||
65 | def normalize_path(path): | ||
66 | if path.endswith('$'): | ||
67 | path = path[:-1] | ||
68 | return path | ||
69 | |||
70 | |||
71 | class AutoTornadoDirective(Directive): | ||
72 | |||
73 | has_content = True | ||
74 | required_arguments = 1 | ||
75 | option_spec = {'endpoints': directives.unchanged, | ||
76 | 'undoc-endpoints': directives.unchanged, | ||
77 | 'include-empty-docstring': directives.unchanged} | ||
78 | |||
79 | @property | ||
80 | def endpoints(self): | ||
81 | endpoints = self.options.get('endpoints', None) | ||
82 | if not endpoints: | ||
83 | return None | ||
84 | return frozenset(re.split(r'\s*,\s*', endpoints)) | ||
85 | |||
86 | @property | ||
87 | def undoc_endpoints(self): | ||
88 | undoc_endpoints = self.options.get('undoc-endpoints', None) | ||
89 | if not undoc_endpoints: | ||
90 | return frozenset() | ||
91 | return frozenset(re.split(r'\s*,\s*', undoc_endpoints)) | ||
92 | |||
93 | def make_rst(self): | ||
94 | app = import_object(self.arguments[0]) | ||
95 | for method, path, handler in get_routes(app): | ||
96 | class_name = handler.__name__ | ||
97 | method_name = getattr(handler, method).__name__ | ||
98 | endpoint = '.'.join((class_name, method_name)) | ||
99 | |||
100 | if self.endpoints and endpoint not in self.endpoints: | ||
101 | continue | ||
102 | if endpoint in self.undoc_endpoints: | ||
103 | continue | ||
104 | |||
105 | docstring = getattr(handler, method).__doc__ or '' | ||
106 | #if not isinstance(docstring, unicode): | ||
107 | # analyzer = ModuleAnalyzer.for_module(view.__module__) | ||
108 | # docstring = force_decode(docstring, analyzer.encoding) | ||
109 | if not docstring and 'include-empty-docstring' not in self.options: | ||
110 | continue | ||
111 | docstring = prepare_docstring(docstring) | ||
112 | for line in http_directive(method, normalize_path(path), docstring): | ||
113 | yield line | ||
114 | |||
115 | def run(self): | ||
116 | node = nodes.section() | ||
117 | node.document = self.state.document | ||
118 | result = ViewList() | ||
119 | for line in self.make_rst(): | ||
120 | result.append(line, '<autotornado>') | ||
121 | nested_parse_with_titles(self.state, result, node) | ||
122 | return node.children | ||
123 | |||
124 | |||
125 | def setup(app): | ||
126 | if 'http' not in app.domains: | ||
127 | httpdomain.setup(app) | ||
128 | app.add_directive('autotornado', AutoTornadoDirective) | ||
diff --git a/_exts/httpdomain/httpdomain.py b/_exts/httpdomain/httpdomain.py new file mode 100644 index 0000000..b31142b --- /dev/null +++ b/_exts/httpdomain/httpdomain.py | |||
@@ -0,0 +1,773 @@ | |||
1 | """ | ||
2 | sphinxcontrib.httpdomain | ||
3 | ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
4 | |||
5 | The HTTP domain for documenting RESTful HTTP APIs. | ||
6 | |||
7 | :copyright: Copyright 2011 by Hong Minhee | ||
8 | :license: BSD, see LICENSE for details. | ||
9 | |||
10 | """ | ||
11 | |||
12 | import re | ||
13 | |||
14 | from docutils import nodes | ||
15 | |||
16 | from pygments.lexer import RegexLexer, bygroups | ||
17 | from pygments.lexers import get_lexer_by_name | ||
18 | from pygments.token import Literal, Text, Operator, Keyword, Name, Number | ||
19 | from pygments.util import ClassNotFound | ||
20 | |||
21 | from sphinx import addnodes | ||
22 | from sphinx.roles import XRefRole | ||
23 | from sphinx.domains import Domain, ObjType, Index | ||
24 | from sphinx.directives import ObjectDescription, directives | ||
25 | from sphinx.util.nodes import make_refnode | ||
26 | from sphinx.util.docfields import GroupedField, TypedField | ||
27 | |||
28 | # The env.get_doctree() lookup results in a pickle.load() call which is | ||
29 | # expensive enough to dominate the runtime entirely when the number of endpoints | ||
30 | # and references is large enough. The doctrees are generated during the read- | ||
31 | # phase and we can cache their lookup during the write-phase significantly | ||
32 | # improving performance. | ||
33 | # Currently sphinxcontrib-httpdomain does not declare to support parallel read | ||
34 | # support (parallel_read_safe is the default False) so we can simply use a | ||
35 | # module global to hold the cache. | ||
36 | _doctree_cache = {} | ||
37 | |||
38 | |||
39 | class DocRef(object): | ||
40 | """Represents a reference to an abstract specification.""" | ||
41 | |||
42 | def __init__(self, base_url, anchor, section): | ||
43 | self.base_url = base_url | ||
44 | self.anchor = anchor | ||
45 | self.section = section | ||
46 | |||
47 | def __repr__(self): | ||
48 | """Returns the URL onto related specification section for the related | ||
49 | object.""" | ||
50 | return '{0}#{1}{2}'.format(self.base_url, self.anchor, self.section) | ||
51 | |||
52 | |||
53 | class RFC2616Ref(DocRef): | ||
54 | """Represents a reference to RFC2616. | ||
55 | In 2014, RFC2616 was replaced by multiple RFCs (7230-7237).""" | ||
56 | |||
57 | def __init__(self, section): | ||
58 | url = 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec{0:d}.html' | ||
59 | url = url.format(int(section)) | ||
60 | super(RFC2616Ref, self).__init__(url, 'sec', section) | ||
61 | |||
62 | |||
63 | class IETFRef(DocRef): | ||
64 | """Represents a reference to the specific IETF RFC.""" | ||
65 | |||
66 | def __init__(self, rfc, section): | ||
67 | url = 'https://tools.ietf.org/html/rfc{0:d}'.format(rfc) | ||
68 | super(IETFRef, self).__init__(url, 'section-', section) | ||
69 | |||
70 | |||
71 | class EventSourceRef(DocRef): | ||
72 | |||
73 | def __init__(self, section): | ||
74 | url = 'http://www.w3.org/TR/eventsource/' | ||
75 | super(EventSourceRef, self).__init__(url, section, '') | ||
76 | |||
77 | |||
78 | class CORSRef(DocRef): | ||
79 | """Represents a reference to W3 Cross-Origin Resource Sharing recommendation.""" | ||
80 | |||
81 | def __init__(self, name, type): | ||
82 | url = 'http://www.w3.org/TR/cors/' | ||
83 | super(CORSRef, self).__init__(url, name, '-' + type) | ||
84 | |||
85 | |||
86 | #: Mapping from lowercase HTTP method name to :class:`DocRef` object which | ||
87 | #: maintains the URL which points to the section of the RFC which defines that | ||
88 | #: HTTP method. | ||
89 | METHOD_REFS = { | ||
90 | 'patch': IETFRef(5789, 2), | ||
91 | 'options': IETFRef(7231, '4.3.7'), | ||
92 | 'get': IETFRef(7231, '4.3.1'), | ||
93 | 'head': IETFRef(7231, '4.3.2'), | ||
94 | 'post': IETFRef(7231, '4.3.3'), | ||
95 | 'put': IETFRef(7231, '4.3.4'), | ||
96 | 'delete': IETFRef(7231, '4.3.5'), | ||
97 | 'trace': IETFRef(7231, '4.3.8'), | ||
98 | 'connect': IETFRef(7231, '4.3.6'), | ||
99 | 'copy': IETFRef(2518, 8.8), | ||
100 | 'any': '' | ||
101 | } | ||
102 | |||
103 | |||
104 | #: Mapping from HTTP header name to :class:`DocRef` object which | ||
105 | #: maintains the URL which points to the related section of the RFC. | ||
106 | HEADER_REFS = { | ||
107 | 'Accept': IETFRef(7231, '5.3.2'), | ||
108 | 'Accept-Charset': IETFRef(7231, '5.3.3'), | ||
109 | 'Accept-Encoding': IETFRef(7231, '5.3.4'), | ||
110 | 'Accept-Language': IETFRef(7231, '5.3.5'), | ||
111 | 'Accept-Ranges': IETFRef(7233, 2.3), | ||
112 | 'Age': IETFRef(7234, 5.1), | ||
113 | 'Allow': IETFRef(7231, '7.4.1'), | ||
114 | 'Authorization': IETFRef(7235, 4.2), | ||
115 | 'Cache-Control': IETFRef(7234, 5.2), | ||
116 | 'Connection': IETFRef(7230, 6.1), | ||
117 | 'Content-Encoding': IETFRef(7231, '3.1.2.2'), | ||
118 | 'Content-Language': IETFRef(7231, '3.1.3.2'), | ||
119 | 'Content-Length': IETFRef(7230, '3.3.2'), | ||
120 | 'Content-Location': IETFRef(7231, '3.1.4.2'), | ||
121 | 'Content-MD5': RFC2616Ref(14.15), # removed | ||
122 | 'Content-Range': IETFRef(7233, 4.2), | ||
123 | 'Content-Type': IETFRef(7231, '3.1.1.5'), | ||
124 | 'Cookie': IETFRef(2109, '4.3.4'), # also RFC6265 section 5.4 | ||
125 | 'Date': IETFRef(7231, '7.1.1.2'), | ||
126 | 'Destination': IETFRef(2518, 9.3), | ||
127 | 'ETag': IETFRef(7232, 2.3), | ||
128 | 'Expect': IETFRef(7231, '5.1.1'), | ||
129 | 'Expires': IETFRef(7234, 5.3), | ||
130 | 'From': IETFRef(7231, '5.5.2'), | ||
131 | 'Host': IETFRef(7230, 5.4), | ||
132 | 'If-Match': IETFRef(7232, 3.1), | ||
133 | 'If-Modified-Since': IETFRef(7232, 3.3), | ||
134 | 'If-None-Match': IETFRef(7232, 3.2), | ||
135 | 'If-Range': IETFRef(7233, 3.2), | ||
136 | 'If-Unmodified-Since': IETFRef(7232, 3.4), | ||
137 | 'Last-Event-ID': EventSourceRef('last-event-id'), | ||
138 | 'Last-Modified': IETFRef(7232, 2.2), | ||
139 | 'Link': IETFRef(5988, '5'), | ||
140 | 'Location': IETFRef(7231, '7.1.2'), | ||
141 | 'Max-Forwards': IETFRef(7231, '5.1.2'), | ||
142 | 'Pragma': IETFRef(7234, 5.4), | ||
143 | 'Proxy-Authenticate': IETFRef(7235, 4.3), | ||
144 | 'Proxy-Authorization': IETFRef(7235, 4.4), | ||
145 | 'Range': IETFRef(7233, 3.1), | ||
146 | 'Referer': IETFRef(7231, '5.5.2'), | ||
147 | 'Retry-After': IETFRef(7231, '7.1.3'), | ||
148 | 'Server': IETFRef(7231, '7.4.2'), | ||
149 | 'Set-Cookie': IETFRef(2109, '4.2.2'), | ||
150 | 'TE': IETFRef(7230, 4.3), | ||
151 | 'Trailer': IETFRef(7230, 4.4), | ||
152 | 'Transfer-Encoding': IETFRef(7230, '3.3.1'), | ||
153 | 'Upgrade': IETFRef(7230, 6.7), | ||
154 | 'User-Agent': IETFRef(7231, '5.5.3'), | ||
155 | 'Vary': IETFRef(7231, '7.1.4'), | ||
156 | 'Via': IETFRef(7230, '5.7.1'), | ||
157 | 'Warning': IETFRef(7234, 5.5), | ||
158 | 'WWW-Authenticate': IETFRef(7235, 4.1), | ||
159 | 'Access-Control-Allow-Origin': CORSRef('access-control-allow-origin', | ||
160 | 'response-header'), | ||
161 | 'Access-Control-Allow-Credentials': CORSRef('access-control-allow-credentials', | ||
162 | 'response-header'), | ||
163 | 'Access-Control-Expose-Headers': CORSRef('access-control-expose-headers', | ||
164 | 'response-header'), | ||
165 | 'Access-Control-Max-Age': CORSRef('access-control-max-age', | ||
166 | 'response-header'), | ||
167 | 'Access-Control-Allow-Methods': CORSRef('access-control-allow-methods', | ||
168 | 'response-header'), | ||
169 | 'Access-Control-Allow-Headers': CORSRef('access-control-allow-headers', | ||
170 | 'response-header'), | ||
171 | 'Origin': CORSRef('origin', 'request-header'), | ||
172 | 'Access-Control-Request-Method': CORSRef('access-control-request-method', | ||
173 | 'response-header'), | ||
174 | 'Access-Control-Request-Headers': CORSRef('access-control-request-headers', | ||
175 | 'response-header'), | ||
176 | } | ||
177 | |||
178 | |||
179 | HTTP_STATUS_CODES = { | ||
180 | 100: 'Continue', | ||
181 | 101: 'Switching Protocols', | ||
182 | 102: 'Processing', | ||
183 | 200: 'OK', | ||
184 | 201: 'Created', | ||
185 | 202: 'Accepted', | ||
186 | 203: 'Non Authoritative Information', | ||
187 | 204: 'No Content', | ||
188 | 205: 'Reset Content', | ||
189 | 206: 'Partial Content', | ||
190 | 207: 'Multi Status', | ||
191 | 226: 'IM Used', # see RFC 3229 | ||
192 | 300: 'Multiple Choices', | ||
193 | 301: 'Moved Permanently', | ||
194 | 302: 'Found', | ||
195 | 303: 'See Other', | ||
196 | 304: 'Not Modified', | ||
197 | 305: 'Use Proxy', | ||
198 | 307: 'Temporary Redirect', | ||
199 | 308: 'Permanent Redirect', | ||
200 | 400: 'Bad Request', | ||
201 | 401: 'Unauthorized', | ||
202 | 402: 'Payment Required', # unused | ||
203 | 403: 'Forbidden', | ||
204 | 404: 'Not Found', | ||
205 | 405: 'Method Not Allowed', | ||
206 | 406: 'Not Acceptable', | ||
207 | 407: 'Proxy Authentication Required', | ||
208 | 408: 'Request Timeout', | ||
209 | 409: 'Conflict', | ||
210 | 410: 'Gone', | ||
211 | 411: 'Length Required', | ||
212 | 412: 'Precondition Failed', | ||
213 | 413: 'Request Entity Too Large', | ||
214 | 414: 'Request URI Too Long', | ||
215 | 415: 'Unsupported Media Type', | ||
216 | 416: 'Requested Range Not Satisfiable', | ||
217 | 417: 'Expectation Failed', | ||
218 | 418: "I'm a teapot", # see RFC 2324 | ||
219 | 422: 'Unprocessable Entity', | ||
220 | 423: 'Locked', | ||
221 | 424: 'Failed Dependency', | ||
222 | 425: 'Too Early', # RFC 8470 | ||
223 | 426: 'Upgrade Required', | ||
224 | 429: 'Too Many Requests', | ||
225 | 449: 'Retry With', # proprietary MS extension | ||
226 | 451: 'Unavailable For Legal Reasons', | ||
227 | 500: 'Internal Server Error', | ||
228 | 501: 'Not Implemented', | ||
229 | 502: 'Bad Gateway', | ||
230 | 503: 'Service Unavailable', | ||
231 | 504: 'Gateway Timeout', | ||
232 | 505: 'HTTP Version Not Supported', | ||
233 | 507: 'Insufficient Storage', | ||
234 | 510: 'Not Extended' | ||
235 | } | ||
236 | |||
237 | WEBDAV_STATUS_CODES = [207, 422, 423, 424, 507] | ||
238 | |||
239 | http_sig_param_re = re.compile(r'\((?:(?P<type>[^:)]+):)?(?P<name>[\w_]+)\)', | ||
240 | re.VERBOSE) | ||
241 | |||
242 | |||
243 | def sort_by_method(entries): | ||
244 | def cmp(item): | ||
245 | order = ['HEAD', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH', | ||
246 | 'OPTIONS', 'TRACE', 'CONNECT', 'COPY', 'ANY'] | ||
247 | method = item[0].split(' ', 1)[0] | ||
248 | if method in order: | ||
249 | return order.index(method) | ||
250 | return 100 | ||
251 | return sorted(entries, key=cmp) | ||
252 | |||
253 | |||
254 | def http_resource_anchor(method, path): | ||
255 | path = re.sub(r'[{}]', '', re.sub(r'[<>:/]', '-', path)) | ||
256 | return method.lower() + '-' + path | ||
257 | |||
258 | |||
259 | class HTTPResource(ObjectDescription): | ||
260 | |||
261 | doc_field_types = [ | ||
262 | TypedField('parameter', label='Parameters', | ||
263 | names=('param', 'parameter', 'arg', 'argument'), | ||
264 | typerolename='obj', typenames=('paramtype', 'type')), | ||
265 | TypedField('jsonparameter', label='JSON Parameters', | ||
266 | names=('jsonparameter', 'jsonparam', 'json'), | ||
267 | typerolename='obj', typenames=('jsonparamtype', 'jsontype')), | ||
268 | TypedField('requestjsonobject', label='Request JSON Object', | ||
269 | names=('reqjsonobj', 'reqjson', '<jsonobj', '<json'), | ||
270 | typerolename='obj', typenames=('reqjsonobj', '<jsonobj')), | ||
271 | TypedField('requestjsonarray', label='Request JSON Array of Objects', | ||
272 | names=('reqjsonarr', '<jsonarr'), | ||
273 | typerolename='obj', | ||
274 | typenames=('reqjsonarrtype', '<jsonarrtype')), | ||
275 | TypedField('responsejsonobject', label='Response JSON Object', | ||
276 | names=('resjsonobj', 'resjson', '>jsonobj', '>json'), | ||
277 | typerolename='obj', typenames=('resjsonobj', '>jsonobj')), | ||
278 | TypedField('responsejsonarray', label='Response JSON Array of Objects', | ||
279 | names=('resjsonarr', '>jsonarr'), | ||
280 | typerolename='obj', | ||
281 | typenames=('resjsonarrtype', '>jsonarrtype')), | ||
282 | TypedField('queryparameter', label='Query Parameters', | ||
283 | names=('queryparameter', 'queryparam', 'qparam', 'query'), | ||
284 | typerolename='obj', | ||
285 | typenames=('queryparamtype', 'querytype', 'qtype')), | ||
286 | GroupedField('formparameter', label='Form Parameters', | ||
287 | names=('formparameter', 'formparam', 'fparam', 'form')), | ||
288 | GroupedField('requestheader', label='Request Headers', | ||
289 | rolename='header', | ||
290 | names=('<header', 'reqheader', 'requestheader')), | ||
291 | GroupedField('responseheader', label='Response Headers', | ||
292 | rolename='header', | ||
293 | names=('>header', 'resheader', 'responseheader')), | ||
294 | GroupedField('statuscode', label='Status Codes', | ||
295 | rolename='statuscode', | ||
296 | names=('statuscode', 'status', 'code')) | ||
297 | ] | ||
298 | |||
299 | option_spec = { | ||
300 | 'deprecated': directives.flag, | ||
301 | 'noindex': directives.flag, | ||
302 | 'synopsis': lambda x: x, | ||
303 | } | ||
304 | |||
305 | method = NotImplemented | ||
306 | |||
307 | def handle_signature(self, sig, signode): | ||
308 | method = self.method.upper() + ' ' | ||
309 | signode += addnodes.desc_name(method, method) | ||
310 | offset = 0 | ||
311 | path = None | ||
312 | for match in http_sig_param_re.finditer(sig): | ||
313 | path = sig[offset:match.start()] | ||
314 | signode += addnodes.desc_name(path, path) | ||
315 | params = addnodes.desc_parameterlist() | ||
316 | typ = match.group('type') | ||
317 | if typ: | ||
318 | typ += ': ' | ||
319 | params += addnodes.desc_annotation(typ, typ) | ||
320 | name = match.group('name') | ||
321 | params += addnodes.desc_parameter(name, name) | ||
322 | signode += params | ||
323 | offset = match.end() | ||
324 | if offset < len(sig): | ||
325 | path = sig[offset:len(sig)] | ||
326 | signode += addnodes.desc_name(path, path) | ||
327 | assert path is not None, 'no matches for sig: %s' % sig | ||
328 | fullname = self.method.upper() + ' ' + path | ||
329 | signode['method'] = self.method | ||
330 | signode['path'] = sig | ||
331 | signode['fullname'] = fullname | ||
332 | return (fullname, self.method, sig) | ||
333 | |||
334 | def needs_arglist(self): | ||
335 | return False | ||
336 | |||
337 | def add_target_and_index(self, name_cls, sig, signode): | ||
338 | signode['ids'].append(http_resource_anchor(*name_cls[1:])) | ||
339 | if 'noindex' not in self.options: | ||
340 | self.env.domaindata['http'][self.method][sig] = ( | ||
341 | self.env.docname, | ||
342 | self.options.get('synopsis', ''), | ||
343 | 'deprecated' in self.options) | ||
344 | |||
345 | def get_index_text(self, modname, name): | ||
346 | return '' | ||
347 | |||
348 | |||
349 | class HTTPOptions(HTTPResource): | ||
350 | |||
351 | method = 'options' | ||
352 | |||
353 | |||
354 | class HTTPHead(HTTPResource): | ||
355 | |||
356 | method = 'head' | ||
357 | |||
358 | |||
359 | class HTTPPatch(HTTPResource): | ||
360 | |||
361 | method = 'patch' | ||
362 | |||
363 | |||
364 | class HTTPPost(HTTPResource): | ||
365 | |||
366 | method = 'post' | ||
367 | |||
368 | |||
369 | class HTTPGet(HTTPResource): | ||
370 | |||
371 | method = 'get' | ||
372 | |||
373 | |||
374 | class HTTPPut(HTTPResource): | ||
375 | |||
376 | method = 'put' | ||
377 | |||
378 | |||
379 | class HTTPDelete(HTTPResource): | ||
380 | |||
381 | method = 'delete' | ||
382 | |||
383 | |||
384 | class HTTPTrace(HTTPResource): | ||
385 | |||
386 | method = 'trace' | ||
387 | |||
388 | |||
389 | class HTTPConnect(HTTPResource): | ||
390 | |||
391 | method = 'connect' | ||
392 | |||
393 | |||
394 | class HTTPCopy(HTTPResource): | ||
395 | |||
396 | method = 'copy' | ||
397 | |||
398 | |||
399 | class HTTPAny(HTTPResource): | ||
400 | |||
401 | method = 'any' | ||
402 | |||
403 | |||
404 | class HTTPXRefRole(XRefRole): | ||
405 | |||
406 | def __init__(self, method, **kwargs): | ||
407 | XRefRole.__init__(self, **kwargs) | ||
408 | self.method = method | ||
409 | |||
410 | def process_link(self, env, refnode, has_explicit_title, title, target): | ||
411 | if not has_explicit_title: | ||
412 | title = self.method.upper() + ' ' + title | ||
413 | return title, target | ||
414 | |||
415 | |||
416 | class HTTPXRefMethodRole(XRefRole): | ||
417 | |||
418 | def result_nodes(self, document, env, node, is_ref): | ||
419 | method = node[0][0].lower() | ||
420 | rawsource = node[0].rawsource | ||
421 | config = env.domains['http'].env.config | ||
422 | if method not in METHOD_REFS: | ||
423 | if not config['http_strict_mode']: | ||
424 | return [nodes.emphasis(method, method)], [] | ||
425 | reporter = document.reporter | ||
426 | msg = reporter.error('%s is not valid HTTP method' % method, | ||
427 | line=node.line) | ||
428 | prb = nodes.problematic(method, method) | ||
429 | return [prb], [msg] | ||
430 | url = str(METHOD_REFS[method]) | ||
431 | if not url: | ||
432 | return [nodes.emphasis(method, method)], [] | ||
433 | node = nodes.reference(rawsource, method.upper(), refuri=url) | ||
434 | return [node], [] | ||
435 | |||
436 | |||
437 | class HTTPXRefStatusRole(XRefRole): | ||
438 | |||
439 | def result_nodes(self, document, env, node, is_ref): | ||
440 | def get_code_status(text): | ||
441 | if text.isdigit(): | ||
442 | code = int(text) | ||
443 | return code, HTTP_STATUS_CODES.get(code) | ||
444 | else: | ||
445 | try: | ||
446 | code, status = re.split(r'\s', text.strip(), 1) | ||
447 | code = int(code) | ||
448 | except ValueError: | ||
449 | return None, None | ||
450 | known_status = HTTP_STATUS_CODES.get(code) | ||
451 | if known_status is None: | ||
452 | return code, None | ||
453 | elif known_status.lower() != status.lower(): | ||
454 | return code, None | ||
455 | else: | ||
456 | return code, status | ||
457 | |||
458 | def report_unknown_code(): | ||
459 | if not config['http_strict_mode']: | ||
460 | return [nodes.emphasis(text, text)], [] | ||
461 | reporter = document.reporter | ||
462 | msg = reporter.error('%d is unknown HTTP status code' % code, | ||
463 | line=node.line) | ||
464 | prb = nodes.problematic(text, text) | ||
465 | return [prb], [msg] | ||
466 | |||
467 | def report_invalid_code(): | ||
468 | if not config['http_strict_mode']: | ||
469 | return [nodes.emphasis(text, text)], [] | ||
470 | reporter = document.reporter | ||
471 | msg = reporter.error( | ||
472 | 'HTTP status code must be an integer (e.g. `200`) or ' | ||
473 | 'start with an integer (e.g. `200 OK`); %r is invalid' % | ||
474 | text, | ||
475 | line=node.line | ||
476 | ) | ||
477 | prb = nodes.problematic(text, text) | ||
478 | return [prb], [msg] | ||
479 | |||
480 | text = node[0][0] | ||
481 | rawsource = node[0].rawsource | ||
482 | config = env.domains['http'].env.config | ||
483 | |||
484 | code, status = get_code_status(text) | ||
485 | if code is None: | ||
486 | return report_invalid_code() | ||
487 | elif status is None: | ||
488 | return report_unknown_code() | ||
489 | elif code == 226: | ||
490 | url = 'http://www.ietf.org/rfc/rfc3229.txt' | ||
491 | elif code == 418: | ||
492 | url = 'http://www.ietf.org/rfc/rfc2324.txt' | ||
493 | elif code == 429: | ||
494 | url = 'http://tools.ietf.org/html/rfc6585#section-4' | ||
495 | elif code == 449: | ||
496 | url = 'http://msdn.microsoft.com/en-us/library/dd891478(v=prot.10).aspx' | ||
497 | elif code == 451: | ||
498 | url = 'http://www.ietf.org/rfc/rfc7725.txt' | ||
499 | elif code in WEBDAV_STATUS_CODES: | ||
500 | url = 'http://tools.ietf.org/html/rfc4918#section-11.%d' % (WEBDAV_STATUS_CODES.index(code) + 1) | ||
501 | elif code in HTTP_STATUS_CODES: | ||
502 | url = 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html' \ | ||
503 | '#sec10.' + ('%d.%d' % (code // 100, 1 + code % 100)) | ||
504 | else: | ||
505 | url = '' | ||
506 | node = nodes.reference(rawsource, '%d %s' % (code, status), refuri=url) | ||
507 | return [node], [] | ||
508 | |||
509 | |||
510 | class HTTPXRefHeaderRole(XRefRole): | ||
511 | |||
512 | def result_nodes(self, document, env, node, is_ref): | ||
513 | header = node[0][0] | ||
514 | rawsource = node[0].rawsource | ||
515 | if header not in HEADER_REFS: | ||
516 | _header = '-'.join(map(lambda i: i.title(), header.split('-'))) | ||
517 | if _header not in HEADER_REFS: | ||
518 | return [nodes.emphasis(header, header)], [] | ||
519 | url = str(HEADER_REFS[header]) | ||
520 | node = nodes.reference(rawsource, header, refuri=url) | ||
521 | return [node], [] | ||
522 | |||
523 | |||
524 | class HTTPIndex(Index): | ||
525 | |||
526 | name = 'routingtable' | ||
527 | localname = 'HTTP Routing Table' | ||
528 | shortname = 'routing table' | ||
529 | |||
530 | def __init__(self, *args, **kwargs): | ||
531 | super(HTTPIndex, self).__init__(*args, **kwargs) | ||
532 | |||
533 | self.ignore = [ | ||
534 | [l for l in x.split('/') if l] | ||
535 | for x in self.domain.env.config['http_index_ignore_prefixes']] | ||
536 | self.ignore.sort(reverse=True) | ||
537 | |||
538 | # During HTML generation these values pick from class, | ||
539 | # not from instance so we have a little hack the system | ||
540 | cls = self.__class__ | ||
541 | cls.shortname = self.domain.env.config['http_index_shortname'] | ||
542 | cls.localname = self.domain.env.config['http_index_localname'] | ||
543 | |||
544 | def grouping_prefix(self, path): | ||
545 | letters = [x for x in path.split('/') if x] | ||
546 | for prefix in self.ignore: | ||
547 | if letters[:len(prefix)] == prefix: | ||
548 | return '/' + '/'.join(letters[:len(prefix) + 1]) | ||
549 | return '/%s' % (letters[0] if letters else '',) | ||
550 | |||
551 | def generate(self, docnames=None): | ||
552 | content = {} | ||
553 | items = ((method, path, info) | ||
554 | for method, routes in self.domain.routes.items() | ||
555 | for path, info in routes.items()) | ||
556 | items = sorted(items, key=lambda item: item[1]) | ||
557 | for method, path, info in items: | ||
558 | entries = content.setdefault(self.grouping_prefix(path), []) | ||
559 | entries.append([ | ||
560 | method.upper() + ' ' + path, 0, info[0], | ||
561 | http_resource_anchor(method, path), | ||
562 | '', 'Deprecated' if info[2] else '', info[1] | ||
563 | ]) | ||
564 | items = sorted( | ||
565 | (path, sort_by_method(entries)) | ||
566 | for path, entries in content.items() | ||
567 | ) | ||
568 | return (items, True) | ||
569 | |||
570 | |||
571 | class HTTPDomain(Domain): | ||
572 | """HTTP domain.""" | ||
573 | |||
574 | name = 'http' | ||
575 | label = 'HTTP' | ||
576 | |||
577 | object_types = { | ||
578 | 'options': ObjType('options', 'options', 'obj'), | ||
579 | 'head': ObjType('head', 'head', 'obj'), | ||
580 | 'post': ObjType('post', 'post', 'obj'), | ||
581 | 'get': ObjType('get', 'get', 'obj'), | ||
582 | 'put': ObjType('put', 'put', 'obj'), | ||
583 | 'patch': ObjType('patch', 'patch', 'obj'), | ||
584 | 'delete': ObjType('delete', 'delete', 'obj'), | ||
585 | 'trace': ObjType('trace', 'trace', 'obj'), | ||
586 | 'connect': ObjType('connect', 'connect', 'obj'), | ||
587 | 'copy': ObjType('copy', 'copy', 'obj'), | ||
588 | 'any': ObjType('any', 'any', 'obj') | ||
589 | } | ||
590 | |||
591 | directives = { | ||
592 | 'options': HTTPOptions, | ||
593 | 'head': HTTPHead, | ||
594 | 'post': HTTPPost, | ||
595 | 'get': HTTPGet, | ||
596 | 'put': HTTPPut, | ||
597 | 'patch': HTTPPatch, | ||
598 | 'delete': HTTPDelete, | ||
599 | 'trace': HTTPTrace, | ||
600 | 'connect': HTTPConnect, | ||
601 | 'copy': HTTPCopy, | ||
602 | 'any': HTTPAny | ||
603 | } | ||
604 | |||
605 | roles = { | ||
606 | 'options': HTTPXRefRole('options'), | ||
607 | 'head': HTTPXRefRole('head'), | ||
608 | 'post': HTTPXRefRole('post'), | ||
609 | 'get': HTTPXRefRole('get'), | ||
610 | 'put': HTTPXRefRole('put'), | ||
611 | 'patch': HTTPXRefRole('patch'), | ||
612 | 'delete': HTTPXRefRole('delete'), | ||
613 | 'trace': HTTPXRefRole('trace'), | ||
614 | 'connect': HTTPXRefRole('connect'), | ||
615 | 'copy': HTTPXRefRole('copy'), | ||
616 | 'any': HTTPXRefRole('any'), | ||
617 | 'statuscode': HTTPXRefStatusRole(), | ||
618 | 'method': HTTPXRefMethodRole(), | ||
619 | 'header': HTTPXRefHeaderRole() | ||
620 | } | ||
621 | |||
622 | initial_data = { | ||
623 | 'options': {}, # path: (docname, synopsis) | ||
624 | 'head': {}, | ||
625 | 'post': {}, | ||
626 | 'get': {}, | ||
627 | 'put': {}, | ||
628 | 'patch': {}, | ||
629 | 'delete': {}, | ||
630 | 'trace': {}, | ||
631 | 'connect': {}, | ||
632 | 'copy': {}, | ||
633 | 'any': {} | ||
634 | } | ||
635 | |||
636 | indices = [] | ||
637 | |||
638 | @property | ||
639 | def routes(self): | ||
640 | return dict((key, self.data[key]) for key in self.object_types) | ||
641 | |||
642 | def clear_doc(self, docname): | ||
643 | for typ, routes in self.routes.items(): | ||
644 | for path, info in list(routes.items()): | ||
645 | if info[0] == docname: | ||
646 | del routes[path] | ||
647 | |||
648 | def resolve_xref(self, env, fromdocname, builder, typ, target, | ||
649 | node, contnode): | ||
650 | try: | ||
651 | info = self.data[str(typ)][target] | ||
652 | except KeyError: | ||
653 | text = contnode.rawsource | ||
654 | role = self.roles.get(typ) | ||
655 | if role is None: | ||
656 | return None | ||
657 | |||
658 | if fromdocname not in _doctree_cache: | ||
659 | _doctree_cache[fromdocname] = env.get_doctree(fromdocname) | ||
660 | doctree = _doctree_cache[fromdocname] | ||
661 | |||
662 | resnode = role.result_nodes(doctree, env, node, None)[0][0] | ||
663 | if isinstance(resnode, addnodes.pending_xref): | ||
664 | text = node[0][0] | ||
665 | reporter = doctree.reporter | ||
666 | reporter.warning('Cannot resolve reference to %r' % text, | ||
667 | line=node.line) | ||
668 | return None | ||
669 | return resnode | ||
670 | else: | ||
671 | anchor = http_resource_anchor(typ, target) | ||
672 | title = typ.upper() + ' ' + target | ||
673 | return make_refnode(builder, fromdocname, info[0], anchor, | ||
674 | contnode, title) | ||
675 | |||
676 | def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode): | ||
677 | """Resolve the pending_xref *node* with the given *target*. | ||
678 | |||
679 | The reference comes from an "any" or similar role, which means that Sphinx | ||
680 | don't know the type. | ||
681 | |||
682 | For now sphinxcontrib-httpdomain doesn't resolve any xref nodes. | ||
683 | |||
684 | :return: | ||
685 | list of tuples ``('domain:role', newnode)``, where ``'domain:role'`` | ||
686 | is the name of a role that could have created the same reference, | ||
687 | """ | ||
688 | return [] | ||
689 | |||
690 | def get_objects(self): | ||
691 | for method, routes in self.routes.items(): | ||
692 | for path, info in routes.items(): | ||
693 | anchor = http_resource_anchor(method, path) | ||
694 | yield (path, path, method, info[0], anchor, 1) | ||
695 | |||
696 | |||
697 | class HTTPLexer(RegexLexer): | ||
698 | """Lexer for HTTP sessions.""" | ||
699 | |||
700 | name = 'HTTP' | ||
701 | aliases = ['http'] | ||
702 | |||
703 | flags = re.DOTALL | ||
704 | |||
705 | def header_callback(self, match): | ||
706 | if match.group(1).lower() == 'content-type': | ||
707 | content_type = match.group(5).strip() | ||
708 | if ';' in content_type: | ||
709 | content_type = content_type[:content_type.find(';')].strip() | ||
710 | self.content_type = content_type | ||
711 | yield match.start(1), Name.Attribute, match.group(1) | ||
712 | yield match.start(2), Text, match.group(2) | ||
713 | yield match.start(3), Operator, match.group(3) | ||
714 | yield match.start(4), Text, match.group(4) | ||
715 | yield match.start(5), Literal, match.group(5) | ||
716 | yield match.start(6), Text, match.group(6) | ||
717 | |||
718 | def continuous_header_callback(self, match): | ||
719 | yield match.start(1), Text, match.group(1) | ||
720 | yield match.start(2), Literal, match.group(2) | ||
721 | yield match.start(3), Text, match.group(3) | ||
722 | |||
723 | def content_callback(self, match): | ||
724 | content_type = getattr(self, 'content_type', None) | ||
725 | content = match.group() | ||
726 | offset = match.start() | ||
727 | if content_type: | ||
728 | from pygments.lexers import get_lexer_for_mimetype | ||
729 | try: | ||
730 | lexer = get_lexer_for_mimetype(content_type) | ||
731 | except ClassNotFound: | ||
732 | pass | ||
733 | else: | ||
734 | for idx, token, value in lexer.get_tokens_unprocessed(content): | ||
735 | yield offset + idx, token, value | ||
736 | return | ||
737 | yield offset, Text, content | ||
738 | |||
739 | tokens = { | ||
740 | 'root': [ | ||
741 | (r'(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|COPY)( +)([^ ]+)( +)' | ||
742 | r'(HTTPS?)(/)(1\.[01])(\r?\n|$)', | ||
743 | bygroups(Name.Function, Text, Name.Namespace, Text, | ||
744 | Keyword.Reserved, Operator, Number, Text), | ||
745 | 'headers'), | ||
746 | (r'(HTTPS?)(/)(1\.[01])( +)(\d{3})( +)([^\r\n]+)(\r?\n|$)', | ||
747 | bygroups(Keyword.Reserved, Operator, Number, Text, Number, | ||
748 | Text, Name.Exception, Text), | ||
749 | 'headers'), | ||
750 | ], | ||
751 | 'headers': [ | ||
752 | (r'([^\s:]+)( *)(:)( *)([^\r\n]+)(\r?\n|$)', header_callback), | ||
753 | (r'([\t ]+)([^\r\n]+)(\r?\n|$)', continuous_header_callback), | ||
754 | (r'\r?\n', Text, 'content') | ||
755 | ], | ||
756 | 'content': [ | ||
757 | (r'.+', content_callback) | ||
758 | ] | ||
759 | } | ||
760 | |||
761 | |||
762 | def setup(app): | ||
763 | app.add_domain(HTTPDomain) | ||
764 | |||
765 | try: | ||
766 | get_lexer_by_name('http') | ||
767 | except ClassNotFound: | ||
768 | app.add_lexer('http', HTTPLexer()) | ||
769 | app.add_config_value('http_index_ignore_prefixes', [], None) | ||
770 | app.add_config_value('http_index_shortname', 'routing table', True) | ||
771 | app.add_config_value('http_index_localname', 'HTTP Routing Table', True) | ||
772 | app.add_config_value('http_strict_mode', True, None) | ||
773 | app.add_config_value('http_headers_ignore_prefixes', ['X-'], None) | ||
diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py new file mode 100644 index 0000000..50ffdc0 --- /dev/null +++ b/_exts/typescriptdomain.py | |||
@@ -0,0 +1,587 @@ | |||
1 | """ | ||
2 | TypeScript domain. | ||
3 | |||
4 | :copyright: Copyright 2019 by Taler Systems SA | ||
5 | :license: LGPLv3+ | ||
6 | :author: Florian Dold | ||
7 | """ | ||
8 | |||
9 | import re | ||
10 | |||
11 | from pathlib import Path | ||
12 | |||
13 | from docutils import nodes | ||
14 | from typing import List, Optional, Iterable, Dict, Tuple | ||
15 | from typing import cast | ||
16 | |||
17 | from pygments.lexers import get_lexer_by_name | ||
18 | from pygments.filter import Filter | ||
19 | from pygments.token import Literal, Text, Operator, Keyword, Name, Number | ||
20 | from pygments.token import Comment, Token, _TokenType | ||
21 | from pygments.token import * | ||
22 | from pygments.lexer import RegexLexer, bygroups, include | ||
23 | from pygments.formatters import HtmlFormatter | ||
24 | |||
25 | from docutils import nodes | ||
26 | from docutils.nodes import Element, Node | ||
27 | |||
28 | from sphinx.roles import XRefRole | ||
29 | from sphinx.domains import Domain, ObjType, Index | ||
30 | from sphinx.directives import directives | ||
31 | from sphinx.util.docutils import SphinxDirective | ||
32 | from sphinx.util.nodes import make_refnode | ||
33 | from sphinx.util import logging | ||
34 | from sphinx.highlighting import PygmentsBridge | ||
35 | from sphinx.builders.html import StandaloneHTMLBuilder | ||
36 | from sphinx.pygments_styles import SphinxStyle | ||
37 | |||
38 | logger = logging.getLogger(__name__) | ||
39 | |||
40 | |||
41 | class TypeScriptDefinition(SphinxDirective): | ||
42 | """ | ||
43 | Directive for a code block with special highlighting or line numbering | ||
44 | settings. | ||
45 | """ | ||
46 | |||
47 | has_content = True | ||
48 | required_arguments = 1 | ||
49 | optional_arguments = 0 | ||
50 | final_argument_whitespace = False | ||
51 | option_spec = { | ||
52 | "force": directives.flag, | ||
53 | "linenos": directives.flag, | ||
54 | "dedent": int, | ||
55 | "lineno-start": int, | ||
56 | "emphasize-lines": directives.unchanged_required, | ||
57 | "caption": directives.unchanged_required, | ||
58 | "class": directives.class_option, | ||
59 | } | ||
60 | |||
61 | def run(self) -> List[Node]: | ||
62 | document = self.state.document | ||
63 | code = "\n".join(self.content) | ||
64 | location = self.state_machine.get_source_and_line(self.lineno) | ||
65 | |||
66 | linespec = self.options.get("emphasize-lines") | ||
67 | if linespec: | ||
68 | try: | ||
69 | nlines = len(self.content) | ||
70 | hl_lines = parselinenos(linespec, nlines) | ||
71 | if any(i >= nlines for i in hl_lines): | ||
72 | logger.warning( | ||
73 | __("line number spec is out of range(1-%d): %r") | ||
74 | % (nlines, self.options["emphasize-lines"]), | ||
75 | location=location, | ||
76 | ) | ||
77 | |||
78 | hl_lines = [x + 1 for x in hl_lines if x < nlines] | ||
79 | except ValueError as err: | ||
80 | return [document.reporter.warning(err, line=self.lineno)] | ||
81 | else: | ||
82 | hl_lines = None | ||
83 | |||
84 | if "dedent" in self.options: | ||
85 | location = self.state_machine.get_source_and_line(self.lineno) | ||
86 | lines = code.split("\n") | ||
87 | lines = dedent_lines(lines, self.options["dedent"], location=location) | ||
88 | code = "\n".join(lines) | ||
89 | |||
90 | literal = nodes.literal_block(code, code) # type: Element | ||
91 | if "linenos" in self.options or "lineno-start" in self.options: | ||
92 | literal["linenos"] = True | ||
93 | literal["classes"] += self.options.get("class", []) | ||
94 | literal["force"] = "force" in self.options | ||
95 | literal["language"] = "tsref" | ||
96 | extra_args = literal["highlight_args"] = {} | ||
97 | if hl_lines is not None: | ||
98 | extra_args["hl_lines"] = hl_lines | ||
99 | if "lineno-start" in self.options: | ||
100 | extra_args["linenostart"] = self.options["lineno-start"] | ||
101 | self.set_source_info(literal) | ||
102 | |||
103 | caption = self.options.get("caption") | ||
104 | if caption: | ||
105 | try: | ||
106 | literal = container_wrapper(self, literal, caption) | ||
107 | except ValueError as exc: | ||
108 | return [document.reporter.warning(exc, line=self.lineno)] | ||
109 | |||
110 | tsid = "tsref-type-" + self.arguments[0] | ||
111 | literal["ids"].append(tsid) | ||
112 | |||
113 | tsname = self.arguments[0] | ||
114 | ts = self.env.get_domain("ts") | ||
115 | ts.add_object("type", tsname, self.env.docname, tsid) | ||
116 | |||
117 | return [literal] | ||
118 | |||
119 | |||
120 | class TypeScriptDomain(Domain): | ||
121 | """TypeScript domain.""" | ||
122 | |||
123 | name = "ts" | ||
124 | label = "TypeScript" | ||
125 | |||
126 | directives = { | ||
127 | "def": TypeScriptDefinition, | ||
128 | } | ||
129 | |||
130 | roles = { | ||
131 | "type": XRefRole( | ||
132 | lowercase=False, warn_dangling=True, innernodeclass=nodes.inline | ||
133 | ), | ||
134 | } | ||
135 | |||
136 | dangling_warnings = { | ||
137 | "type": "undefined TypeScript type: %(target)s", | ||
138 | } | ||
139 | |||
140 | def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode): | ||
141 | try: | ||
142 | info = self.objects[(str(typ), str(target))] | ||
143 | except KeyError: | ||
144 | logger.warn("type {}/{} not found".format(typ, target)) | ||
145 | return None | ||
146 | else: | ||
147 | anchor = "tsref-type-{}".format(str(target)) | ||
148 | title = typ.upper() + " " + target | ||
149 | return make_refnode(builder, fromdocname, info[0], anchor, contnode, title) | ||
150 | |||
151 | def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode): | ||
152 | """Resolve the pending_xref *node* with the given *target*. | ||
153 | |||
154 | The reference comes from an "any" or similar role, which means that Sphinx | ||
155 | don't know the type. | ||
156 | |||
157 | For now sphinxcontrib-httpdomain doesn't resolve any xref nodes. | ||
158 | |||
159 | :return: | ||
160 | list of tuples ``('domain:role', newnode)``, where ``'domain:role'`` | ||
161 | is the name of a role that could have created the same reference, | ||
162 | """ | ||
163 | ret = [] | ||
164 | try: | ||
165 | info = self.objects[("type", str(target))] | ||
166 | except KeyError: | ||
167 | pass | ||
168 | else: | ||
169 | anchor = "tsref-type-{}".format(str(target)) | ||
170 | title = "TYPE" + " " + target | ||
171 | node = make_refnode(builder, fromdocname, info[0], anchor, contnode, title) | ||
172 | ret.append(("ts:type", node)) | ||
173 | return ret | ||
174 | |||
175 | @property | ||
176 | def objects(self) -> Dict[Tuple[str, str], Tuple[str, str]]: | ||
177 | return self.data.setdefault( | ||
178 | "objects", {} | ||
179 | ) # (objtype, name) -> docname, labelid | ||
180 | |||
181 | def add_object(self, objtype: str, name: str, docname: str, labelid: str) -> None: | ||
182 | self.objects[objtype, name] = (docname, labelid) | ||
183 | |||
184 | |||
185 | class BetterTypeScriptLexer(RegexLexer): | ||
186 | """ | ||
187 | For `TypeScript <https://www.typescriptlang.org/>`_ source code. | ||
188 | """ | ||
189 | |||
190 | name = "TypeScript" | ||
191 | aliases = ["ts"] | ||
192 | filenames = ["*.ts"] | ||
193 | mimetypes = ["text/x-typescript"] | ||
194 | |||
195 | flags = re.DOTALL | ||
196 | tokens = { | ||
197 | "commentsandwhitespace": [ | ||
198 | (r"\s+", Text), | ||
199 | (r"<!--", Comment), | ||
200 | (r"//.*?\n", Comment.Single), | ||
201 | (r"/\*.*?\*/", Comment.Multiline), | ||
202 | ], | ||
203 | "slashstartsregex": [ | ||
204 | include("commentsandwhitespace"), | ||
205 | ( | ||
206 | r"/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/" r"([gim]+\b|\B)", | ||
207 | String.Regex, | ||
208 | "#pop", | ||
209 | ), | ||
210 | (r"(?=/)", Text, ("#pop", "badregex")), | ||
211 | (r"", Text, "#pop"), | ||
212 | ], | ||
213 | "badregex": [(r"\n", Text, "#pop")], | ||
214 | "typeexp": [ | ||
215 | (r"[a-zA-Z0-9_?.$]+", Keyword.Type), | ||
216 | (r"\s+", Text), | ||
217 | (r"[|]", Text), | ||
218 | (r"\n", Text, "#pop"), | ||
219 | (r";", Text, "#pop"), | ||
220 | (r"", Text, "#pop"), | ||
221 | ], | ||
222 | "root": [ | ||
223 | (r"^(?=\s|/|<!--)", Text, "slashstartsregex"), | ||
224 | include("commentsandwhitespace"), | ||
225 | ( | ||
226 | r"\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|" | ||
227 | r"(<<|>>>?|==?|!=?|[-<>+*%&\|\^/])=?", | ||
228 | Operator, | ||
229 | "slashstartsregex", | ||
230 | ), | ||
231 | (r"[{(\[;,]", Punctuation, "slashstartsregex"), | ||
232 | (r"[})\].]", Punctuation), | ||
233 | ( | ||
234 | r"(for|in|while|do|break|return|continue|switch|case|default|if|else|" | ||
235 | r"throw|try|catch|finally|new|delete|typeof|instanceof|void|" | ||
236 | r"this)\b", | ||
237 | Keyword, | ||
238 | "slashstartsregex", | ||
239 | ), | ||
240 | ( | ||
241 | r"(var|let|const|with|function)\b", | ||
242 | Keyword.Declaration, | ||
243 | "slashstartsregex", | ||
244 | ), | ||
245 | ( | ||
246 | r"(abstract|boolean|byte|char|class|const|debugger|double|enum|export|" | ||
247 | r"extends|final|float|goto|implements|import|int|interface|long|native|" | ||
248 | r"package|private|protected|public|short|static|super|synchronized|throws|" | ||
249 | r"transient|volatile)\b", | ||
250 | Keyword.Reserved, | ||
251 | ), | ||
252 | (r"(true|false|null|NaN|Infinity|undefined)\b", Keyword.Constant), | ||
253 | ( | ||
254 | r"(Array|Boolean|Date|Error|Function|Math|netscape|" | ||
255 | r"Number|Object|Packages|RegExp|String|sun|decodeURI|" | ||
256 | r"decodeURIComponent|encodeURI|encodeURIComponent|" | ||
257 | r"Error|eval|isFinite|isNaN|parseFloat|parseInt|document|this|" | ||
258 | r"window)\b", | ||
259 | Name.Builtin, | ||
260 | ), | ||
261 | # Match stuff like: module name {...} | ||
262 | ( | ||
263 | r"\b(module)(\s*)(\s*[a-zA-Z0-9_?.$][\w?.$]*)(\s*)", | ||
264 | bygroups(Keyword.Reserved, Text, Name.Other, Text), | ||
265 | "slashstartsregex", | ||
266 | ), | ||
267 | # Match variable type keywords | ||
268 | (r"\b(string|bool|number)\b", Keyword.Type), | ||
269 | # Match stuff like: constructor | ||
270 | (r"\b(constructor|declare|interface|as|AS)\b", Keyword.Reserved), | ||
271 | # Match stuff like: super(argument, list) | ||
272 | ( | ||
273 | r"(super)(\s*)\(([a-zA-Z0-9,_?.$\s]+\s*)\)", | ||
274 | bygroups(Keyword.Reserved, Text), | ||
275 | "slashstartsregex", | ||
276 | ), | ||
277 | # Match stuff like: function() {...} | ||
278 | (r"([a-zA-Z_?.$][\w?.$]*)\(\) \{", Name.Other, "slashstartsregex"), | ||
279 | # Match stuff like: (function: return type) | ||
280 | ( | ||
281 | r"([a-zA-Z0-9_?.$][\w?.$]*)(\s*:\s*)", | ||
282 | bygroups(Name.Other, Text), | ||
283 | "typeexp", | ||
284 | ), | ||
285 | # Match stuff like: type Foo = Bar | Baz | ||
286 | ( | ||
287 | r"\b(type)(\s*)([a-zA-Z0-9_?.$]+)(\s*)(=)(\s*)", | ||
288 | bygroups(Keyword.Reserved, Text, Name.Other, Text, Operator, Text), | ||
289 | "typeexp", | ||
290 | ), | ||
291 | (r"[$a-zA-Z_][a-zA-Z0-9_]*", Name.Other), | ||
292 | (r"[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?", Number.Float), | ||
293 | (r"0x[0-9a-fA-F]+", Number.Hex), | ||
294 | (r"[0-9]+", Number.Integer), | ||
295 | (r'"(\\\\|\\"|[^"])*"', String.Double), | ||
296 | (r"'(\\\\|\\'|[^'])*'", String.Single), | ||
297 | ], | ||
298 | } | ||
299 | |||
300 | |||
301 | # Map from token id to props. | ||
302 | # Properties can't be added to tokens | ||
303 | # since they derive from Python's tuple. | ||
304 | token_props = {} | ||
305 | |||
306 | |||
307 | class LinkFilter(Filter): | ||
308 | def __init__(self, app, **options): | ||
309 | self.app = app | ||
310 | Filter.__init__(self, **options) | ||
311 | |||
312 | def _filter_one_literal(self, ttype, value): | ||
313 | last = 0 | ||
314 | for m in re.finditer(literal_reg, value): | ||
315 | pre = value[last : m.start()] | ||
316 | if pre: | ||
317 | yield ttype, pre | ||
318 | t = copy_token(ttype) | ||
319 | tok_setprop(t, "is_literal", True) | ||
320 | yield t, m.group(1) | ||
321 | last = m.end() | ||
322 | post = value[last:] | ||
323 | if post: | ||
324 | yield ttype, post | ||
325 | |||
326 | def filter(self, lexer, stream): | ||
327 | for ttype, value in stream: | ||
328 | if ttype in Token.Keyword.Type: | ||
329 | t = copy_token(ttype) | ||
330 | tok_setprop(t, "xref", value.strip()) | ||
331 | tok_setprop(t, "is_identifier", True) | ||
332 | yield t, value | ||
333 | elif ttype in Token.Comment: | ||
334 | last = 0 | ||
335 | for m in re.finditer(link_reg, value): | ||
336 | pre = value[last : m.start()] | ||
337 | if pre: | ||
338 | yield from self._filter_one_literal(ttype, pre) | ||
339 | t = copy_token(ttype) | ||
340 | x1, x2 = m.groups() | ||
341 | x0 = m.group(0) | ||
342 | if x2 is None: | ||
343 | caption = x1.strip() | ||
344 | xref = x1.strip() | ||
345 | else: | ||
346 | caption = x1.strip() | ||
347 | xref = x2.strip() | ||
348 | tok_setprop(t, "xref", xref) | ||
349 | tok_setprop(t, "caption", caption) | ||
350 | if x0.endswith("_"): | ||
351 | tok_setprop(t, "trailing_underscore", True) | ||
352 | yield t, m.group(1) | ||
353 | last = m.end() | ||
354 | post = value[last:] | ||
355 | if post: | ||
356 | yield from self._filter_one_literal(ttype, post) | ||
357 | else: | ||
358 | yield ttype, value | ||
359 | |||
360 | |||
361 | _escape_html_table = { | ||
362 | ord("&"): u"&", | ||
363 | ord("<"): u"<", | ||
364 | ord(">"): u">", | ||
365 | ord('"'): u""", | ||
366 | ord("'"): u"'", | ||
367 | } | ||
368 | |||
369 | |||
370 | class LinkingHtmlFormatter(HtmlFormatter): | ||
371 | def __init__(self, **kwargs): | ||
372 | super(LinkingHtmlFormatter, self).__init__(**kwargs) | ||
373 | self._builder = kwargs["_builder"] | ||
374 | self._bridge = kwargs["_bridge"] | ||
375 | |||
376 | def _get_value(self, value, tok): | ||
377 | xref = tok_getprop(tok, "xref") | ||
378 | caption = tok_getprop(tok, "caption") | ||
379 | |||
380 | if tok_getprop(tok, "is_literal"): | ||
381 | return '<span style="font-weight: bolder">%s</span>' % (value,) | ||
382 | |||
383 | if tok_getprop(tok, "trailing_underscore"): | ||
384 | logger.warn( | ||
385 | "{}:{}: code block contains xref to '{}' with unsupported trailing underscore".format( | ||
386 | self._bridge.path, self._bridge.line, xref | ||
387 | ) | ||
388 | ) | ||
389 | |||
390 | if tok_getprop(tok, "is_identifier"): | ||
391 | if xref.startswith('"'): | ||
392 | return value | ||
393 | if re.match("^[0-9]+$", xref) is not None: | ||
394 | return value | ||
395 | if xref in ( | ||
396 | "number", | ||
397 | "object", | ||
398 | "string", | ||
399 | "boolean", | ||
400 | "any", | ||
401 | "true", | ||
402 | "false", | ||
403 | "null", | ||
404 | "undefined", | ||
405 | "Array", | ||
406 | "unknown", | ||
407 | ): | ||
408 | return value | ||
409 | |||
410 | if self._bridge.docname is None: | ||
411 | return value | ||
412 | if xref is None: | ||
413 | return value | ||
414 | content = caption if caption is not None else value | ||
415 | ts = self._builder.env.get_domain("ts") | ||
416 | r1 = ts.objects.get(("type", xref), None) | ||
417 | if r1 is not None: | ||
418 | rel_uri = ( | ||
419 | self._builder.get_relative_uri(self._bridge.docname, r1[0]) | ||
420 | + "#" | ||
421 | + r1[1] | ||
422 | ) | ||
423 | return ( | ||
424 | '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>' | ||
425 | % (rel_uri, content) | ||
426 | ) | ||
427 | |||
428 | std = self._builder.env.get_domain("std") | ||
429 | r2 = std.labels.get(xref.lower(), None) | ||
430 | if r2 is not None: | ||
431 | rel_uri = ( | ||
432 | self._builder.get_relative_uri(self._bridge.docname, r2[0]) | ||
433 | + "#" | ||
434 | + r2[1] | ||
435 | ) | ||
436 | return ( | ||
437 | '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>' | ||
438 | % (rel_uri, content) | ||
439 | ) | ||
440 | r3 = std.anonlabels.get(xref.lower(), None) | ||
441 | if r3 is not None: | ||
442 | rel_uri = ( | ||
443 | self._builder.get_relative_uri(self._bridge.docname, r3[0]) | ||
444 | + "#" | ||
445 | + r3[1] | ||
446 | ) | ||
447 | return ( | ||
448 | '<a style="color:inherit;text-decoration:underline" href="%s">%s</a>' | ||
449 | % (rel_uri, content) | ||
450 | ) | ||
451 | |||
452 | logger.warn( | ||
453 | "{}:{}: code block contains unresolved xref '{}'".format( | ||
454 | self._bridge.path, self._bridge.line, xref | ||
455 | ) | ||
456 | ) | ||
457 | |||
458 | return value | ||
459 | |||
460 | def _fmt(self, value, tok): | ||
461 | cls = self._get_css_class(tok) | ||
462 | value = self._get_value(value, tok) | ||
463 | if cls is None or cls == "": | ||
464 | return value | ||
465 | return '<span class="%s">%s</span>' % (cls, value) | ||
466 | |||
467 | def _format_lines(self, tokensource): | ||
468 | """ | ||
469 | Just format the tokens, without any wrapping tags. | ||
470 | Yield individual lines. | ||
471 | """ | ||
472 | lsep = self.lineseparator | ||
473 | escape_table = _escape_html_table | ||
474 | |||
475 | line = "" | ||
476 | for ttype, value in tokensource: | ||
477 | link = get_annotation(ttype, "link") | ||
478 | |||
479 | parts = value.translate(escape_table).split("\n") | ||
480 | |||
481 | if len(parts) == 0: | ||
482 | # empty token, usually should not happen | ||
483 | pass | ||
484 | elif len(parts) == 1: | ||
485 | # no newline before or after token | ||
486 | line += self._fmt(parts[0], ttype) | ||
487 | else: | ||
488 | line += self._fmt(parts[0], ttype) | ||
489 | yield 1, line + lsep | ||
490 | for part in parts[1:-1]: | ||
491 | yield 1, self._fmt(part, ttype) + lsep | ||
492 | line = self._fmt(parts[-1], ttype) | ||
493 | |||
494 | if line: | ||
495 | yield 1, line + lsep | ||
496 | |||
497 | |||
498 | class MyPygmentsBridge(PygmentsBridge): | ||
499 | def __init__(self, builder, trim_doctest_flags): | ||
500 | self.dest = "html" | ||
501 | self.trim_doctest_flags = trim_doctest_flags | ||
502 | self.formatter_args = { | ||
503 | "style": SphinxStyle, | ||
504 | "_builder": builder, | ||
505 | "_bridge": self, | ||
506 | } | ||
507 | self.formatter = LinkingHtmlFormatter | ||
508 | self.builder = builder | ||
509 | self.path = None | ||
510 | self.line = None | ||
511 | self.docname = None | ||
512 | |||
513 | def highlight_block( | ||
514 | self, source, lang, opts=None, force=False, location=None, **kwargs | ||
515 | ): | ||
516 | if isinstance(location, tuple): | ||
517 | docname, line = location | ||
518 | self.line = line | ||
519 | self.path = self.builder.env.doc2path(docname) | ||
520 | self.docname = docname | ||
521 | elif isinstance(location, Element): | ||
522 | self.line = location.line | ||
523 | self.path = location.source | ||
524 | self.docname = self.builder.env.path2doc(self.path) | ||
525 | return super().highlight_block(source, lang, opts, force, location, **kwargs) | ||
526 | |||
527 | |||
528 | class MyHtmlBuilder(StandaloneHTMLBuilder): | ||
529 | name = "html-linked" | ||
530 | |||
531 | def init_highlighter(self): | ||
532 | if self.config.pygments_style is not None: | ||
533 | style = self.config.pygments_style | ||
534 | elif self.theme: | ||
535 | style = self.theme.get_confstr("theme", "pygments_style", "none") | ||
536 | else: | ||
537 | style = "sphinx" | ||
538 | self.highlighter = MyPygmentsBridge(self, self.config.trim_doctest_flags) | ||
539 | self.dark_highlighter = None | ||
540 | |||
541 | |||
542 | def get_annotation(tok, key): | ||
543 | if not hasattr(tok, "kv"): | ||
544 | return None | ||
545 | return tok.kv.get(key) | ||
546 | |||
547 | |||
548 | def copy_token(tok): | ||
549 | new_tok = _TokenType(tok) | ||
550 | # This part is very fragile against API changes ... | ||
551 | new_tok.subtypes = set(tok.subtypes) | ||
552 | new_tok.parent = tok.parent | ||
553 | return new_tok | ||
554 | |||
555 | |||
556 | def tok_setprop(tok, key, value): | ||
557 | tokid = id(tok) | ||
558 | e = token_props.get(tokid) | ||
559 | if e is None: | ||
560 | e = token_props[tokid] = (tok, {}) | ||
561 | _, kv = e | ||
562 | kv[key] = value | ||
563 | |||
564 | |||
565 | def tok_getprop(tok, key): | ||
566 | tokid = id(tok) | ||
567 | e = token_props.get(tokid) | ||
568 | if e is None: | ||
569 | return None | ||
570 | _, kv = e | ||
571 | return kv.get(key) | ||
572 | |||
573 | |||
574 | link_reg = re.compile(r"(?<!`)`([^`<]+)\s*(?:<([^>]+)>)?\s*`_?") | ||
575 | literal_reg = re.compile(r"``([^`]+)``") | ||
576 | |||
577 | |||
578 | def setup(app): | ||
579 | |||
580 | class TsrefLexer(BetterTypeScriptLexer): | ||
581 | def __init__(self, **options): | ||
582 | super().__init__(**options) | ||
583 | self.add_filter(LinkFilter(app)) | ||
584 | |||
585 | app.add_lexer("tsref", TsrefLexer) | ||
586 | app.add_domain(TypeScriptDomain) | ||
587 | app.add_builder(MyHtmlBuilder) | ||
diff --git a/_static/css/custom.css b/_static/css/custom.css new file mode 100644 index 0000000..05db767 --- /dev/null +++ b/_static/css/custom.css | |||
@@ -0,0 +1,3 @@ | |||
1 | div.wy-side-nav-search { | ||
2 | background: transparent !important; | ||
3 | } | ||
diff --git a/about.rst b/about.rst new file mode 100644 index 0000000..5f581a8 --- /dev/null +++ b/about.rst | |||
@@ -0,0 +1,52 @@ | |||
1 | About GANA | ||
2 | ========== | ||
3 | |||
4 | The GNUnet Assigned Numbers Authority (GANA) contains various registries | ||
5 | we maintain, for GNUnet other projects that need names and numbers for | ||
6 | use in network protocols. If you need to open a new registry, please | ||
7 | feel free to contact us at gana@gnunet.org. | ||
8 | |||
9 | The registry sources can be found here: https://git.gnunet.org/gana.git | ||
10 | |||
11 | History | ||
12 | ------- | ||
13 | |||
14 | Barry Leiba `wrote on April 4th 2020 <https://datatracker.ietf.org/doc/conflict-review-dold-payto/ballot/>`_ that “Neither IANA nor participants | ||
15 | in the IETF will have any necessary expertise to evaluate registration | ||
16 | requests in the sort of registry described, and no one will be well | ||
17 | served by the creation of such a registry at IANA. It would be far | ||
18 | better to have a registration process be described in this document | ||
19 | involving experts from the industry as reviewers and maintenance of the | ||
20 | registrations by an industry organization, rather than by IANA.” | ||
21 | |||
22 | So here we are. As IETF/IANA “lack the necessary expertise to operate a | ||
23 | registry” for names and numbers used in network protocols, the GNUnet | ||
24 | project is happy to step up. | ||
25 | |||
26 | License | ||
27 | ------- | ||
28 | |||
29 | The GANA database is licensed under the GPL. See ``COPYING`` in the Git | ||
30 | repository. | ||
31 | |||
32 | Design | ||
33 | ------ | ||
34 | |||
35 | Each registry must have a unique name and all associated information | ||
36 | lives in a directory under that unique name in the Git repository. | ||
37 | |||
38 | Each registry must include at least the following files: | ||
39 | |||
40 | - ``README[.*]``: document describing the purpose of the registry in | ||
41 | English | ||
42 | - ``POLICY[.*]``: registration policy, explaining required fields and | ||
43 | the procedure for adding, updating and deleting entries | ||
44 | - ``registry.rec``: GNU recutils data file with all of the current | ||
45 | entries in the registry | ||
46 | - ``Makefile``: GNU make makefile with a ``make check`` target to run | ||
47 | the validation logic. Ideally, the registry.rec should be written | ||
48 | such that the ``check`` target is simply invoking | ||
49 | ``recfix --check registry.rec``. Additional targets to convert | ||
50 | ``data.rec`` to various formats may be defined. In particular, see | ||
51 | ``format.sh`` in the root directory of the Git repository (try | ||
52 | ``--help``). | ||
@@ -0,0 +1,120 @@ | |||
1 | # Configuration file for the Sphinx documentation builder. | ||
2 | # | ||
3 | # This file only contains a selection of the most common options. For a full | ||
4 | # list see the documentation: | ||
5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
6 | |||
7 | # -- Path setup -------------------------------------------------------------- | ||
8 | |||
9 | # If extensions (or modules to document with autodoc) are in another directory, | ||
10 | # add these directories to sys.path here. If the directory is relative to the | ||
11 | # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
12 | # | ||
13 | # import os | ||
14 | # import sys | ||
15 | # sys.path.insert(0, os.path.abspath('.')) | ||
16 | |||
17 | |||
18 | # -- Project information ----------------------------------------------------- | ||
19 | import sys | ||
20 | import os | ||
21 | |||
22 | project = 'GANA' | ||
23 | copyright = '2024, GNUnet Project' | ||
24 | author = 'GNUnet Project' | ||
25 | |||
26 | sys.path.append(os.path.abspath("_exts")) | ||
27 | |||
28 | # -- General configuration --------------------------------------------------- | ||
29 | |||
30 | # Add any Sphinx extension module names here, as strings. They can be | ||
31 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
32 | # ones. | ||
33 | extensions = [ | ||
34 | 'httpdomain.httpdomain', | ||
35 | 'typescriptdomain', | ||
36 | 'sphinx.ext.todo', | ||
37 | #'sphinx_book_theme', | ||
38 | #'breathe' | ||
39 | ] | ||
40 | |||
41 | #breathe_projects = { | ||
42 | # "gnunet": "../gnunet/doc/doxygen/xml/", | ||
43 | #} | ||
44 | |||
45 | #breathe_default_project = "gnunet" | ||
46 | |||
47 | # Add any paths that contain templates here, relative to this directory. | ||
48 | templates_path = ['_templates'] | ||
49 | |||
50 | # List of patterns, relative to source directory, that match files and | ||
51 | # directories to ignore when looking for source files. | ||
52 | # This pattern also affects html_static_path and html_extra_path. | ||
53 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
54 | |||
55 | |||
56 | # -- Options for HTML output ------------------------------------------------- | ||
57 | |||
58 | # The theme to use for HTML and HTML Help pages. See the documentation for | ||
59 | # a list of builtin themes. | ||
60 | # | ||
61 | html_theme = 'sphinx_rtd_theme' | ||
62 | |||
63 | html_sidebars = { | ||
64 | #"**": ["navbar-logo.html", "sbt-sidebar-nav.html", "search-field.html"] | ||
65 | "**": ["search-field.html", "sbt-sidebar-nav.html"] | ||
66 | } | ||
67 | |||
68 | html_theme_options = { | ||
69 | #'logo_only': True, | ||
70 | #'display_version': False, | ||
71 | #'prev_next_buttons_location': 'bottom', | ||
72 | #'style_external_links': False, | ||
73 | #'vcs_pageview_mode': '', | ||
74 | #'style_nav_header_background': 'transparent', # Possibly problematic with our CSP | ||
75 | # Toc options | ||
76 | #'collapse_navigation': True, | ||
77 | #'sticky_navigation': True, | ||
78 | #'navigation_depth': 4, | ||
79 | #'includehidden': True, | ||
80 | #'titles_only': False | ||
81 | #"navbar_start": ["navbar-logo"], | ||
82 | #"header_links_before_dropdown": 8, | ||
83 | #"article_header_start": ["breadcrumbs.html"], | ||
84 | #"navbar_center": ["navbar-nav"], | ||
85 | #"navbar_end": [], | ||
86 | #"navbar_persistent": [], | ||
87 | } | ||
88 | |||
89 | # Add any paths that contain custom static files (such as style sheets) here, | ||
90 | # relative to this directory. They are copied after the builtin static files, | ||
91 | # so a file named "default.css" will overwrite the builtin "default.css". | ||
92 | html_static_path = ['_static'] | ||
93 | |||
94 | # These paths are either relative to html_static_path | ||
95 | # or fully qualified paths (eg. https://...) | ||
96 | #html_css_files = [ | ||
97 | # 'css/custom.css', | ||
98 | #] | ||
99 | |||
100 | html_logo = "images/gnunet-blue.png" | ||
101 | |||
102 | # Display to-do items in docs | ||
103 | todo_include_todos = True | ||
104 | |||
105 | primary_domain = "c" | ||
106 | |||
107 | highlight_language = "c" | ||
108 | |||
109 | rst_prolog = f""" | ||
110 | .. role:: c(code) | ||
111 | :language: c | ||
112 | |||
113 | .. role:: bolditalic | ||
114 | :class: bolditalic | ||
115 | """ | ||
116 | |||
117 | rst_epilog = """ | ||
118 | """ | ||
119 | |||
120 | |||
diff --git a/dot-alt/Makefile b/dot-alt/Makefile new file mode 100644 index 0000000..cff05b7 --- /dev/null +++ b/dot-alt/Makefile | |||
@@ -0,0 +1,22 @@ | |||
1 | FILES=dot_alt.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | |||
9 | rm -f *.tmp | ||
10 | clean: | ||
11 | rm -f $(FILES) *.tmp | ||
12 | |||
13 | dot_alt.rst.tmp: registry.rec rst.template | ||
14 | ../format.sh rst.template < registry.rec > $@ | ||
15 | |||
16 | rst.header.tmp: | ||
17 | cat README POLICY rst.header.template > $@ | ||
18 | |||
19 | dot_alt.rst: rst.header.tmp dot_alt.rst.tmp | ||
20 | cat rst.header.tmp dot_alt.rst.tmp > $@ | ||
21 | |||
22 | .PHONY: check | ||
diff --git a/dot-alt/POLICY b/dot-alt/POLICY new file mode 100644 index 0000000..f586333 --- /dev/null +++ b/dot-alt/POLICY | |||
@@ -0,0 +1,13 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | The "Label" must be unique in the entire registry. The value must be a | ||
5 | case insensitive `LDH label <https://www.rfc-editor.org/rfc/rfc5890#section-2.3.1>`__ | ||
6 | following the restrictions on DNS names. | ||
7 | |||
8 | Adding records can be done on a first-come first-served basis after GANA | ||
9 | committer review. | ||
10 | |||
11 | The current contact(s) for review are reachable at | ||
12 | alt-registry@gnunet.org. | ||
13 | |||
diff --git a/dot-alt/README b/dot-alt/README new file mode 100644 index 0000000..828eca6 --- /dev/null +++ b/dot-alt/README | |||
@@ -0,0 +1,8 @@ | |||
1 | .alt Subdomains | ||
2 | --------------- | ||
3 | |||
4 | This registry is for the `.alt Top-Level-Domains (TLDs) of the Domain Name System (RFC 9476) <https://www.rfc-editor.org/rfc/rfc9476.html>`__. | ||
5 | |||
6 | This registry is used to ensure that names of alternative name systems | ||
7 | do not conflict with DNS names or with each other. | ||
8 | |||
diff --git a/dot-alt/registry.rec b/dot-alt/registry.rec new file mode 100644 index 0000000..715f491 --- /dev/null +++ b/dot-alt/registry.rec | |||
@@ -0,0 +1,36 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for ".ALT" Top-Level-Domain | ||
4 | # | ||
5 | |||
6 | %rec: AltTld | ||
7 | %key: Label | ||
8 | %typedef: Label_t regexp /^[abcdefghijklmnopqrstuvwxyz0123456789][abcdefghijklmnopqrstuvwxyz0123456789-]*$/ | ||
9 | %type: Label Label_t | ||
10 | %unique: Label | ||
11 | %mandatory: Label | ||
12 | %mandatory: Description | ||
13 | %allowed: Contact | ||
14 | %allowed: References | ||
15 | %allowed: UnicodeLabel | ||
16 | %sort: Name Contact References | ||
17 | |||
18 | Label: gns | ||
19 | UnicodeLabel: gns | ||
20 | Contact: Martin Schanzenbach <schanzen@gnunet.org> | ||
21 | References: RFC 9498 | ||
22 | Description: The .alt subdomain for GNS | ||
23 | |||
24 | Label: i2p | ||
25 | UnicodeLabel: i2p | ||
26 | Contact: zzz <zzz AT i2pmail DOT org> | ||
27 | References: https://geti2p.net/en/docs/naming | ||
28 | Description: I2P is a P2P network implementing its own name resolution mechanism | ||
29 | |||
30 | # Unreserved unicode example | ||
31 | Label: xn--fsq | ||
32 | UnicodeLabel: 例 | ||
33 | Contact: Martin Schanzenbach <schanzen@gnunet.org> | ||
34 | References: None | ||
35 | Description: Unreserved unicode example | ||
36 | |||
diff --git a/dot-alt/rst.header.template b/dot-alt/rst.header.template new file mode 100644 index 0000000..b37550e --- /dev/null +++ b/dot-alt/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: .alt Subdomains | ||
5 | :widths: 10 20 10 60 | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Label | ||
9 | - Contact | ||
10 | - References | ||
11 | - Description | ||
diff --git a/dot-alt/rst.template b/dot-alt/rst.template new file mode 100644 index 0000000..9c0fdbc --- /dev/null +++ b/dot-alt/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Label}} | ||
2 | - {{Contact}} | ||
3 | - {{References}} | ||
4 | - {{Description}} | ||
@@ -1,2 +1,52 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | exec recfmt "`cat $1`" | 2 | ## |
3 | # Usage: format.sh TEMPLATE [SELEXP] | ||
4 | # | ||
5 | # This runs recfmt w/ template file TEMPLATE, taking input from stdin, | ||
6 | # and writing output to stdout. | ||
7 | # | ||
8 | # Optional arg SELEXP is an expression passed to ‘recsel -e’. If specified, | ||
9 | # stdin is first processed by recsel and its output is then piped to recfmt | ||
10 | # for formatting. If recsel exits failurefully (e.g., given invalid SELEXP), | ||
11 | # no output is written and format.sh exits failurefully as well. | ||
12 | ## | ||
13 | me=$(basename $0) | ||
14 | |||
15 | version='1.4' | ||
16 | # 1.4 -- create $TMPDIR if it does not exist | ||
17 | # 1.3 -- add support for optional arg SELEXP | ||
18 | # 1.2 -- add check for required arg TEMPLATE | ||
19 | # 1.1 -- add --help/--version support | ||
20 | # 1.0 -- initial release | ||
21 | |||
22 | if [ x"$1" = x--help ] ; then | ||
23 | sed '/^##/,/^##/!d;/^##/d;s/^# //g;s/^#$//g' $0 | ||
24 | exit 0 | ||
25 | fi | ||
26 | |||
27 | if [ x"$1" = x--version ] ; then | ||
28 | echo $me '(gana)' $version | ||
29 | exit 0 | ||
30 | fi | ||
31 | |||
32 | if [ x"$1" = x ] ; then | ||
33 | echo >&2 "$me: ERROR: missing arg TEMPLATE (try --help)" | ||
34 | exit 1 | ||
35 | fi | ||
36 | |||
37 | template="$1" | ||
38 | |||
39 | if [ x"$2" = x ] ; then : ; else | ||
40 | selexp="$2" | ||
41 | fi | ||
42 | |||
43 | if [ "$selexp" ] ; then | ||
44 | t=$(mktemp) | ||
45 | trap "rm -f $t" EXIT | ||
46 | recsel -e "$selexp" > $t && | ||
47 | recfmt -f "$template" < $t | ||
48 | else | ||
49 | exec recfmt -f "$template" | ||
50 | fi | ||
51 | |||
52 | # format.sh ends here | ||
diff --git a/gns-protocol-numbers/.gitignore b/gns-protocol-numbers/.gitignore new file mode 100644 index 0000000..0a437d0 --- /dev/null +++ b/gns-protocol-numbers/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnu-name-system-record-types.h | |||
diff --git a/gns-protocol-numbers/Makefile b/gns-protocol-numbers/Makefile new file mode 100644 index 0000000..a491d11 --- /dev/null +++ b/gns-protocol-numbers/Makefile | |||
@@ -0,0 +1,28 @@ | |||
1 | FILES=gnu_name_system_protocols.h gnu_name_system_protocols.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | rm -f *.tmp | ||
9 | clean: | ||
10 | rm -f $(FILES) *.tmp | ||
11 | |||
12 | gnu_name_system_protocols.h.tmp: registry.rec h.template | ||
13 | ../format.sh h.template < registry.rec > $@ | ||
14 | |||
15 | gnu_name_system_protocols.h: h.header gnu_name_system_protocols.h.tmp h.footer | ||
16 | cat h.header gnu_name_system_protocols.h.tmp h.footer > $@ | ||
17 | |||
18 | gnu_name_system_protocols.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat README POLICY rst.header.template > $@ | ||
23 | |||
24 | gnu_name_system_protocols.rst: rst.header.tmp gnu_name_system_protocols.rst.tmp rst.footer | ||
25 | cat rst.header.tmp gnu_name_system_protocols.rst.tmp rst.footer > $@ | ||
26 | |||
27 | |||
28 | .PHONY: check clean distclean | ||
diff --git a/gns-protocol-numbers/POLICY b/gns-protocol-numbers/POLICY new file mode 100644 index 0000000..3972d5d --- /dev/null +++ b/gns-protocol-numbers/POLICY | |||
@@ -0,0 +1,20 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Each registry entry should contain three values: the port "Number" of the | ||
5 | protocol, which must be above 255, | ||
6 | the "Name" of the protocol, and a "Reference" with links | ||
7 | to further information about the record type. | ||
8 | |||
9 | The "Name" must be unique in the entire registry. The value must be a | ||
10 | case insensitive ASCII string and is restricted to alphanumeric | ||
11 | characters. | ||
12 | |||
13 | Adding protocols is possible after expert review, using a | ||
14 | first-come-first-served policy for unique "Name" allocation. | ||
15 | Experts are responsible to ensure that the chosen "Name" is | ||
16 | appropriate for the record type. | ||
17 | |||
18 | The current contact(s) for expert review are reachable at | ||
19 | gns-registry@gnunet.org. | ||
20 | |||
diff --git a/gns-protocol-numbers/README b/gns-protocol-numbers/README new file mode 100644 index 0000000..e34ad25 --- /dev/null +++ b/gns-protocol-numbers/README | |||
@@ -0,0 +1,8 @@ | |||
1 | GNS Protocol Numbers | ||
2 | -------------------- | ||
3 | |||
4 | This registry is for protocol number mappings for GNS names that are BOXed. | ||
5 | |||
6 | Some "_"-labels map to protocol numbers, but others do not. | ||
7 | For common "_"-labels, we provide a number mapping in this registry. | ||
8 | |||
diff --git a/gns-protocol-numbers/h.footer b/gns-protocol-numbers/h.footer new file mode 100644 index 0000000..15aade3 --- /dev/null +++ b/gns-protocol-numbers/h.footer | |||
@@ -0,0 +1,42 @@ | |||
1 | { | ||
2 | .name = NULL, | ||
3 | .number = 0 | ||
4 | } | ||
5 | }; | ||
6 | |||
7 | uint16_t | ||
8 | GNUNET_GNS_protocol_name_to_number (const char *name) | ||
9 | { | ||
10 | int i = 0; | ||
11 | while (NULL != GNUNET_GNS_Protocols[i].name) | ||
12 | { | ||
13 | if (0 == strcmp (name, GNUNET_GNS_Protocols[i].name)) | ||
14 | return GNUNET_GNS_Protocols[i].number; | ||
15 | i++; | ||
16 | } | ||
17 | return 0; | ||
18 | } | ||
19 | |||
20 | |||
21 | const char* | ||
22 | GNUNET_GNS_protocol_number_to_name (uint16_t number) | ||
23 | { | ||
24 | int i = 0; | ||
25 | while (NULL != GNUNET_GNS_Protocols[i].name) | ||
26 | { | ||
27 | if (number == GNUNET_GNS_Protocols[i].number) | ||
28 | return GNUNET_GNS_Protocols[i].name; | ||
29 | i++; | ||
30 | } | ||
31 | return NULL; | ||
32 | } | ||
33 | |||
34 | |||
35 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
36 | { | ||
37 | #endif | ||
38 | #ifdef __cplusplus | ||
39 | } | ||
40 | #endif | ||
41 | |||
42 | #endif | ||
diff --git a/gns-protocol-numbers/h.header b/gns-protocol-numbers/h.header new file mode 100644 index 0000000..54c4b00 --- /dev/null +++ b/gns-protocol-numbers/h.header | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2023 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNUNET_GNS_PROTOCOLS_H | ||
21 | #define GNUNET_GNS_PROTOCOLS_H | ||
22 | |||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add GNS service ports, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | extern "C" { | ||
34 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
35 | } | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | struct GNUNET_GNS_Protocol | ||
40 | { | ||
41 | const char *name; | ||
42 | |||
43 | uint16_t number; | ||
44 | }; | ||
45 | |||
46 | struct GNUNET_GNS_Protocol GNUNET_GNS_Protocols[] = { | ||
diff --git a/gns-protocol-numbers/h.template b/gns-protocol-numbers/h.template new file mode 100644 index 0000000..08cdb3b --- /dev/null +++ b/gns-protocol-numbers/h.template | |||
@@ -0,0 +1,8 @@ | |||
1 | /** | ||
2 | * {{Comment}} | ||
3 | */ | ||
4 | { | ||
5 | .name = "{{Name}}", | ||
6 | .number = {{Number}} | ||
7 | }, | ||
8 | |||
diff --git a/gns-protocol-numbers/registry.rec b/gns-protocol-numbers/registry.rec new file mode 100644 index 0000000..96770ff --- /dev/null +++ b/gns-protocol-numbers/registry.rec | |||
@@ -0,0 +1,22 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNS protocols | ||
4 | # | ||
5 | |||
6 | %rec: GnsProtocol | ||
7 | %key: Number | ||
8 | %type: Number int | ||
9 | %mandatory: Number | ||
10 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | ||
11 | %type: Name Name_t | ||
12 | %unique: Name | ||
13 | %mandatory: Name | ||
14 | %mandatory: Comment | ||
15 | %allowed: Contact | ||
16 | %allowed: References | ||
17 | %sort: Number Name Contact References | ||
18 | |||
19 | Number: 49152 | ||
20 | Name: trust | ||
21 | Comment: LIGHTest trust policy scheme | ||
22 | References: TODO | ||
diff --git a/gns-protocol-numbers/rst.footer b/gns-protocol-numbers/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gns-protocol-numbers/rst.footer | |||
diff --git a/gns-protocol-numbers/rst.header.template b/gns-protocol-numbers/rst.header.template new file mode 100644 index 0000000..11b34a1 --- /dev/null +++ b/gns-protocol-numbers/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Protocol Numbers | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - References | ||
11 | - Comment | ||
diff --git a/gns-protocol-numbers/rst.template b/gns-protocol-numbers/rst.template new file mode 100644 index 0000000..11468c9 --- /dev/null +++ b/gns-protocol-numbers/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{References}} | ||
4 | - {{Comment}} | ||
diff --git a/gns-service-port-numbers/.gitignore b/gns-service-port-numbers/.gitignore new file mode 100644 index 0000000..0a437d0 --- /dev/null +++ b/gns-service-port-numbers/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnu-name-system-record-types.h | |||
diff --git a/gns-service-port-numbers/Makefile b/gns-service-port-numbers/Makefile new file mode 100644 index 0000000..be25889 --- /dev/null +++ b/gns-service-port-numbers/Makefile | |||
@@ -0,0 +1,28 @@ | |||
1 | FILES=gnu_name_system_service_ports.h gnu_name_system_service_ports.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | rm -f *.tmp | ||
9 | clean: | ||
10 | rm -f $(FILES) *.tmp | ||
11 | |||
12 | gnu_name_system_service_ports.h.tmp: registry.rec h.template | ||
13 | ../format.sh h.template < registry.rec > $@ | ||
14 | |||
15 | gnu_name_system_service_ports.h: h.header gnu_name_system_service_ports.h.tmp h.footer | ||
16 | cat h.header gnu_name_system_service_ports.h.tmp h.footer > $@ | ||
17 | |||
18 | gnu_name_system_service_ports.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat README POLICY rst.header.template > $@ | ||
23 | |||
24 | gnu_name_system_service_ports.rst: rst.header.tmp gnu_name_system_service_ports.rst.tmp rst.footer | ||
25 | cat rst.header.tmp gnu_name_system_service_ports.rst.tmp rst.footer > $@ | ||
26 | |||
27 | |||
28 | .PHONY: check clean distclean | ||
diff --git a/gns-service-port-numbers/POLICY b/gns-service-port-numbers/POLICY new file mode 100644 index 0000000..3dbb6dc --- /dev/null +++ b/gns-service-port-numbers/POLICY | |||
@@ -0,0 +1,20 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Each registry entry should contain three values: the port "Number" of the | ||
5 | service, which must be above 49151 (private/dynamic port range), | ||
6 | the "Name" of the service, and a "Reference" with links | ||
7 | to further information about the record type. | ||
8 | |||
9 | The "Name" must be unique in the entire registry. The value must be a | ||
10 | case insensitive ASCII string and is restricted to alphanumeric | ||
11 | characters. | ||
12 | |||
13 | Adding records is possible after expert review, using a | ||
14 | first-come-first-served policy for unique "Name" allocation. | ||
15 | Experts are responsible to ensure that the chosen "Name" is | ||
16 | appropriate for the record type. | ||
17 | |||
18 | The current contact(s) for expert review are reachable at | ||
19 | gns-registry@gnunet.org. | ||
20 | |||
diff --git a/gns-service-port-numbers/README b/gns-service-port-numbers/README new file mode 100644 index 0000000..0babc89 --- /dev/null +++ b/gns-service-port-numbers/README | |||
@@ -0,0 +1,8 @@ | |||
1 | GNS Service Ports | ||
2 | ----------------- | ||
3 | |||
4 | This registry is for service-to-port mappings for GNS names that are BOXed. | ||
5 | |||
6 | Some "_"-labels map to service ports (RFC 6335), but others do not. | ||
7 | For common "_"-labels, we provide a number mapping in this registry. | ||
8 | |||
diff --git a/gns-service-port-numbers/h.footer b/gns-service-port-numbers/h.footer new file mode 100644 index 0000000..e2f02f9 --- /dev/null +++ b/gns-service-port-numbers/h.footer | |||
@@ -0,0 +1,42 @@ | |||
1 | { | ||
2 | .name = NULL, | ||
3 | .port = 0 | ||
4 | } | ||
5 | }; | ||
6 | |||
7 | uint16_t | ||
8 | GNUNET_GNS_service_port_name_to_number (const char *name) | ||
9 | { | ||
10 | int i = 0; | ||
11 | while (NULL != GNUNET_GNS_ServicePorts[i].name) | ||
12 | { | ||
13 | if (0 == strcmp (name, GNUNET_GNS_ServicePorts[i].name)) | ||
14 | return GNUNET_GNS_ServicePorts[i].port; | ||
15 | i++; | ||
16 | } | ||
17 | return 0; | ||
18 | } | ||
19 | |||
20 | |||
21 | const char* | ||
22 | GNUNET_GNS_service_port_number_to_name (uint16_t port) | ||
23 | { | ||
24 | int i = 0; | ||
25 | while (NULL != GNUNET_GNS_ServicePorts[i].name) | ||
26 | { | ||
27 | if (port == GNUNET_GNS_ServicePorts[i].port) | ||
28 | return GNUNET_GNS_ServicePorts[i].name; | ||
29 | i++; | ||
30 | } | ||
31 | return NULL; | ||
32 | } | ||
33 | |||
34 | |||
35 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
36 | { | ||
37 | #endif | ||
38 | #ifdef __cplusplus | ||
39 | } | ||
40 | #endif | ||
41 | |||
42 | #endif | ||
diff --git a/gns-service-port-numbers/h.header b/gns-service-port-numbers/h.header new file mode 100644 index 0000000..6cedfe8 --- /dev/null +++ b/gns-service-port-numbers/h.header | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2023 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNUNET_GNS_SERVICE_PORTS_H | ||
21 | #define GNUNET_GNS_SERVICE_PORTS_H | ||
22 | |||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add GNS service ports, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | extern "C" { | ||
34 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
35 | } | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | struct GNUNET_GNS_ServicePort | ||
40 | { | ||
41 | const char *name; | ||
42 | |||
43 | uint16_t port; | ||
44 | }; | ||
45 | |||
46 | struct GNUNET_GNS_ServicePort GNUNET_GNS_ServicePorts[] = { | ||
diff --git a/gns-service-port-numbers/h.template b/gns-service-port-numbers/h.template new file mode 100644 index 0000000..a7c0a60 --- /dev/null +++ b/gns-service-port-numbers/h.template | |||
@@ -0,0 +1,8 @@ | |||
1 | /** | ||
2 | * {{Comment}} | ||
3 | */ | ||
4 | { | ||
5 | .name = "{{Name}}", | ||
6 | .port = {{Number}} | ||
7 | }, | ||
8 | |||
diff --git a/gns-service-port-numbers/registry.rec b/gns-service-port-numbers/registry.rec new file mode 100644 index 0000000..9a5725e --- /dev/null +++ b/gns-service-port-numbers/registry.rec | |||
@@ -0,0 +1,27 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNS service ports | ||
4 | # | ||
5 | |||
6 | %rec: GnsServicePort | ||
7 | %key: Number | ||
8 | %type: Number int | ||
9 | %mandatory: Number | ||
10 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | ||
11 | %type: Name Name_t | ||
12 | %unique: Name | ||
13 | %mandatory: Name | ||
14 | %mandatory: Comment | ||
15 | %allowed: Contact | ||
16 | %allowed: References | ||
17 | %sort: Number Name Contact References | ||
18 | |||
19 | Number: 49152 | ||
20 | Name: scheme | ||
21 | Comment: Used by Trust Scheme Authorities to publish information about Trust Schemes (LIGHTest) | ||
22 | References: TODO | ||
23 | |||
24 | Number: 49153 | ||
25 | Name: translation | ||
26 | Comment: Used Trust Translation Authorities to publish information about Trust Translations (LIGHTest) | ||
27 | References: TODO \ No newline at end of file | ||
diff --git a/gns-service-port-numbers/rst.footer b/gns-service-port-numbers/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gns-service-port-numbers/rst.footer | |||
diff --git a/gns-service-port-numbers/rst.header.template b/gns-service-port-numbers/rst.header.template new file mode 100644 index 0000000..9da49e7 --- /dev/null +++ b/gns-service-port-numbers/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Service Ports | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - References | ||
11 | - Comment | ||
diff --git a/gns-service-port-numbers/rst.template b/gns-service-port-numbers/rst.template new file mode 100644 index 0000000..11468c9 --- /dev/null +++ b/gns-service-port-numbers/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{References}} | ||
4 | - {{Comment}} | ||
diff --git a/gnu-name-system-default-tlds/.gitignore b/gnu-name-system-default-tlds/.gitignore new file mode 100644 index 0000000..179d990 --- /dev/null +++ b/gnu-name-system-default-tlds/.gitignore | |||
@@ -0,0 +1 @@ | |||
tlds.conf | |||
diff --git a/gnu-name-system-default-tlds/Makefile b/gnu-name-system-default-tlds/Makefile index d2b66a6..01ad7d3 100644 --- a/gnu-name-system-default-tlds/Makefile +++ b/gnu-name-system-default-tlds/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | FILES=tlds.conf | 1 | FILES=tlds.conf tlds.rst |
2 | all: check $(FILES) | 2 | all: check $(FILES) |
3 | 3 | ||
4 | check: | 4 | check: |
@@ -14,6 +14,16 @@ tlds.conf.tmp: registry.rec tlds.template | |||
14 | ../format.sh tlds.template < registry.rec > $@ | 14 | ../format.sh tlds.template < registry.rec > $@ |
15 | 15 | ||
16 | tlds.conf: tlds.header tlds.conf.tmp | 16 | tlds.conf: tlds.header tlds.conf.tmp |
17 | cat $^ > $@ | 17 | cat tlds.header tlds.conf.tmp > $@ |
18 | |||
19 | tlds.rst.tmp: registry.rec rst.template | ||
20 | ../format.sh rst.template < registry.rec > $@ | ||
21 | |||
22 | rst.header.tmp: | ||
23 | cat README POLICY rst.header.template > $@ | ||
24 | |||
25 | tlds.rst: rst.header.tmp tlds.rst.tmp | ||
26 | cat rst.header.tmp tlds.rst.tmp > $@ | ||
27 | |||
18 | 28 | ||
19 | .PHONY: check clean distclean | 29 | .PHONY: check clean distclean |
diff --git a/gnu-name-system-default-tlds/POLICY b/gnu-name-system-default-tlds/POLICY index f27599c..a7a863c 100644 --- a/gnu-name-system-default-tlds/POLICY +++ b/gnu-name-system-default-tlds/POLICY | |||
@@ -1,3 +1,6 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
1 | Each registry entry should contain three values: the "Key" of the | 4 | Each registry entry should contain three values: the "Key" of the |
2 | authoritative zone of a TLD, the "Name" of the TLDS, an optional | 5 | authoritative zone of a TLD, the "Name" of the TLDS, an optional |
3 | "Contact", and a "Reference" with links to further information about the | 6 | "Contact", and a "Reference" with links to further information about the |
@@ -11,3 +14,4 @@ GNUnet who will define appropriate bribes on a case-by-case basis. | |||
11 | 14 | ||
12 | The current contact(s) for expert review are reachable at | 15 | The current contact(s) for expert review are reachable at |
13 | gns-registry@gnunet.org. | 16 | gns-registry@gnunet.org. |
17 | |||
diff --git a/gnu-name-system-default-tlds/README b/gnu-name-system-default-tlds/README index b2a9d4f..cff7486 100644 --- a/gnu-name-system-default-tlds/README +++ b/gnu-name-system-default-tlds/README | |||
@@ -1,4 +1,8 @@ | |||
1 | GNS Default Top-Level-Domains | ||
2 | ----------------------------- | ||
3 | |||
1 | This registry is the default Top-Level-Domains (TLDs) for the GNU Name System. | 4 | This registry is the default Top-Level-Domains (TLDs) for the GNU Name System. |
2 | 5 | ||
3 | This registry is used to ensure that GNS resolvers ship with a default | 6 | This registry is used to ensure that GNS resolvers ship with a default |
4 | configuration of TLDs in order to ease transition and enable instant use. | 7 | configuration of TLDs in order to ease transition and enable instant use. |
8 | |||
diff --git a/gnu-name-system-default-tlds/registry.rec b/gnu-name-system-default-tlds/registry.rec index f784878..665d159 100644 --- a/gnu-name-system-default-tlds/registry.rec +++ b/gnu-name-system-default-tlds/registry.rec | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | %rec: GnsTld | 6 | %rec: GnsTld |
7 | %key: Name | 7 | %key: Name |
8 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | 8 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-]*$/ |
9 | %type: Name Name_t | 9 | %type: Name Name_t |
10 | %typedef: Key_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*$/ | 10 | %typedef: Key_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*$/ |
11 | %type: Key Key_t | 11 | %type: Key Key_t |
@@ -17,6 +17,10 @@ | |||
17 | %allowed: References | 17 | %allowed: References |
18 | %sort: Name Contact References | 18 | %sort: Name Contact References |
19 | 19 | ||
20 | Name: pin | 20 | Name: pin.gns.alt |
21 | Key: 000G001MF6DVMZZ4Y8XRZQDXM1PB3D3VGEK29ZHXBA57EPSNW1QBPKT8J0 | 21 | Key: 000G0522TTKQESZ9KPRT2K0RA9ZC8YMD52D2XYVYVGPDCNPMWHH9QXXF4W |
22 | Comment: The FCFS authority managed by GNUnet e.V. | 22 | Comment: The FCFS authority managed by GNUnet e.V. |
23 | |||
24 | Name: gnunet.gns.alt | ||
25 | Key: 000G0522TTKQESZ9KPRT2K0RA9ZC8YMD52D2XYVYVGPDCNPMWHH9QXXF4W | ||
26 | Comment: The authoritative zone of the GNUnet project | ||
diff --git a/gnu-name-system-default-tlds/rst.footer b/gnu-name-system-default-tlds/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-name-system-default-tlds/rst.footer | |||
diff --git a/gnu-name-system-default-tlds/rst.header.template b/gnu-name-system-default-tlds/rst.header.template new file mode 100644 index 0000000..960a85e --- /dev/null +++ b/gnu-name-system-default-tlds/rst.header.template | |||
@@ -0,0 +1,10 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Default TLDs | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Zone Key | ||
10 | - Comment | ||
diff --git a/gnu-name-system-default-tlds/rst.template b/gnu-name-system-default-tlds/rst.template new file mode 100644 index 0000000..1adeac0 --- /dev/null +++ b/gnu-name-system-default-tlds/rst.template | |||
@@ -0,0 +1,3 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Key}} | ||
3 | - {{Comment}} | ||
diff --git a/gnu-name-system-default-tlds/tlds.template b/gnu-name-system-default-tlds/tlds.template index b79f4c2..3f056fe 100644 --- a/gnu-name-system-default-tlds/tlds.template +++ b/gnu-name-system-default-tlds/tlds.template | |||
@@ -1,2 +1,4 @@ | |||
1 | |||
1 | # {{Comment}} | 2 | # {{Comment}} |
2 | .{{Name}} = {{Key}} | 3 | .{{Name}} = {{Key}} |
4 | |||
diff --git a/gnu-name-system-record-flags/.gitignore b/gnu-name-system-record-flags/.gitignore new file mode 100644 index 0000000..0a437d0 --- /dev/null +++ b/gnu-name-system-record-flags/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnu-name-system-record-types.h | |||
diff --git a/gnu-name-system-record-flags/Makefile b/gnu-name-system-record-flags/Makefile new file mode 100644 index 0000000..9166ba5 --- /dev/null +++ b/gnu-name-system-record-flags/Makefile | |||
@@ -0,0 +1,28 @@ | |||
1 | FILES=gnu_name_system_record_flags.h gnu_name_system_record_flags.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | rm -f *.tmp | ||
9 | clean: | ||
10 | rm -f $(FILES) *.tmp | ||
11 | |||
12 | gnu_name_system_record_flags.h.tmp: registry.rec h.template | ||
13 | ../format.sh h.template < registry.rec > $@ | ||
14 | |||
15 | gnu_name_system_record_flags.h: h.header gnu_name_system_record_flags.h.tmp h.footer | ||
16 | cat h.header gnu_name_system_record_flags.h.tmp h.footer > $@ | ||
17 | |||
18 | gnu_name_system_record_flags.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat README POLICY rst.header.template > $@ | ||
23 | |||
24 | gnu_name_system_record_flags.rst: rst.header.tmp gnu_name_system_record_flags.rst.tmp rst.footer | ||
25 | cat rst.header.tmp gnu_name_system_record_flags.rst.tmp rst.footer > $@ | ||
26 | |||
27 | |||
28 | .PHONY: check clean distclean | ||
diff --git a/gnu-name-system-record-flags/POLICY b/gnu-name-system-record-flags/POLICY new file mode 100644 index 0000000..f9607ee --- /dev/null +++ b/gnu-name-system-record-flags/POLICY | |||
@@ -0,0 +1,20 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Each registry entry should contain three values: the "Number" of the | ||
5 | record flags, which must be between 0 and 15, | ||
6 | the "Name" of the record flag, and a "Reference" with links | ||
7 | to further information about the record flag. | ||
8 | |||
9 | The "Name" must be unique in the entire registry. The value must be a | ||
10 | case insensitive ASCII string and is restricted to alphanumeric | ||
11 | characters. | ||
12 | |||
13 | Adding flags is possible after expert review, using a | ||
14 | first-come-first-served policy for unique "Name" allocation. | ||
15 | Experts are responsible to ensure that the chosen "Name" is | ||
16 | appropriate for the record flag. | ||
17 | |||
18 | The current contact(s) for expert review are reachable at | ||
19 | gns-registry@gnunet.org. | ||
20 | |||
diff --git a/gnu-name-system-record-flags/README b/gnu-name-system-record-flags/README new file mode 100644 index 0000000..6cb5f1b --- /dev/null +++ b/gnu-name-system-record-flags/README | |||
@@ -0,0 +1,13 @@ | |||
1 | GNS Record Flags | ||
2 | ---------------- | ||
3 | |||
4 | This registry is for GNU Name System Record Flags. | ||
5 | |||
6 | GNU Name System Record flags uniquely identify the different kinds | ||
7 | of key-value pairs that can be used as flags of a GNU Name System record. | ||
8 | |||
9 | This registry is used to ensure that the names and numeric values | ||
10 | used to identify record flags are uniquely defined and to | ||
11 | allow GNS resolvers implementors to find out details about the | ||
12 | respective semantics and human-readable syntax. | ||
13 | |||
diff --git a/gnu-name-system-record-flags/h.footer b/gnu-name-system-record-flags/h.footer new file mode 100644 index 0000000..7b5140e --- /dev/null +++ b/gnu-name-system-record-flags/h.footer | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | }; | ||
3 | |||
4 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
5 | { | ||
6 | #endif | ||
7 | #ifdef __cplusplus | ||
8 | } | ||
9 | #endif | ||
10 | |||
11 | #endif | ||
diff --git a/gnu-name-system-record-flags/h.header b/gnu-name-system-record-flags/h.header new file mode 100644 index 0000000..c641893 --- /dev/null +++ b/gnu-name-system-record-flags/h.header | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNU_NAME_SYSTEM_RECORD_FLAGS_H | ||
21 | #define GNU_NAME_SYSTEM_RECORD_FLAGS_H | ||
22 | |||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add GNS record flags, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
31 | |||
32 | /** | ||
33 | * Flags that can be set for a record. | ||
34 | * The numbers in the registry correspond to the bit index as specified in | ||
35 | * LSD0001 Chapter "Resource Records". | ||
36 | * Each enum member represents the 16-bit integer value of the flags field if | ||
37 | * only that particular flag was set. | ||
38 | * The value can be used to efficiently compare the bitmask setting for the | ||
39 | * record flag in C. | ||
40 | * WARNING: The values are in host byte order! In order to correctly check | ||
41 | * against the flags field a record, the respective fields must | ||
42 | * also be converted to HBO (or the enum value to NBO). | ||
43 | */ | ||
44 | enum GNUNET_GNSRECORD_Flags | ||
45 | { | ||
46 | /** | ||
47 | * Entry for no flags / cleared flags. | ||
48 | */ | ||
49 | GNUNET_GNSRECORD_RF_NONE = 0, | ||
diff --git a/gnu-name-system-record-flags/h.template b/gnu-name-system-record-flags/h.template new file mode 100644 index 0000000..d90329b --- /dev/null +++ b/gnu-name-system-record-flags/h.template | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Comment}} | ||
5 | */ | ||
6 | GNUNET_GNSRECORD_RF_{{Name}} = 1 << (15 - {{Number}}), | ||
diff --git a/gnu-name-system-record-flags/registry.rec b/gnu-name-system-record-flags/registry.rec new file mode 100644 index 0000000..22aa750 --- /dev/null +++ b/gnu-name-system-record-flags/registry.rec | |||
@@ -0,0 +1,43 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNU Name System record flags | ||
4 | # | ||
5 | |||
6 | %rec: RecordType | ||
7 | %key: Number | ||
8 | %typedef: FlagRange_t range 0 15 | ||
9 | %type: Number FlagRange_t | ||
10 | %mandatory: Number | ||
11 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | ||
12 | %type: Name Name_t | ||
13 | %unique: Name | ||
14 | %mandatory: Name | ||
15 | %mandatory: Comment | ||
16 | %allowed: Contact | ||
17 | %allowed: References | ||
18 | %sort: Number Name Contact References | ||
19 | |||
20 | Number: 15 | ||
21 | Name: CRITICAL | ||
22 | Comment: This record is critical. If it cannot be processed (for example because the record type is unknown) resolution MUST fail | ||
23 | References: https://lsd.gnunet.org/lsd0001 | ||
24 | |||
25 | Number: 14 | ||
26 | Name: SHADOW | ||
27 | Comment: This record should not be used unless all (other) records in the set with an absolute expiration time have expired. | ||
28 | References: https://lsd.gnunet.org/lsd0001 | ||
29 | |||
30 | Number: 13 | ||
31 | Name: SUPPLEMENTAL | ||
32 | Comment: This is a supplemental record. | ||
33 | References: https://lsd.gnunet.org/lsd0001 | ||
34 | |||
35 | Number: 1 | ||
36 | Name: RELATIVE_EXPIRATION | ||
37 | Comment: This expiration time of the record is a relative time (not an absolute time). Used in GNUnet implementation. | ||
38 | References: https://git.gnunet.org/gnunet.git | ||
39 | |||
40 | Number: 0 | ||
41 | Name: PRIVATE | ||
42 | Comment: This is a private record of this peer and it should thus not be published. | ||
43 | References: https://git.gnunet.org/gnunet.git | ||
diff --git a/gnu-name-system-record-flags/rst.footer b/gnu-name-system-record-flags/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-name-system-record-flags/rst.footer | |||
diff --git a/gnu-name-system-record-flags/rst.header.template b/gnu-name-system-record-flags/rst.header.template new file mode 100644 index 0000000..76d353f --- /dev/null +++ b/gnu-name-system-record-flags/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Record Flags | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - References | ||
11 | - Comment | ||
diff --git a/gnu-name-system-record-flags/rst.template b/gnu-name-system-record-flags/rst.template new file mode 100644 index 0000000..11468c9 --- /dev/null +++ b/gnu-name-system-record-flags/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{References}} | ||
4 | - {{Comment}} | ||
diff --git a/gnu-name-system-record-types/Makefile b/gnu-name-system-record-types/Makefile index 245f48b..79c7b2d 100644 --- a/gnu-name-system-record-types/Makefile +++ b/gnu-name-system-record-types/Makefile | |||
@@ -1,11 +1,10 @@ | |||
1 | FILES=gnu_name_system_record_types.h | 1 | FILES=gnu_name_system_record_types.h gnu_name_system_record_types.rst |
2 | all: check $(FILES) | 2 | all: check $(FILES) |
3 | 3 | ||
4 | check: | 4 | check: |
5 | recfix --check registry.rec | 5 | recfix --check registry.rec |
6 | 6 | ||
7 | distclean: | 7 | distclean: |
8 | |||
9 | rm -f *.tmp | 8 | rm -f *.tmp |
10 | clean: | 9 | clean: |
11 | rm -f $(FILES) *.tmp | 10 | rm -f $(FILES) *.tmp |
@@ -14,6 +13,16 @@ gnu_name_system_record_types.h.tmp: registry.rec h.template | |||
14 | ../format.sh h.template < registry.rec > $@ | 13 | ../format.sh h.template < registry.rec > $@ |
15 | 14 | ||
16 | gnu_name_system_record_types.h: h.header gnu_name_system_record_types.h.tmp h.footer | 15 | gnu_name_system_record_types.h: h.header gnu_name_system_record_types.h.tmp h.footer |
17 | cat $^ > $@ | 16 | cat h.header gnu_name_system_record_types.h.tmp h.footer > $@ |
17 | |||
18 | gnu_name_system_record_types.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat README POLICY rst.header.template > $@ | ||
23 | |||
24 | gnu_name_system_record_types.rst: rst.header.tmp gnu_name_system_record_types.rst.tmp rst.footer | ||
25 | cat rst.header.tmp gnu_name_system_record_types.rst.tmp rst.footer > $@ | ||
26 | |||
18 | 27 | ||
19 | .PHONY: check clean distclean | 28 | .PHONY: check clean distclean |
diff --git a/gnu-name-system-record-types/POLICY b/gnu-name-system-record-types/POLICY index 89edf47..4e0e2d2 100644 --- a/gnu-name-system-record-types/POLICY +++ b/gnu-name-system-record-types/POLICY | |||
@@ -1,3 +1,6 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
1 | Each registry entry should contain three values: the "Number" of the | 4 | Each registry entry should contain three values: the "Number" of the |
2 | record type, which must be above 65535 (to avoid conflicts with legacy | 5 | record type, which must be above 65535 (to avoid conflicts with legacy |
3 | DNS record types), the "Name" of the record type, and a "Reference" with links | 6 | DNS record types), the "Name" of the record type, and a "Reference" with links |
@@ -12,5 +15,8 @@ first-come-first-served policy for unique "Name" allocation. | |||
12 | Experts are responsible to ensure that the chosen "Name" is | 15 | Experts are responsible to ensure that the chosen "Name" is |
13 | appropriate for the record type. | 16 | appropriate for the record type. |
14 | 17 | ||
18 | Numbers above 0xFFFF0000 non-exclusively indicate record types for private use. | ||
19 | |||
15 | The current contact(s) for expert review are reachable at | 20 | The current contact(s) for expert review are reachable at |
16 | gns-registry@gnunet.org. | 21 | gns-registry@gnunet.org. |
22 | |||
diff --git a/gnu-name-system-record-types/README b/gnu-name-system-record-types/README index c67e01d..94db280 100644 --- a/gnu-name-system-record-types/README +++ b/gnu-name-system-record-types/README | |||
@@ -1,3 +1,6 @@ | |||
1 | GNS Record Types | ||
2 | ---------------- | ||
3 | |||
1 | This registry is for GNU Name System Record Types. | 4 | This registry is for GNU Name System Record Types. |
2 | 5 | ||
3 | GNU Name System Record types uniquely identify the different kinds | 6 | GNU Name System Record types uniquely identify the different kinds |
@@ -7,3 +10,4 @@ This registry is used to ensure that the names and numeric values | |||
7 | used to identify record types are uniquely defined and to | 10 | used to identify record types are uniquely defined and to |
8 | allow GNS resolvers implementors to find out details about the | 11 | allow GNS resolvers implementors to find out details about the |
9 | respective semantics and human-readable syntax. | 12 | respective semantics and human-readable syntax. |
13 | |||
diff --git a/gnu-name-system-record-types/h.header b/gnu-name-system-record-types/h.header index 109e6f4..5f6e500 100644 --- a/gnu-name-system-record-types/h.header +++ b/gnu-name-system-record-types/h.header | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2012-2021 GNUnet e.V. | 3 | Copyright (C) 2012-2022 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
diff --git a/gnu-name-system-record-types/registry.rec b/gnu-name-system-record-types/registry.rec index 0b93a0c..ee53077 100644 --- a/gnu-name-system-record-types/registry.rec +++ b/gnu-name-system-record-types/registry.rec | |||
@@ -18,33 +18,33 @@ | |||
18 | 18 | ||
19 | Number: 65536 | 19 | Number: 65536 |
20 | Name: PKEY | 20 | Name: PKEY |
21 | Comment: GNS zone transfer | 21 | Comment: GNS zone delegation (PKEY) |
22 | References: LSD0001 | 22 | References: RFC 9498 |
23 | 23 | ||
24 | Number: 65537 | 24 | Number: 65537 |
25 | Name: NICK | 25 | Name: NICK |
26 | Comment: GNS nick names | 26 | Comment: GNS zone nickname |
27 | References: LSD0001 | 27 | References: RFC 9498 |
28 | 28 | ||
29 | Number: 65538 | 29 | Number: 65538 |
30 | Name: LEHO | 30 | Name: LEHO |
31 | Comment: legacy hostnames | 31 | Comment: GNS legacy hostname |
32 | References: LSD0001 | 32 | References: RFC 9498 |
33 | 33 | ||
34 | Number: 65539 | 34 | Number: 65539 |
35 | Name: VPN | 35 | Name: VPN |
36 | Comment: VPN resolution | 36 | Comment: VPN resolution |
37 | References: LSD0001 | 37 | References: |
38 | 38 | ||
39 | Number: 65540 | 39 | Number: 65540 |
40 | Name: GNS2DNS | 40 | Name: GNS2DNS |
41 | Comment: Delegation to DNS | 41 | Comment: Delegation to DNS |
42 | References: LSD0001 | 42 | References: RFC 9498 |
43 | 43 | ||
44 | Number: 65541 | 44 | Number: 65541 |
45 | Name: BOX | 45 | Name: BOX |
46 | Comment: Boxed records (see TLSA/SRV handling in GNS) | 46 | Comment: Box record |
47 | References: LSD0001 | 47 | References: RFC 9498 |
48 | 48 | ||
49 | Number: 65542 | 49 | Number: 65542 |
50 | Name: PLACE | 50 | Name: PLACE |
@@ -66,6 +66,12 @@ Name: RECLAIM_TICKET | |||
66 | Comment: local ticket reference | 66 | Comment: local ticket reference |
67 | Contact: schanzen@gnunet.org | 67 | Contact: schanzen@gnunet.org |
68 | 68 | ||
69 | Number: 65547 | ||
70 | Name: SBOX | ||
71 | Comment: SBox record | ||
72 | Contact: sebastian.nadler@tum.de | ||
73 | References: LSD 0008 | ||
74 | |||
69 | Number: 65548 | 75 | Number: 65548 |
70 | Name: DELEGATE | 76 | Name: DELEGATE |
71 | Comment: For ABD policies | 77 | Comment: For ABD policies |
@@ -81,10 +87,10 @@ Name: RECLAIM_ATTRIBUTE_REF | |||
81 | Comment: for reclaim records | 87 | Comment: for reclaim records |
82 | Contact: schanzen@gnunet.org | 88 | Contact: schanzen@gnunet.org |
83 | 89 | ||
84 | #Number: 65551 | 90 | Number: 65551 |
85 | #Name: | 91 | Name: REDIRECT |
86 | #Comment: | 92 | Comment: Redirection record |
87 | #Contact: | 93 | Contact: RFC 9498 |
88 | 94 | ||
89 | Number: 65552 | 95 | Number: 65552 |
90 | Name: RECLAIM_OIDC_CLIENT | 96 | Name: RECLAIM_OIDC_CLIENT |
@@ -109,9 +115,35 @@ Contact: schanzen@gnunet.org | |||
109 | 115 | ||
110 | Number: 65556 | 116 | Number: 65556 |
111 | Name: EDKEY | 117 | Name: EDKEY |
112 | Comment: Record type for EDKEY zone delegations. | 118 | Comment: GNS zone delegation (EDKEY) |
113 | 119 | ||
114 | Number: 65557 | 120 | Number: 65557 |
115 | Name: ERIS_READ_CAPABILITY | 121 | Name: ERIS_READ_CAPABILITY |
116 | Comment: Encoding for Robust Immutable Storage (ERIS) binary read capability | 122 | Comment: Encoding for Robust Immutable Storage (ERIS) binary read capability |
117 | Reference: http://purl.org/eris | 123 | References: http://purl.org/eris |
124 | |||
125 | Number: 65558 | ||
126 | Name: MESSENGER_ROOM_ENTRY | ||
127 | Comment: Record type to share an entry of a messenger room | ||
128 | Contact: thejackimonster@gmail.com | ||
129 | |||
130 | Number: 65559 | ||
131 | Name: TOMBSTONE | ||
132 | Comment: Record type to indicate a previously delete record (PRIVATE only) | ||
133 | Contact: gnunet-developers@gnunet.org | ||
134 | |||
135 | Number: 65560 | ||
136 | Name: MESSENGER_ROOM_DETAILS | ||
137 | Comment: Record type to store details about a messenger room | ||
138 | Contact: thejackimonster@gmail.com | ||
139 | |||
140 | Number: 65561 | ||
141 | Name: DID_DOCUMENT | ||
142 | Comment: Record type to store DID Documents | ||
143 | Contact: schanzen@gnunet.orgNumber: 65561 | ||
144 | |||
145 | # Private range started from 0xFFFF0000 | ||
146 | Number: 4294901760 | ||
147 | Name: GNS_REGISTRAR_METADATA | ||
148 | Comment: Private metadata for a delegation registration | ||
149 | Contact: schanzen@gnunet.org | ||
diff --git a/gnu-name-system-record-types/rst.footer b/gnu-name-system-record-types/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-name-system-record-types/rst.footer | |||
diff --git a/gnu-name-system-record-types/rst.header.template b/gnu-name-system-record-types/rst.header.template new file mode 100644 index 0000000..9ec6044 --- /dev/null +++ b/gnu-name-system-record-types/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Record Types | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - References | ||
11 | - Comment | ||
diff --git a/gnu-name-system-record-types/rst.template b/gnu-name-system-record-types/rst.template new file mode 100644 index 0000000..11468c9 --- /dev/null +++ b/gnu-name-system-record-types/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{References}} | ||
4 | - {{Comment}} | ||
diff --git a/gnu-taler-db-events/Makefile b/gnu-taler-db-events/Makefile index 194ba50..58fc0e8 100644 --- a/gnu-taler-db-events/Makefile +++ b/gnu-taler-db-events/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | FILES=taler_dbevents.h | 1 | FILES=taler_dbevents.h taler_dbevents.rst |
2 | 2 | ||
3 | all: check $(FILES) | 3 | all: check $(FILES) |
4 | 4 | ||
@@ -17,4 +17,10 @@ taler_dbevents.h.tmp: registry.rec h.template | |||
17 | taler_dbevents.h: h.header taler_dbevents.h.tmp h.footer | 17 | taler_dbevents.h: h.header taler_dbevents.h.tmp h.footer |
18 | cat $^ > $@ | 18 | cat $^ > $@ |
19 | 19 | ||
20 | taler_dbevents.rst.tmp: registry.rec rst.template | ||
21 | ../format.sh rst.template < registry.rec > $@ | ||
22 | |||
23 | taler_dbevents.rst: rst.header taler_dbevents.rst.tmp rst.footer | ||
24 | cat rst.header taler_dbevents.rst.tmp rst.footer > $@ | ||
25 | |||
20 | .PHONY: check clean distclean | 26 | .PHONY: check clean distclean |
diff --git a/gnu-taler-db-events/registry.rec b/gnu-taler-db-events/registry.rec index 8a66202..4f668bf 100644 --- a/gnu-taler-db-events/registry.rec +++ b/gnu-taler-db-events/registry.rec | |||
@@ -32,6 +32,31 @@ Value: 1002 | |||
32 | Name: EXCHANGE_WIRE_UPDATED | 32 | Name: EXCHANGE_WIRE_UPDATED |
33 | Description: Event triggered when the wire response was changed via the management API. | 33 | Description: Event triggered when the wire response was changed via the management API. |
34 | 34 | ||
35 | Value: 1003 | ||
36 | Name: EXCHANGE_KYC_COMPLETED | ||
37 | Description: Event triggered when a user completed a KYC process. | ||
38 | |||
39 | Value: 1004 | ||
40 | Name: EXCHANGE_EXTENSIONS_UPDATED | ||
41 | Description: Event triggered when the configuration of an extension is updated. | ||
42 | |||
43 | Value: 1005 | ||
44 | Name: EXCHANGE_PURSE_MERGED | ||
45 | Description: Event triggered when a purse was merged into a reserve. | ||
46 | |||
47 | Value: 1006 | ||
48 | Name: EXCHANGE_PURSE_DEPOSITED | ||
49 | Description: Event triggered when coins are deposited into a purse. | ||
50 | |||
51 | Value: 1007 | ||
52 | Name: EXCHANGE_DEPOSIT_STATUS_CHANGED | ||
53 | Description: Event triggered when the tracking status for a deposit has changed. | ||
54 | |||
55 | Value: 1008 | ||
56 | Name: EXCHANGE_PURSE_REFUNDED | ||
57 | Description: Event triggered when any purse was refunded. | ||
58 | |||
59 | |||
35 | # 1100-1199: For Taler Merchant | 60 | # 1100-1199: For Taler Merchant |
36 | 61 | ||
37 | Value: 1100 | 62 | Value: 1100 |
@@ -58,9 +83,66 @@ Value: 1105 | |||
58 | Name: MERCHANT_ORDERS_CHANGE | 83 | Name: MERCHANT_ORDERS_CHANGE |
59 | Description: Event triggered when the set of orders or their state changes. | 84 | Description: Event triggered when the set of orders or their state changes. |
60 | 85 | ||
86 | Value: 1106 | ||
87 | Name: MERCHANT_WEBHOOK_PENDING | ||
88 | Description: Event triggered when a new pending webhook is ready to be run. | ||
89 | |||
90 | Value: 1107 | ||
91 | Name: MERCHANT_REWARD_PICKUP | ||
92 | Description: Event triggered when a reward is being picked up. | ||
93 | |||
94 | Value: 1108 | ||
95 | Name: MERCHANT_WIRE_TRANSFER_CONFIRMED | ||
96 | Description: Event triggered when a wire transfer is confirmed. Triggers interaction with the exchange to download details about which payments were aggregated. | ||
97 | |||
98 | Value: 1109 | ||
99 | Name: MERCHANT_ACCOUNTS_CHANGED | ||
100 | Description: Event triggered when the set of accounts has changed. Triggers restart of taler-merchant-wirewatch. | ||
101 | |||
102 | Value: 1110 | ||
103 | Name: MERCHANT_EXCHANGE_KEYS | ||
104 | Description: Event triggered when we downloaded "/keys" from an exchange and stored it in the database. Extra argument must be the exchange base URL. | ||
105 | |||
106 | Value: 1111 | ||
107 | Name: MERCHANT_NEW_WIRE_DEADLINE | ||
108 | Description: Event triggered upon successful (batch) deposit. Notifies taler-merchant-depositcheck about a potentially relevant wire deadline to wake up for. Argument is a 64-bit absolute time in network byte order. | ||
109 | |||
110 | |||
111 | # 1200+: For auditor | ||
112 | Value: 1200 | ||
113 | Name: EXCHANGE_AUDITOR_NEW_DEPOSIT_CONFIRMATION | ||
114 | Description: Event triggered when there is a new deposit confirmation available. | ||
115 | |||
116 | |||
61 | 117 | ||
62 | # 2000-2099: For Anastasis | 118 | # 2000-2099: For Anastasis |
63 | 119 | ||
64 | Value: 2000 | 120 | Value: 2000 |
65 | Name: ANASTASIS_AUTH_IBAN_TRANSFER | 121 | Name: ANASTASIS_AUTH_IBAN_TRANSFER |
66 | Description: A wire transfer from the target account with the correct wire transfer subject was received. \ No newline at end of file | 122 | Description: A wire transfer from the target account with the correct wire transfer subject was received. |
123 | |||
124 | # 3000-3099: For Libeufin | ||
125 | |||
126 | Value: 3000 | ||
127 | Name: LIBEUFIN_TALER_INCOMING | ||
128 | Description: A wire transfer with a valid reserve public key was received. | ||
129 | |||
130 | # This event signals that a payment was persisted in the database, | ||
131 | # and it carries the direction in its payload. Note: the direction | ||
132 | # is expressed the CaMt way: CRDT or DBIT. | ||
133 | Value: 3001 | ||
134 | Name: LIBEUFIN_REGIO_TX | ||
135 | Description: A new transactions internal to Sandbox was made. | ||
136 | |||
137 | # In the context of regional currencies, this event triggers the | ||
138 | # wire transfer from "admin" to the exchange, in order to start a | ||
139 | # Taler withdrawal. | ||
140 | Value: 3002 | ||
141 | Name: LIBEUFIN_SANDBOX_FIAT_INCOMING | ||
142 | Description: A new fiat transaction can trigger actions in Sandbox. | ||
143 | |||
144 | # A fiat payment was ingested for a particular bank account. The | ||
145 | # payload communicates the direction: CRDT or DBIT. | ||
146 | Value: 3003 | ||
147 | Name: LIBEUFIN_NEXUS_TX | ||
148 | Description: A new transaction was successfully ingested by Nexus. | ||
diff --git a/gnu-taler-db-events/rst.footer b/gnu-taler-db-events/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-taler-db-events/rst.footer | |||
diff --git a/gnu-taler-db-events/rst.header b/gnu-taler-db-events/rst.header new file mode 100644 index 0000000..cd944ce --- /dev/null +++ b/gnu-taler-db-events/rst.header | |||
@@ -0,0 +1,13 @@ | |||
1 | Taler DB Events | ||
2 | --------------- | ||
3 | |||
4 | Entries | ||
5 | ^^^^^^^ | ||
6 | |||
7 | .. list-table:: Taler DB Events | ||
8 | :widths: auto | ||
9 | :header-rows: 1 | ||
10 | |||
11 | * - Name | ||
12 | - Value | ||
13 | - Description | ||
diff --git a/gnu-taler-db-events/rst.template b/gnu-taler-db-events/rst.template new file mode 100644 index 0000000..e47c564 --- /dev/null +++ b/gnu-taler-db-events/rst.template | |||
@@ -0,0 +1,3 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Value}} | ||
3 | - {{Description}} | ||
diff --git a/gnu-taler-error-codes/.gitignore b/gnu-taler-error-codes/.gitignore index 2eed484..ded8f45 100644 --- a/gnu-taler-error-codes/.gitignore +++ b/gnu-taler-error-codes/.gitignore | |||
@@ -4,3 +4,4 @@ | |||
4 | *.tmp | 4 | *.tmp |
5 | *.ts | 5 | *.ts |
6 | taler_error_codes.py | 6 | taler_error_codes.py |
7 | *.go | ||
diff --git a/gnu-taler-error-codes/Makefile b/gnu-taler-error-codes/Makefile index b7885f5..608512d 100644 --- a/gnu-taler-error-codes/Makefile +++ b/gnu-taler-error-codes/Makefile | |||
@@ -2,7 +2,9 @@ FILES=taler_error_codes.h \ | |||
2 | taler_error_codes.c \ | 2 | taler_error_codes.c \ |
3 | taler_error_codes.ts \ | 3 | taler_error_codes.ts \ |
4 | taler_error_codes.py \ | 4 | taler_error_codes.py \ |
5 | taler_error_codes.kt | 5 | taler_error_codes.kt \ |
6 | taler_error_codes.go \ | ||
7 | taler_error_codes.rst | ||
6 | 8 | ||
7 | all: check $(FILES) | 9 | all: check $(FILES) |
8 | 10 | ||
@@ -23,7 +25,7 @@ prep: | |||
23 | # if nothing changed, we use 'diff' to make sure that 'recsel' | 25 | # if nothing changed, we use 'diff' to make sure that 'recsel' |
24 | # actually changed the result. | 26 | # actually changed the result. |
25 | combined.tmp: registry.rec prep | 27 | combined.tmp: registry.rec prep |
26 | recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp | 28 | recsel --sort=Value -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp |
27 | if ! diff $@ combined.xtmp > /dev/null; then mv combined.xtmp $@; else rm combined.xtmp; fi | 29 | if ! diff $@ combined.xtmp > /dev/null; then mv combined.xtmp $@; else rm combined.xtmp; fi |
28 | 30 | ||
29 | combined-escaped.tmp: combined.tmp | 31 | combined-escaped.tmp: combined.tmp |
@@ -36,7 +38,7 @@ taler_error_codes.h.tmp: combined.tmp h.template | |||
36 | ../format.sh h.template < combined.tmp > $@ | 38 | ../format.sh h.template < combined.tmp > $@ |
37 | 39 | ||
38 | taler_error_codes.h: h.header taler_error_codes.h.tmp h.footer | 40 | taler_error_codes.h: h.header taler_error_codes.h.tmp h.footer |
39 | cat $^ > $@ | 41 | cat $^ | sed -e "s/= 0000/= 0/" -e "s/= 000/= /" -e "s/= 00/= /" > $@ |
40 | 42 | ||
41 | taler_error_codes.c.tmp: combined-escaped.tmp c.template | 43 | taler_error_codes.c.tmp: combined-escaped.tmp c.template |
42 | ../format.sh c.template < combined-escaped.tmp > $@ | 44 | ../format.sh c.template < combined-escaped.tmp > $@ |
@@ -62,8 +64,19 @@ taler_error_codes.kt: kt.header taler_error_codes.kt.tmp kt.footer | |||
62 | taler_error_codes.py.tmp: combined.tmp py.template | 64 | taler_error_codes.py.tmp: combined.tmp py.template |
63 | ../format.sh py.template < combined.tmp > $@ | 65 | ../format.sh py.template < combined.tmp > $@ |
64 | 66 | ||
65 | taler_error_codes.py: py.header taler_error_codes.py.tmp | 67 | taler_error_codes.py: py.header taler_error_codes.py.tmp |
68 | cat $^ > $@ | ||
69 | |||
70 | taler_error_codes.go.tmp: combined.tmp go.template | ||
71 | ../format.sh go.template < combined.tmp > $@ | ||
72 | |||
73 | taler_error_codes.go: go.header taler_error_codes.go.tmp go.footer | ||
66 | cat $^ > $@ | 74 | cat $^ > $@ |
67 | 75 | ||
76 | taler_error_codes.rst.tmp: combined.tmp rst.template | ||
77 | ../format.sh rst.template < combined.tmp > $@ | ||
78 | |||
79 | taler_error_codes.rst: rst.header taler_error_codes.rst.tmp rst.footer | ||
80 | cat $^ > $@ | ||
68 | 81 | ||
69 | .PHONY: check clean distclean prep | 82 | .PHONY: check clean distclean prep |
diff --git a/gnu-taler-error-codes/go.footer b/gnu-taler-error-codes/go.footer new file mode 100644 index 0000000..bea8cd1 --- /dev/null +++ b/gnu-taler-error-codes/go.footer | |||
@@ -0,0 +1 @@ | |||
) | |||
diff --git a/gnu-taler-error-codes/go.header b/gnu-taler-error-codes/go.header new file mode 100644 index 0000000..e6aefe3 --- /dev/null +++ b/gnu-taler-error-codes/go.header | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | This file is part of GNU Taler | ||
3 | Copyright (C) 2012-2022 Taler Systems SA | ||
4 | |||
5 | GNU Taler is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Lesser General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNU Taler is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: LGPL3.0-or-later | ||
19 | |||
20 | Note: the LGPL does not apply to all components of GNU Taler, | ||
21 | but it does apply to this file. | ||
22 | */ | ||
23 | |||
24 | package gana | ||
25 | |||
26 | const ( | ||
diff --git a/gnu-taler-error-codes/go.template b/gnu-taler-error-codes/go.template new file mode 100644 index 0000000..1566025 --- /dev/null +++ b/gnu-taler-error-codes/go.template | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Description}} | ||
5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). | ||
6 | * (A value of 0 indicates that the error is generated client-side). | ||
7 | */ | ||
8 | {{Name}} = {{Value}} | ||
diff --git a/gnu-taler-error-codes/kt.template b/gnu-taler-error-codes/kt.template index 9934b7e..9470655 100644 --- a/gnu-taler-error-codes/kt.template +++ b/gnu-taler-error-codes/kt.template | |||
@@ -5,4 +5,4 @@ | |||
5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). | 5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). |
6 | * (A value of 0 indicates that the error is generated client-side). | 6 | * (A value of 0 indicates that the error is generated client-side). |
7 | */ | 7 | */ |
8 | TALER_EC_{{Name}}({{Value}}), | 8 | {{Name}}({{Value}}), |
diff --git a/gnu-taler-error-codes/registry.rec b/gnu-taler-error-codes/registry.rec index b40b990..0de4c76 100644 --- a/gnu-taler-error-codes/registry.rec +++ b/gnu-taler-error-codes/registry.rec | |||
@@ -4,7 +4,9 @@ | |||
4 | # | 4 | # |
5 | %rec: TalerErrorCode | 5 | %rec: TalerErrorCode |
6 | %key: Value | 6 | %key: Value |
7 | %singular: Value | ||
7 | %typedef: ValueRange_t range 0 9999 | 8 | %typedef: ValueRange_t range 0 9999 |
9 | %typedef: ValueRange_t regexp /^[0123456789][0123456789][0123456789][0123456789]$/ | ||
8 | %constraint: ( Value < 100 ) || ( Value > 999 ) | 10 | %constraint: ( Value < 100 ) || ( Value > 999 ) |
9 | %type: Value ValueRange_t | 11 | %type: Value ValueRange_t |
10 | %mandatory: Value | 12 | %mandatory: Value |
@@ -15,194 +17,256 @@ | |||
15 | %type: Name Name_t | 17 | %type: Name Name_t |
16 | %unique: Name | 18 | %unique: Name |
17 | %mandatory: Name | 19 | %mandatory: Name |
20 | %singular: Name | ||
18 | # A status of 0 means not an HTTP status (i.e. created client-side) | 21 | # A status of 0 means not an HTTP status (i.e. created client-side) |
19 | %typedef: HttpStatus_t range 0 599 | ||
20 | %type: HttpStatus rec HttpStatusCode | 22 | %type: HttpStatus rec HttpStatusCode |
21 | %mandatory: HttpStatus | 23 | %mandatory: HttpStatus |
22 | %sort: Value | 24 | %sort: Value |
23 | 25 | ||
24 | # 0 - 99: Reserved for GENERIC error codes | 26 | # 0 - 99: Reserved for GENERIC error codes |
25 | 27 | ||
26 | Value: 0 | 28 | Value: 0000 |
27 | Name: NONE | 29 | Name: NONE |
28 | Description: Special code to indicate success (no error). | 30 | Description: Special code to indicate success (no error). |
29 | HttpStatus: 0 | 31 | HttpStatus: 0 |
30 | 32 | ||
31 | # We could not get the error code. | 33 | # We could not get the error code. |
32 | 34 | Value: 0001 | |
33 | Value: 1 | ||
34 | Name: INVALID | 35 | Name: INVALID |
35 | Description: A non-integer error code was returned in the JSON response. | 36 | Description: An error response did not include an error code in the format expected by the client. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. |
36 | HttpStatus: 0 | 37 | HttpStatus: 0 |
37 | 38 | ||
39 | Value: 0002 | ||
40 | Name: GENERIC_CLIENT_INTERNAL_ERROR | ||
41 | Description: An internal failure happened on the client side. Details should be in the local logs. Check if you are using the latest available version or file a report with the developers. | ||
42 | HttpStatus: 0 | ||
38 | 43 | ||
39 | # Fundamental problems detected client-side (10-19) | 44 | # Fundamental problems detected client-side (10-19) |
40 | 45 | ||
41 | Value: 10 | 46 | Value: 0010 |
42 | Name: GENERIC_INVALID_RESPONSE | 47 | Name: GENERIC_INVALID_RESPONSE |
43 | Description: The response we got from the server was not even in JSON format. | 48 | Description: The response we got from the server was not in the expected format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. |
44 | HttpStatus: 0 | 49 | HttpStatus: 0 |
45 | 50 | ||
46 | Value: 11 | 51 | Value: 0011 |
47 | Name: GENERIC_TIMEOUT | 52 | Name: GENERIC_TIMEOUT |
48 | Description: An operation timed out. | 53 | Description: The operation timed out. Trying again might help. Check the network connection. |
49 | HttpStatus: 0 | 54 | HttpStatus: 0 |
50 | 55 | ||
51 | Value: 12 | 56 | Value: 0012 |
52 | Name: GENERIC_VERSION_MALFORMED | 57 | Name: GENERIC_VERSION_MALFORMED |
53 | Description: The version string given does not follow the expected CURRENT:REVISION:AGE Format. | 58 | Description: The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. |
54 | HttpStatus: 0 | 59 | HttpStatus: 0 |
55 | 60 | ||
56 | Value: 13 | 61 | Value: 0013 |
57 | Name: GENERIC_REPLY_MALFORMED | 62 | Name: GENERIC_REPLY_MALFORMED |
58 | Description: The service responded with a reply that was in JSON but did not satsify the protocol. Note that invalid cryptographic signatures should have signature-specific error codes. | 63 | Description: The service responded with a reply that was in the right data format, but the content did not satisfy the protocol. Please file a bug report. |
59 | HttpStatus: 0 | 64 | HttpStatus: 0 |
60 | 65 | ||
61 | Value: 14 | 66 | Value: 0014 |
62 | Name: GENERIC_CONFIGURATION_INVALID | 67 | Name: GENERIC_CONFIGURATION_INVALID |
63 | Description: There is an error in the client-side configuration, for example the base URL specified is malformed. | 68 | Description: There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration. |
64 | HttpStatus: 0 | 69 | HttpStatus: 0 |
65 | 70 | ||
71 | Value: 0015 | ||
72 | Name: GENERIC_UNEXPECTED_REQUEST_ERROR | ||
73 | Description: The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report. | ||
74 | HttpStatus: 0 | ||
75 | |||
76 | Value: 0016 | ||
77 | Name: GENERIC_TOKEN_PERMISSION_INSUFFICIENT | ||
78 | Description: The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed. | ||
79 | HttpStatus: 403 | ||
80 | |||
66 | # Fundamental client-side protocol problems (20-29) | 81 | # Fundamental client-side protocol problems (20-29) |
67 | # (fundamental: cannot be helped, client is very broken) | 82 | # (fundamental: cannot be helped, client is very broken) |
68 | 83 | ||
69 | Value: 20 | 84 | Value: 0020 |
70 | Name: GENERIC_METHOD_INVALID | 85 | Name: GENERIC_METHOD_INVALID |
71 | Description: The HTTP method used is invalid for this endpoint. | 86 | Description: The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. |
72 | HttpStatus: 405 | 87 | HttpStatus: 405 |
73 | 88 | ||
74 | Value: 21 | 89 | Value: 0021 |
75 | Name: GENERIC_ENDPOINT_UNKNOWN | 90 | Name: GENERIC_ENDPOINT_UNKNOWN |
76 | Description: There is no endpoint defined for the URL provided by the client. | 91 | Description: There is no endpoint defined for the URL provided by the client. Check if you used the correct URL and/or file a report with the developers of the client software. |
77 | HttpStatus: 404 | 92 | HttpStatus: 404 |
78 | 93 | ||
79 | Value: 22 | 94 | Value: 0022 |
80 | Name: GENERIC_JSON_INVALID | 95 | Name: GENERIC_JSON_INVALID |
81 | Description: The JSON in the client's request was malformed (generic parse error). | 96 | Description: The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. |
82 | HttpStatus: 400 | 97 | HttpStatus: 400 |
83 | 98 | ||
84 | Value: 23 | 99 | Value: 0023 |
85 | Name: GENERIC_HTTP_HEADERS_MALFORMED | 100 | Name: GENERIC_HTTP_HEADERS_MALFORMED |
86 | Description: Some of the HTTP headers provided by the client caused the server to not be able to handle the request. | 101 | Description: Some of the HTTP headers provided by the client were malformed and caused the server to not be able to handle the request. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. |
87 | HttpStatus: 400 | 102 | HttpStatus: 400 |
88 | 103 | ||
89 | Value: 24 | 104 | Value: 0024 |
90 | Name: GENERIC_PAYTO_URI_MALFORMED | 105 | Name: GENERIC_PAYTO_URI_MALFORMED |
91 | Description: The payto:// URI provided by the client is malformed. | 106 | Description: The payto:// URI provided by the client is malformed. Check that you are using the correct syntax as of RFC 8905 and/or that you entered the bank account number correctly. |
92 | HttpStatus: 400 | 107 | HttpStatus: 400 |
93 | 108 | ||
94 | Value: 25 | 109 | Value: 0025 |
95 | Name: GENERIC_PARAMETER_MISSING | 110 | Name: GENERIC_PARAMETER_MISSING |
96 | Description: A required parameter in the request was missing. | 111 | Description: A required parameter in the request was missing. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. |
97 | HttpStatus: 400 | 112 | HttpStatus: 400 |
98 | 113 | ||
99 | Value: 26 | 114 | Value: 0026 |
100 | Name: GENERIC_PARAMETER_MALFORMED | 115 | Name: GENERIC_PARAMETER_MALFORMED |
101 | Description: A parameter in the request was malformed. | 116 | Description: A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. |
117 | HttpStatus: 400 | ||
118 | |||
119 | Value: 0027 | ||
120 | Name: GENERIC_RESERVE_PUB_MALFORMED | ||
121 | Description: The reserve public key was malformed. | ||
102 | HttpStatus: 400 | 122 | HttpStatus: 400 |
123 | FIXME: Fold with 26? | ||
103 | 124 | ||
125 | Value: 0028 | ||
126 | Name: GENERIC_COMPRESSION_INVALID | ||
127 | Description: The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. | ||
128 | HttpStatus: 400 | ||
104 | 129 | ||
105 | # Circumstantial client-side protocol problems (30-39) | 130 | # Circumstantial client-side protocol problems (30-39) |
106 | # (Circumstantial == may work with another server, but not this one) | 131 | # (Circumstantial == may work with another server, but not this one) |
107 | 132 | ||
108 | Value: 30 | 133 | Value: 0030 |
109 | Name: GENERIC_CURRENCY_MISMATCH | 134 | Name: GENERIC_CURRENCY_MISMATCH |
110 | Description: The currencies involved in the operation do not match. | 135 | Description: The currency involved in the operation is not acceptable for this server. Check your configuration and make sure the currency specified for a given service provider is one of the currencies supported by that provider. |
111 | HttpStatus: 400 | 136 | HttpStatus: 400 |
112 | 137 | ||
113 | Value: 31 | 138 | Value: 0031 |
114 | Name: GENERIC_URI_TOO_LONG | 139 | Name: GENERIC_URI_TOO_LONG |
115 | Description: The URI is longer than the longest URI the HTTP server is willing to parse. | 140 | Description: The URI is longer than the longest URI the HTTP server is willing to parse. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit. |
116 | HttpStatus: 414 | 141 | HttpStatus: 414 |
117 | 142 | ||
118 | Value: 32 | 143 | Value: 0032 |
119 | Name: GENERIC_UPLOAD_EXCEEDS_LIMIT | 144 | Name: GENERIC_UPLOAD_EXCEEDS_LIMIT |
120 | Description: The body is too large to be permissible for the endpoint. | 145 | Description: The body is too large to be permissible for the endpoint. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit. |
121 | HttpStatus: 413 | 146 | HttpStatus: 413 |
122 | 147 | ||
123 | 148 | ||
124 | # 40-49: available for future use | 149 | # 40-49: access control issues |
150 | Value: 0040 | ||
151 | Name: GENERIC_UNAUTHORIZED | ||
152 | Description: The service refused the request due to lack of proper authorization. | ||
153 | HttpStatus: 401 | ||
154 | |||
155 | Value: 0041 | ||
156 | Name: GENERIC_TOKEN_UNKNOWN | ||
157 | Description: The service refused the request as the given authorization token is unknown. | ||
158 | HttpStatus: 401 | ||
159 | |||
160 | Value: 0042 | ||
161 | Name: GENERIC_TOKEN_EXPIRED | ||
162 | Description: The service refused the request as the given authorization token expired. | ||
163 | HttpStatus: 401 | ||
125 | 164 | ||
165 | Value: 0043 | ||
166 | Name: GENERIC_TOKEN_MALFORMED | ||
167 | Description: The service refused the request as the given authorization token is malformed. | ||
168 | HttpStatus: 401 | ||
126 | 169 | ||
170 | Value: 0044 | ||
171 | Name: GENERIC_FORBIDDEN | ||
172 | Description: The service refused the request due to lack of proper rights on the resource. | ||
173 | HttpStatus: 403 | ||
127 | 174 | ||
128 | # Server-side database problems (50-59) | 175 | # Server-side database problems (50-59) |
129 | 176 | ||
130 | Value: 50 | 177 | Value: 0050 |
131 | Name: GENERIC_DB_SETUP_FAILED | 178 | Name: GENERIC_DB_SETUP_FAILED |
132 | Description: The service failed initialize its connection to the database. | 179 | Description: The service failed initialize its connection to the database. The system administrator should check that the service has permissions to access the database and that the database is running. |
133 | HttpStatus: 500 | 180 | HttpStatus: 500 |
134 | 181 | ||
135 | Value: 51 | 182 | Value: 0051 |
136 | Name: GENERIC_DB_START_FAILED | 183 | Name: GENERIC_DB_START_FAILED |
137 | Description: The service encountered an error event to just start the database transaction. | 184 | Description: The service encountered an error event to just start the database transaction. The system administrator should check that the database is running. |
138 | HttpStatus: 500 | 185 | HttpStatus: 500 |
139 | 186 | ||
140 | Value: 52 | 187 | Value: 0052 |
141 | Name: GENERIC_DB_STORE_FAILED | 188 | Name: GENERIC_DB_STORE_FAILED |
142 | Description: The service failed to store information in its database. | 189 | Description: The service failed to store information in its database. The system administrator should check that the database is running and review the service logs. |
143 | HttpStatus: 500 | 190 | HttpStatus: 500 |
144 | 191 | ||
145 | Value: 53 | 192 | Value: 0053 |
146 | Name: GENERIC_DB_FETCH_FAILED | 193 | Name: GENERIC_DB_FETCH_FAILED |
147 | Description: The service failed to fetch information from its database. | 194 | Description: The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs. |
148 | HttpStatus: 500 | 195 | HttpStatus: 500 |
149 | 196 | ||
150 | Value: 54 | 197 | Value: 0054 |
151 | Name: GENERIC_DB_COMMIT_FAILED | 198 | Name: GENERIC_DB_COMMIT_FAILED |
152 | Description: The service encountered an error event to commit the database transaction (hard, unrecoverable error). | 199 | Description: The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs. |
153 | HttpStatus: 500 | 200 | HttpStatus: 500 |
154 | 201 | ||
155 | Value: 55 | 202 | Value: 0055 |
156 | Name: GENERIC_DB_SOFT_FAILURE | 203 | Name: GENERIC_DB_SOFT_FAILURE |
157 | Description: The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. (This indicates a repeated serialization error; should only happen if some client maliciously tries to create conflicting concurrent transactions.) | 204 | Description: The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. This indicates a repeated serialization error; it should only happen if some client maliciously tries to create conflicting concurrent transactions. It could also be a sign of a missing index. Check if you are using the latest available version and/or file a report with the developers. |
158 | HttpStatus: 500 | 205 | HttpStatus: 500 |
159 | 206 | ||
160 | Value: 56 | 207 | Value: 0056 |
161 | Name: GENERIC_DB_INVARIANT_FAILURE | 208 | Name: GENERIC_DB_INVARIANT_FAILURE |
162 | Description: The service's database is inconsistent and violates service-internal invariants. | 209 | Description: The service's database is inconsistent and violates service-internal invariants. Check if you are using the latest available version and/or file a report with the developers. |
163 | HttpStatus: 500 | 210 | HttpStatus: 500 |
164 | 211 | ||
165 | 212 | ||
166 | # Server-side computational problems (60-69) | 213 | # Server-side computational problems (60-69) |
167 | 214 | ||
168 | Value: 60 | 215 | Value: 0060 |
169 | Name: GENERIC_INTERNAL_INVARIANT_FAILURE | 216 | Name: GENERIC_INTERNAL_INVARIANT_FAILURE |
170 | Description: The HTTP server experienced an internal invariant failure (bug). | 217 | Description: The HTTP server experienced an internal invariant failure (bug). Check if you are using the latest available version and/or file a report with the developers. |
171 | HttpStatus: 500 | 218 | HttpStatus: 500 |
172 | 219 | ||
173 | Value: 61 | 220 | Value: 0061 |
174 | Name: GENERIC_FAILED_COMPUTE_JSON_HASH | 221 | Name: GENERIC_FAILED_COMPUTE_JSON_HASH |
175 | Description: The service could not compute a cryptographic hash over some JSON value. | 222 | Description: The service could not compute a cryptographic hash over some JSON value. Check if you are using the latest available version and/or file a report with the developers. |
223 | HttpStatus: 500 | ||
224 | |||
225 | Value: 0062 | ||
226 | Name: GENERIC_FAILED_COMPUTE_AMOUNT | ||
227 | Description: The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers. | ||
176 | HttpStatus: 500 | 228 | HttpStatus: 500 |
177 | 229 | ||
178 | 230 | ||
179 | # Server-side resource problems (70-79) | 231 | # Server-side resource problems (70-79) |
180 | 232 | ||
181 | Value: 70 | 233 | Value: 0070 |
182 | Name: GENERIC_PARSER_OUT_OF_MEMORY | 234 | Name: GENERIC_PARSER_OUT_OF_MEMORY |
183 | Description: The HTTP server had insufficient memory to parse the request. | 235 | Description: The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. |
184 | HttpStatus: 500 | 236 | HttpStatus: 500 |
185 | 237 | ||
186 | Value: 71 | 238 | Value: 0071 |
187 | Name: GENERIC_ALLOCATION_FAILURE | 239 | Name: GENERIC_ALLOCATION_FAILURE |
188 | Description: The HTTP server failed to allocate memory. | 240 | Description: The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. |
189 | HttpStatus: 500 | 241 | HttpStatus: 500 |
190 | 242 | ||
191 | Value: 72 | 243 | Value: 0072 |
192 | Name: GENERIC_JSON_ALLOCATION_FAILURE | 244 | Name: GENERIC_JSON_ALLOCATION_FAILURE |
193 | Description: The HTTP server failed to allocate memory for building JSON reply. | 245 | Description: The HTTP server failed to allocate memory for building JSON reply. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. |
194 | HttpStatus: 500 | 246 | HttpStatus: 500 |
195 | 247 | ||
196 | Value: 73 | 248 | Value: 0073 |
197 | Name: GENERIC_CURL_ALLOCATION_FAILURE | 249 | Name: GENERIC_CURL_ALLOCATION_FAILURE |
198 | Description: The HTTP server failed to allocate memory for making a CURL request. | 250 | Description: The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. |
251 | HttpStatus: 500 | ||
252 | |||
253 | Value: 0074 | ||
254 | Name: GENERIC_FAILED_TO_LOAD_TEMPLATE | ||
255 | Description: The backend could not locate a required template to generate an HTML reply. The system administrator should check if the resource files are installed in the correct location and are readable to the service. | ||
256 | HttpStatus: 500 | ||
257 | |||
258 | Value: 0075 | ||
259 | Name: GENERIC_FAILED_TO_EXPAND_TEMPLATE | ||
260 | Description: The backend could not expand the template to generate an HTML reply. The system administrator should investigate the logs and check if the templates are well-formed. | ||
199 | HttpStatus: 500 | 261 | HttpStatus: 500 |
200 | 262 | ||
201 | # 80-99: available for future use | ||
202 | 263 | ||
203 | 264 | ||
265 | # 0080-0099: available for future use | ||
204 | 266 | ||
205 | # 100 - 999: VERBOTEN due to confusion with HTTP status codes (at least 100-599). | 267 | |
268 | |||
269 | # 0100 - 0999: VERBOTEN due to confusion with HTTP status codes (at least 100-599). | ||
206 | 270 | ||
207 | # 1000 - 1999: Reserved for exchange | 271 | # 1000 - 1999: Reserved for exchange |
208 | # 1000 - 1099: Reserved for EXCHANGE_GENERIC | 272 | # 1000 - 1099: Reserved for EXCHANGE_GENERIC |
@@ -245,7 +309,7 @@ HttpStatus: 403 | |||
245 | Value: 1007 | 309 | Value: 1007 |
246 | Name: EXCHANGE_GENERIC_KEYS_MISSING | 310 | Name: EXCHANGE_GENERIC_KEYS_MISSING |
247 | Description: The exchange failed to perform the operation as it could not find the private keys. This is a problem with the exchange setup, not with the client's request. | 311 | Description: The exchange failed to perform the operation as it could not find the private keys. This is a problem with the exchange setup, not with the client's request. |
248 | HttpStatus: 500 | 312 | HttpStatus: 503 |
249 | 313 | ||
250 | Value: 1008 | 314 | Value: 1008 |
251 | Name: EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE | 315 | Name: EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE |
@@ -262,6 +326,142 @@ Name: EXCHANGE_GENERIC_DENOMINATION_REVOKED | |||
262 | Description: Denomination key of the coin has been revoked. | 326 | Description: Denomination key of the coin has been revoked. |
263 | HttpStatus: 410 | 327 | HttpStatus: 410 |
264 | 328 | ||
329 | Value: 1011 | ||
330 | Name: EXCHANGE_GENERIC_SECMOD_TIMEOUT | ||
331 | Description: An operation where the exchange interacted with a security module timed out. | ||
332 | HttpStatus: 500 | ||
333 | |||
334 | Value: 1012 | ||
335 | Name: EXCHANGE_GENERIC_INSUFFICIENT_FUNDS | ||
336 | Description: The respective coin did not have sufficient residual value for the operation. The "history" in this response provides the "residual_value" of the coin, which may be less than its "original_value". | ||
337 | HttpStatus: 409 | ||
338 | |||
339 | Value: 1013 | ||
340 | Name: EXCHANGE_GENERIC_COIN_HISTORY_COMPUTATION_FAILED | ||
341 | Description: The exchange had an internal error reconstructing the transaction history of the coin that was being processed. | ||
342 | HttpStatus: 500 | ||
343 | |||
344 | Value: 1014 | ||
345 | Name: EXCHANGE_GENERIC_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS | ||
346 | Description: The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors. | ||
347 | HttpStatus: 500 | ||
348 | |||
349 | Value: 1015 | ||
350 | Name: EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH | ||
351 | Description: The same coin was already used with a different age hash previously. | ||
352 | HttpStatus: 409 | ||
353 | |||
354 | Value: 1016 | ||
355 | Name: EXCHANGE_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION | ||
356 | Description: The requested operation is not valid for the cipher used by the selected denomination. | ||
357 | HttpStatus: 400 | ||
358 | |||
359 | Value: 1017 | ||
360 | Name: EXCHANGE_GENERIC_CIPHER_MISMATCH | ||
361 | Description: The provided arguments for the operation use inconsistent ciphers. | ||
362 | HttpStatus: 400 | ||
363 | |||
364 | Value: 1018 | ||
365 | Name: EXCHANGE_GENERIC_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE | ||
366 | Description: The number of denominations specified in the request exceeds the limit of the exchange. | ||
367 | HttpStatus: 400 | ||
368 | |||
369 | Value: 1019 | ||
370 | Name: EXCHANGE_GENERIC_COIN_UNKNOWN | ||
371 | Description: The coin is not known to the exchange (yet). | ||
372 | HttpStatus: 404 | ||
373 | |||
374 | Value: 1020 | ||
375 | Name: EXCHANGE_GENERIC_CLOCK_SKEW | ||
376 | Description: The time at the server is too far off from the time specified in the request. Most likely the client system time is wrong. | ||
377 | HttpStatus: 400 | ||
378 | |||
379 | Value: 1021 | ||
380 | Name: EXCHANGE_GENERIC_AMOUNT_EXCEEDS_DENOMINATION_VALUE | ||
381 | Description: The specified amount for the coin is higher than the value of the denomination of the coin. | ||
382 | HttpStatus: 400 | ||
383 | |||
384 | Value: 1022 | ||
385 | Name: EXCHANGE_GENERIC_GLOBAL_FEES_MISSING | ||
386 | Description: The exchange was not properly configured with global fees. | ||
387 | HttpStatus: 500 | ||
388 | |||
389 | Value: 1023 | ||
390 | Name: EXCHANGE_GENERIC_WIRE_FEES_MISSING | ||
391 | Description: The exchange was not properly configured with wire fees. | ||
392 | HttpStatus: 500 | ||
393 | |||
394 | Value: 1024 | ||
395 | Name: EXCHANGE_GENERIC_PURSE_PUB_MALFORMED | ||
396 | Description: The purse public key was malformed. | ||
397 | HttpStatus: 400 | ||
398 | |||
399 | Value: 1025 | ||
400 | Name: EXCHANGE_GENERIC_PURSE_UNKNOWN | ||
401 | Description: The purse is unknown. | ||
402 | HttpStatus: 404 | ||
403 | |||
404 | Value: 1026 | ||
405 | Name: EXCHANGE_GENERIC_PURSE_EXPIRED | ||
406 | Description: The purse has expired. | ||
407 | HttpStatus: 410 | ||
408 | |||
409 | Value: 1027 | ||
410 | Name: EXCHANGE_GENERIC_RESERVE_UNKNOWN | ||
411 | Description: The exchange has no information about the "reserve_pub" that was given. | ||
412 | HttpStatus: 404 | ||
413 | |||
414 | Value: 1028 | ||
415 | Name: EXCHANGE_GENERIC_KYC_REQUIRED | ||
416 | Description: The exchange is not allowed to proceed with the operation until the client has satisfied a KYC check. | ||
417 | HttpStatus: 451 | ||
418 | |||
419 | Value: 1029 | ||
420 | Name: EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT | ||
421 | Description: Inconsistency between provided age commitment and attest: either none or both must be provided | ||
422 | HttpStatus: 400 | ||
423 | |||
424 | Value: 1030 | ||
425 | Name: EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE | ||
426 | Description: The provided attestation for the minimum age couldn't be verified by the exchange. | ||
427 | HttpStatus: 400 | ||
428 | |||
429 | Value: 1031 | ||
430 | Name: EXCHANGE_GENERIC_PURSE_DELETED | ||
431 | Description: The purse was deleted. | ||
432 | HttpStatus: 410 | ||
433 | |||
434 | Value: 1032 | ||
435 | Name: EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED | ||
436 | Description: The public key of the AML officer in the URL was malformed. | ||
437 | HttpStatus: 400 | ||
438 | |||
439 | Value: 1033 | ||
440 | Name: EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID | ||
441 | Description: The signature affirming the GET request of the AML officer is invalid. | ||
442 | HttpStatus: 403 | ||
443 | |||
444 | Value: 1034 | ||
445 | Name: EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED | ||
446 | Description: The specified AML officer does not have access at this time. | ||
447 | HttpStatus: 403 | ||
448 | |||
449 | Value: 1035 | ||
450 | Name: EXCHANGE_GENERIC_AML_PENDING | ||
451 | Description: The requested operation is denied pending the resolution of an anti-money laundering investigation by the exchange operator. This is a manual process, please wait and retry later. | ||
452 | HttpStatus: 451 | ||
453 | |||
454 | Value: 1036 | ||
455 | Name: EXCHANGE_GENERIC_AML_FROZEN | ||
456 | Description: The requested operation is denied as the account was frozen on suspicion of money laundering. Please contact the exchange operator. | ||
457 | HttpStatus: 451 | ||
458 | |||
459 | Value: 1037 | ||
460 | Name: EXCHANGE_GENERIC_KYC_CONVERTER_FAILED | ||
461 | Description: The exchange failed to start a KYC attribute conversion helper process. It is likely configured incorrectly. | ||
462 | HttpStatus: 500 | ||
463 | |||
464 | |||
265 | Value: 1100 | 465 | Value: 1100 |
266 | Name: EXCHANGE_DEPOSITS_GET_NOT_FOUND | 466 | Name: EXCHANGE_DEPOSITS_GET_NOT_FOUND |
267 | Description: The exchange did not find information about the specified transaction in the database. | 467 | Description: The exchange did not find information about the specified transaction in the database. |
@@ -297,15 +497,20 @@ Name: EXCHANGE_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID | |||
297 | Description: The signature of the merchant is invalid. | 497 | Description: The signature of the merchant is invalid. |
298 | HttpStatus: 403 | 498 | HttpStatus: 403 |
299 | 499 | ||
500 | Value: 1107 | ||
501 | Name: EXCHANGE_DEPOSITS_POLICY_NOT_ACCEPTED | ||
502 | Description: The provided policy data was not accepted | ||
503 | HttpStatus: 400 | ||
504 | |||
300 | Value: 1150 | 505 | Value: 1150 |
301 | Name: EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS | 506 | Name: EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS |
302 | Description: The given reserve does not have sufficient funds to admit the requested withdraw operation at this time. The response includes the current "balance" of the reserve as well as the transaction "history" that lead to this balance. | 507 | Description: The given reserve does not have sufficient funds to admit the requested withdraw operation at this time. The response includes the current "balance" of the reserve as well as the transaction "history" that lead to this balance. |
303 | HttpStatus: 409 | 508 | HttpStatus: 409 |
304 | 509 | ||
305 | Value: 1151 | 510 | Value: 1151 |
306 | Name: EXCHANGE_WITHDRAW_RESERVE_UNKNOWN | 511 | Name: EXCHANGE_AGE_WITHDRAW_INSUFFICIENT_FUNDS |
307 | Description: The exchange has no information about the "reserve_pub" that was given. | 512 | Description: The given reserve does not have sufficient funds to admit the requested age-withdraw operation at this time. The response includes the current "balance" of the reserve as well as the transaction "history" that lead to this balance. |
308 | HttpStatus: 404 | 513 | HttpStatus: 409 |
309 | 514 | ||
310 | Value: 1152 | 515 | Value: 1152 |
311 | Name: EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW | 516 | Name: EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW |
@@ -323,10 +528,15 @@ Description: The signature of the reserve is not valid. | |||
323 | HttpStatus: 403 | 528 | HttpStatus: 403 |
324 | 529 | ||
325 | Value: 1155 | 530 | Value: 1155 |
326 | Name: EXCHANGE_WITHDRAW_HISTORY_ERROR_INSUFFICIENT_FUNDS | 531 | Name: EXCHANGE_RESERVE_HISTORY_ERROR_INSUFFICIENT_FUNDS |
327 | Description: When computing the reserve history, we ended up with a negative overall balance, which should be impossible. | 532 | Description: When computing the reserve history, we ended up with a negative overall balance, which should be impossible. |
328 | HttpStatus: 500 | 533 | HttpStatus: 500 |
329 | 534 | ||
535 | Value: 1156 | ||
536 | Name: EXCHANGE_GET_RESERVE_HISTORY_ERROR_INSUFFICIENT_BALANCE | ||
537 | Description: The reserve did not have sufficient funds in it to pay for a full reserve history statement. | ||
538 | HttpStatus: 409 | ||
539 | |||
330 | Value: 1158 | 540 | Value: 1158 |
331 | Name: EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST | 541 | Name: EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST |
332 | Description: Withdraw period of the coin to be withdrawn is in the past. | 542 | Description: Withdraw period of the coin to be withdrawn is in the past. |
@@ -337,9 +547,39 @@ Name: EXCHANGE_WITHDRAW_UNBLIND_FAILURE | |||
337 | Description: The client failed to unblind the blind signature. | 547 | Description: The client failed to unblind the blind signature. |
338 | HttpStatus: 0 | 548 | HttpStatus: 0 |
339 | 549 | ||
340 | Value: 1200 | 550 | Value: 1160 |
341 | Name: EXCHANGE_DEPOSIT_INSUFFICIENT_FUNDS | 551 | Name: EXCHANGE_WITHDRAW_NONCE_REUSE |
342 | Description: The respective coin did not have sufficient residual value for the /deposit operation (i.e. due to double spending). The "history" in the response provides the transaction history of the coin proving this fact. | 552 | Description: The client re-used a withdraw nonce, which is not allowed. |
553 | HttpStatus: 409 | ||
554 | |||
555 | Value: 1161 | ||
556 | Name: EXCHANGE_AGE_WITHDRAW_COMMITMENT_UNKNOWN | ||
557 | Description: The client provided an unknown commitment for an age-withdraw request. | ||
558 | HttpStatus: 400 | ||
559 | |||
560 | Value: 1162 | ||
561 | Name: EXCHANGE_AGE_WITHDRAW_AMOUNT_OVERFLOW | ||
562 | Description: The total sum of amounts from the denominations did overflow. | ||
563 | HttpStatus: 500 | ||
564 | |||
565 | Value: 1163 | ||
566 | Name: EXCHANGE_AGE_WITHDRAW_AMOUNT_INCORRECT | ||
567 | Description: The total sum of value and fees from the denominations differs from the committed amount with fees. | ||
568 | HttpStatus: 400 | ||
569 | |||
570 | Value: 1164 | ||
571 | Name: EXCHANGE_AGE_WITHDRAW_REVEAL_INVALID_HASH | ||
572 | Description: The original commitment differs from the calculated hash | ||
573 | HttpStatus: 400 | ||
574 | |||
575 | Value: 1165 | ||
576 | Name: EXCHANGE_AGE_WITHDRAW_MAXIMUM_AGE_TOO_LARGE | ||
577 | Description: The maximum age in the commitment is too large for the reserve | ||
578 | HttpStatus: 409 | ||
579 | |||
580 | Value: 1175 | ||
581 | Name: EXCHANGE_WITHDRAW_BATCH_IDEMPOTENT_PLANCHET | ||
582 | Description: The batch withdraw included a planchet that was already withdrawn. This is not allowed. | ||
343 | HttpStatus: 409 | 583 | HttpStatus: 409 |
344 | 584 | ||
345 | Value: 1205 | 585 | Value: 1205 |
@@ -347,6 +587,11 @@ Name: EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID | |||
347 | Description: The signature made by the coin over the deposit permission is not valid. | 587 | Description: The signature made by the coin over the deposit permission is not valid. |
348 | HttpStatus: 403 | 588 | HttpStatus: 403 |
349 | 589 | ||
590 | Value: 1206 | ||
591 | Name: EXCHANGE_DEPOSIT_CONFLICTING_CONTRACT | ||
592 | Description: The same coin was already deposited for the same merchant and contract with other details. | ||
593 | HttpStatus: 409 | ||
594 | |||
350 | Value: 1207 | 595 | Value: 1207 |
351 | Name: EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE | 596 | Name: EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE |
352 | Description: The stated value of the coin after the deposit fee is subtracted would be negative. | 597 | Description: The stated value of the coin after the deposit fee is subtracted would be negative. |
@@ -357,6 +602,11 @@ Name: EXCHANGE_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE | |||
357 | Description: The stated refund deadline is after the wire deadline. | 602 | Description: The stated refund deadline is after the wire deadline. |
358 | HttpStatus: 400 | 603 | HttpStatus: 400 |
359 | 604 | ||
605 | Value: 1209 | ||
606 | Name: EXCHANGE_DEPOSIT_WIRE_DEADLINE_IS_NEVER | ||
607 | Description: The stated wire deadline is "never", which makes no sense. | ||
608 | HttpStatus: 400 | ||
609 | |||
360 | Value: 1210 | 610 | Value: 1210 |
361 | Name: EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON | 611 | Name: EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON |
362 | Description: The exchange failed to canonicalize and hash the given wire format. For example, the merchant failed to provide the "salt" or a valid payto:// URI in the wire details. Note that while the exchange will do some basic sanity checking on the wire details, it cannot warrant that the banking system will ultimately be able to route to the specified address, even if this check passed. | 612 | Description: The exchange failed to canonicalize and hash the given wire format. For example, the merchant failed to provide the "salt" or a valid payto:// URI in the wire details. Note that while the exchange will do some basic sanity checking on the wire details, it cannot warrant that the banking system will ultimately be able to route to the specified address, even if this check passed. |
@@ -378,20 +628,22 @@ Description: The deposited amount is smaller than the deposit fee, which would r | |||
378 | HttpStatus: 400 | 628 | HttpStatus: 400 |
379 | 629 | ||
380 | 630 | ||
381 | Value: 1250 | 631 | Value: 1240 |
382 | Name: EXCHANGE_RESERVES_GET_STATUS_UNKNOWN | 632 | Name: EXCHANGE_EXTENSIONS_INVALID_FULFILLMENT |
383 | Description: The reserve status was requested using a unknown key. | 633 | Description: The proof of policy fulfillment was invalid. |
384 | HttpStatus: 404 | 634 | HttpStatus: 400 |
385 | 635 | ||
386 | Value: 1300 | ||
387 | Name: EXCHANGE_MELT_INSUFFICIENT_FUNDS | ||
388 | Description: The respective coin did not have sufficient residual value for the /refresh/melt operation. The "history" in this response provdes the "residual_value" of the coin, which may be less than its "original_value". | ||
389 | HttpStatus: 409 | ||
390 | 636 | ||
391 | Value: 1301 | 637 | Value: 1251 |
392 | Name: EXCHANGE_MELT_COIN_HISTORY_COMPUTATION_FAILED | 638 | Name: EXCHANGE_COIN_HISTORY_BAD_SIGNATURE |
393 | Description: The exchange had an internal error reconstructing the transaction history of the coin that was being melted. | 639 | Description: The coin history was requested with a bad signature. |
394 | HttpStatus: 500 | 640 | HttpStatus: 403 |
641 | |||
642 | Value: 1252 | ||
643 | Name: EXCHANGE_RESERVE_HISTORY_BAD_SIGNATURE | ||
644 | Description: The reserve history was requested with a bad signature. | ||
645 | HttpStatus: 403 | ||
646 | |||
395 | 647 | ||
396 | Value: 1302 | 648 | Value: 1302 |
397 | Name: EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION | 649 | Name: EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION |
@@ -403,11 +655,6 @@ Name: EXCHANGE_MELT_COIN_SIGNATURE_INVALID | |||
403 | Description: The signature made with the coin to be melted is invalid. | 655 | Description: The signature made with the coin to be melted is invalid. |
404 | HttpStatus: 403 | 656 | HttpStatus: 403 |
405 | 657 | ||
406 | Value: 1304 | ||
407 | Name: EXCHANGE_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS | ||
408 | Description: The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors. | ||
409 | HttpStatus: 500 | ||
410 | |||
411 | Value: 1305 | 658 | Value: 1305 |
412 | Name: EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE | 659 | Name: EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE |
413 | Description: The denomination of the given coin has past its expiration date and it is also not a valid zombie (that is, was not refreshed with the fresh coin being subjected to recoup). | 660 | Description: The denomination of the given coin has past its expiration date and it is also not a valid zombie (that is, was not refreshed with the fresh coin being subjected to recoup). |
@@ -439,11 +686,6 @@ Name: EXCHANGE_REFRESHES_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID | |||
439 | Description: The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1. | 686 | Description: The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1. |
440 | HttpStatus: 400 | 687 | HttpStatus: 400 |
441 | 688 | ||
442 | Value: 1357 | ||
443 | Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE | ||
444 | Description: The number of coins to be created in refresh exceeds the limits of the exchange. private transfer keys request does not match #TALER_CNC_KAPPA - 1. | ||
445 | HttpStatus: 400 | ||
446 | |||
447 | Value: 1358 | 689 | Value: 1358 |
448 | Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH | 690 | Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH |
449 | Description: The number of envelopes given does not match the number of denomination keys given. | 691 | Description: The number of envelopes given does not match the number of denomination keys given. |
@@ -474,6 +716,17 @@ Name: EXCHANGE_REFRESHES_REVEAL_OPERATION_INVALID | |||
474 | Description: Operation specified invalid for this endpoint. | 716 | Description: Operation specified invalid for this endpoint. |
475 | HttpStatus: 400 | 717 | HttpStatus: 400 |
476 | 718 | ||
719 | Value: 1364 | ||
720 | Name: EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_NOT_SUPPORTED | ||
721 | Description: The client provided age commitment data, but age restriction is not supported on this server. | ||
722 | HttpStatus: 400 | ||
723 | |||
724 | Value: 1365 | ||
725 | Name: EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_COMMITMENT_INVALID | ||
726 | Description: The client provided invalid age commitment data: missing, not an array, or array of invalid size. | ||
727 | HttpStatus: 400 | ||
728 | |||
729 | |||
477 | Value: 1400 | 730 | Value: 1400 |
478 | Name: EXCHANGE_LINK_COIN_UNKNOWN | 731 | Name: EXCHANGE_LINK_COIN_UNKNOWN |
479 | Description: The coin specified in the link request is unknown to the exchange. | 732 | Description: The coin specified in the link request is unknown to the exchange. |
@@ -499,6 +752,16 @@ Name: EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT | |||
499 | Description: The exchange found a wire fee that was above the total transfer value (and thus could not have been charged). | 752 | Description: The exchange found a wire fee that was above the total transfer value (and thus could not have been charged). |
500 | HttpStatus: 500 | 753 | HttpStatus: 500 |
501 | 754 | ||
755 | Value: 1475 | ||
756 | Name: EXCHANGE_PURSES_INVALID_WAIT_TARGET | ||
757 | Description: The wait target of the URL was not in the set of expected values. | ||
758 | HttpStatus: 400 | ||
759 | |||
760 | Value: 1476 | ||
761 | Name: EXCHANGE_PURSES_GET_INVALID_SIGNATURE_BY_EXCHANGE | ||
762 | Description: The signature on the purse status returned by the exchange was invalid. | ||
763 | HttpStatus: 0 | ||
764 | |||
502 | 765 | ||
503 | Value: 1500 | 766 | Value: 1500 |
504 | Name: EXCHANGE_REFUND_COIN_NOT_FOUND | 767 | Name: EXCHANGE_REFUND_COIN_NOT_FOUND |
@@ -569,6 +832,7 @@ Value: 1552 | |||
569 | Name: EXCHANGE_RECOUP_COIN_BALANCE_ZERO | 832 | Name: EXCHANGE_RECOUP_COIN_BALANCE_ZERO |
570 | Description: The coin's remaining balance is zero. The request is denied. | 833 | Description: The coin's remaining balance is zero. The request is denied. |
571 | HttpStatus: 403 | 834 | HttpStatus: 403 |
835 | Note: dead in latest cde | ||
572 | 836 | ||
573 | Value: 1553 | 837 | Value: 1553 |
574 | Name: EXCHANGE_RECOUP_BLINDING_FAILED | 838 | Name: EXCHANGE_RECOUP_BLINDING_FAILED |
@@ -579,12 +843,33 @@ Value: 1554 | |||
579 | Name: EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE | 843 | Name: EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE |
580 | Description: The coin's remaining balance is zero. The request is denied. | 844 | Description: The coin's remaining balance is zero. The request is denied. |
581 | HttpStatus: 500 | 845 | HttpStatus: 500 |
846 | Note: dead in latest cde | ||
582 | 847 | ||
583 | Value: 1555 | 848 | Value: 1555 |
584 | Name: EXCHANGE_RECOUP_NOT_ELIGIBLE | 849 | Name: EXCHANGE_RECOUP_NOT_ELIGIBLE |
585 | Description: The coin's denomination has not been revoked yet. | 850 | Description: The coin's denomination has not been revoked yet. |
586 | HttpStatus: 404 | 851 | HttpStatus: 404 |
587 | 852 | ||
853 | Value: 1575 | ||
854 | Name: EXCHANGE_RECOUP_REFRESH_SIGNATURE_INVALID | ||
855 | Description: The given coin signature is invalid for the request. | ||
856 | HttpStatus: 403 | ||
857 | |||
858 | Value: 1576 | ||
859 | Name: EXCHANGE_RECOUP_REFRESH_MELT_NOT_FOUND | ||
860 | Description: The exchange could not find the corresponding melt operation. The request is denied. | ||
861 | HttpStatus: 404 | ||
862 | |||
863 | Value: 1578 | ||
864 | Name: EXCHANGE_RECOUP_REFRESH_BLINDING_FAILED | ||
865 | Description: The exchange failed to reproduce the coin's blinding. | ||
866 | HttpStatus: 500 | ||
867 | |||
868 | Value: 1580 | ||
869 | Name: EXCHANGE_RECOUP_REFRESH_NOT_ELIGIBLE | ||
870 | Description: The coin's denomination has not been revoked yet. | ||
871 | HttpStatus: 404 | ||
872 | |||
588 | 873 | ||
589 | Value: 1600 | 874 | Value: 1600 |
590 | Name: EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN | 875 | Name: EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN |
@@ -612,10 +897,45 @@ Description: No wire fees are configured for an enabled wire method of the excha | |||
612 | HttpStatus: 500 | 897 | HttpStatus: 500 |
613 | 898 | ||
614 | 899 | ||
900 | Value: 1675 | ||
901 | Name: EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA | ||
902 | Description: This purse was previously created with different meta data. | ||
903 | HttpStatus: 409 | ||
904 | |||
905 | Value: 1676 | ||
906 | Name: EXCHANGE_RESERVES_PURSE_MERGE_CONFLICTING_META_DATA | ||
907 | Description: This purse was previously merged with different meta data. | ||
908 | HttpStatus: 409 | ||
909 | |||
910 | Value: 1677 | ||
911 | Name: EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS | ||
912 | Description: The reserve has insufficient funds to create another purse. | ||
913 | HttpStatus: 409 | ||
914 | |||
915 | Value: 1678 | ||
916 | Name: EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW | ||
917 | Description: The purse fee specified for the request is lower than the purse fee charged by the exchange at this time. | ||
918 | HttpStatus: 400 | ||
919 | |||
920 | Value: 1679 | ||
921 | Name: EXCHANGE_PURSE_DELETE_ALREADY_DECIDED | ||
922 | Description: The payment request cannot be deleted anymore, as it either already completed or timed out. | ||
923 | HttpStatus: 409 | ||
924 | |||
925 | Value: 1680 | ||
926 | Name: EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID | ||
927 | Description: The signature affirming the purse deletion is invalid. | ||
928 | HttpStatus: 403 | ||
929 | |||
930 | Value: 1681 | ||
931 | Name: EXCHANGE_RESERVES_AGE_RESTRICTION_REQUIRED | ||
932 | Description: Withdrawal from the reserve requires age restriction to be set. | ||
933 | HttpStatus: 403 | ||
934 | |||
615 | Value: 1700 | 935 | Value: 1700 |
616 | Name: EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE | 936 | Name: EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE |
617 | Description: The exchange failed to talk to the process responsible for its private denomination keys. | 937 | Description: The exchange failed to talk to the process responsible for its private denomination keys or the helpers had no denominations (properly) configured. |
618 | HttpStatus: 500 | 938 | HttpStatus: 502 |
619 | 939 | ||
620 | Value: 1701 | 940 | Value: 1701 |
621 | Name: EXCHANGE_DENOMINATION_HELPER_BUG | 941 | Name: EXCHANGE_DENOMINATION_HELPER_BUG |
@@ -627,10 +947,16 @@ Name: EXCHANGE_DENOMINATION_HELPER_TOO_EARLY | |||
627 | Description: The helper refuses to sign with the key, because it is too early: the validity period has not yet started. | 947 | Description: The helper refuses to sign with the key, because it is too early: the validity period has not yet started. |
628 | HttpStatus: 400 | 948 | HttpStatus: 400 |
629 | 949 | ||
950 | Value: 1725 | ||
951 | Name: EXCHANGE_PURSE_DEPOSIT_EXCHANGE_SIGNATURE_INVALID | ||
952 | Description: The signature of the exchange on the reply was invalid. | ||
953 | HttpStatus: 0 | ||
954 | |||
955 | |||
630 | Value: 1750 | 956 | Value: 1750 |
631 | Name: EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE | 957 | Name: EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE |
632 | Description: The exchange failed to talk to the process responsible for its private signing keys. | 958 | Description: The exchange failed to talk to the process responsible for its private signing keys. |
633 | HttpStatus: 500 | 959 | HttpStatus: 502 |
634 | 960 | ||
635 | Value: 1751 | 961 | Value: 1751 |
636 | Name: EXCHANGE_SIGNKEY_HELPER_BUG | 962 | Name: EXCHANGE_SIGNKEY_HELPER_BUG |
@@ -643,6 +969,51 @@ Description: The helper refuses to sign with the key, because it is too early: t | |||
643 | HttpStatus: 400 | 969 | HttpStatus: 400 |
644 | 970 | ||
645 | 971 | ||
972 | Value: 1775 | ||
973 | Name: EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW | ||
974 | Description: The purse expiration time is in the past at the time of its creation. | ||
975 | HttpStatus: 400 | ||
976 | |||
977 | Value: 1776 | ||
978 | Name: EXCHANGE_RESERVES_PURSE_EXPIRATION_IS_NEVER | ||
979 | Description: The purse expiration time is set to never, which is not allowed. | ||
980 | HttpStatus: 400 | ||
981 | |||
982 | Value: 1777 | ||
983 | Name: EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID | ||
984 | Description: The signature affirming the merge of the purse is invalid. | ||
985 | HttpStatus: 403 | ||
986 | |||
987 | Value: 1778 | ||
988 | Name: EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID | ||
989 | Description: The signature by the reserve affirming the merge is invalid. | ||
990 | HttpStatus: 403 | ||
991 | |||
992 | Value: 1785 | ||
993 | Name: EXCHANGE_RESERVES_OPEN_BAD_SIGNATURE | ||
994 | Description: The signature by the reserve affirming the open operation is invalid. | ||
995 | HttpStatus: 403 | ||
996 | |||
997 | Value: 1786 | ||
998 | Name: EXCHANGE_RESERVES_CLOSE_BAD_SIGNATURE | ||
999 | Description: The signature by the reserve affirming the close operation is invalid. | ||
1000 | HttpStatus: 403 | ||
1001 | |||
1002 | Value: 1787 | ||
1003 | Name: EXCHANGE_RESERVES_ATTEST_BAD_SIGNATURE | ||
1004 | Description: The signature by the reserve affirming the attestion request is invalid. | ||
1005 | HttpStatus: 403 | ||
1006 | |||
1007 | Value: 1788 | ||
1008 | Name: EXCHANGE_RESERVES_CLOSE_NO_TARGET_ACCOUNT | ||
1009 | Description: The exchange does not know an origin account to which the remaining reserve balance could be wired to, and the wallet failed to provide one. | ||
1010 | HttpStatus: 409 | ||
1011 | |||
1012 | Value: 1789 | ||
1013 | Name: EXCHANGE_RESERVES_OPEN_INSUFFICIENT_FUNDS | ||
1014 | Description: The reserve balance is insufficient to pay for the open operation. | ||
1015 | HttpStatus: 409 | ||
1016 | |||
646 | Value: 1800 | 1017 | Value: 1800 |
647 | Name: EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND | 1018 | Name: EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND |
648 | Description: The auditor that was supposed to be disabled is unknown to this exchange. | 1019 | Description: The auditor that was supposed to be disabled is unknown to this exchange. |
@@ -723,6 +1094,144 @@ Name: EXCHANGE_MANAGEMENT_KEYS_SIGNKEY_ADD_SIGNATURE_INVALID | |||
723 | Description: The signature affirming the signing key is invalid. | 1094 | Description: The signature affirming the signing key is invalid. |
724 | HttpStatus: 403 | 1095 | HttpStatus: 403 |
725 | 1096 | ||
1097 | Value: 1816 | ||
1098 | Name: EXCHANGE_MANAGEMENT_GLOBAL_FEE_MISMATCH | ||
1099 | Description: The signature conflicts with a previous signature affirming different fees. | ||
1100 | HttpStatus: 409 | ||
1101 | |||
1102 | Value: 1817 | ||
1103 | Name: EXCHANGE_MANAGEMENT_GLOBAL_FEE_SIGNATURE_INVALID | ||
1104 | Description: The signature affirming the fee structure is invalid. | ||
1105 | HttpStatus: 403 | ||
1106 | |||
1107 | Value: 1818 | ||
1108 | Name: EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID | ||
1109 | Description: The signature affirming the profit drain is invalid. | ||
1110 | HttpStatus: 403 | ||
1111 | |||
1112 | Value: 1825 | ||
1113 | Name: EXCHANGE_AML_DECISION_ADD_SIGNATURE_INVALID | ||
1114 | Description: The signature affirming the AML decision is invalid. | ||
1115 | HttpStatus: 403 | ||
1116 | |||
1117 | Value: 1826 | ||
1118 | Name: EXCHANGE_AML_DECISION_INVALID_OFFICER | ||
1119 | Description: The AML officer specified is not allowed to make AML decisions right now. | ||
1120 | HttpStatus: 403 | ||
1121 | |||
1122 | Value: 1827 | ||
1123 | Name: EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT | ||
1124 | Description: There is a more recent AML decision on file. The decision was rejected as timestamps of AML decisions must be monotonically increasing. | ||
1125 | HttpStatus: 409 | ||
1126 | |||
1127 | Value: 1828 | ||
1128 | Name: EXCHANGE_AML_DECISION_UNKNOWN_CHECK | ||
1129 | Description: There AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange. | ||
1130 | HttpStatus: 400 | ||
1131 | |||
1132 | Value: 1830 | ||
1133 | Name: EXCHANGE_MANAGEMENT_UPDATE_AML_OFFICER_SIGNATURE_INVALID | ||
1134 | Description: The signature affirming the change in the AML officer status is invalid. | ||
1135 | HttpStatus: 403 | ||
1136 | |||
1137 | Value: 1831 | ||
1138 | Name: EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT | ||
1139 | Description: A more recent decision about the AML officer status is known to the exchange. | ||
1140 | HttpStatus: 409 | ||
1141 | |||
1142 | |||
1143 | |||
1144 | |||
1145 | Value: 1850 | ||
1146 | Name: EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA | ||
1147 | Description: The purse was previously created with different meta data. | ||
1148 | HttpStatus: 409 | ||
1149 | |||
1150 | Value: 1851 | ||
1151 | Name: EXCHANGE_PURSE_CREATE_CONFLICTING_CONTRACT_STORED | ||
1152 | Description: The purse was previously created with a different contract. | ||
1153 | HttpStatus: 409 | ||
1154 | |||
1155 | Value: 1852 | ||
1156 | Name: EXCHANGE_PURSE_CREATE_COIN_SIGNATURE_INVALID | ||
1157 | Description: A coin signature for a deposit into the purse is invalid. | ||
1158 | HttpStatus: 403 | ||
1159 | |||
1160 | Value: 1853 | ||
1161 | Name: EXCHANGE_PURSE_CREATE_EXPIRATION_BEFORE_NOW | ||
1162 | Description: The purse expiration time is in the past. | ||
1163 | HttpStatus: 400 | ||
1164 | |||
1165 | Value: 1854 | ||
1166 | Name: EXCHANGE_PURSE_CREATE_EXPIRATION_IS_NEVER | ||
1167 | Description: The purse expiration time is "never". | ||
1168 | HttpStatus: 400 | ||
1169 | |||
1170 | Value: 1855 | ||
1171 | Name: EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID | ||
1172 | Description: The purse signature over the purse meta data is invalid. | ||
1173 | HttpStatus: 403 | ||
1174 | |||
1175 | Value: 1856 | ||
1176 | Name: EXCHANGE_PURSE_ECONTRACT_SIGNATURE_INVALID | ||
1177 | Description: The signature over the encrypted contract is invalid. | ||
1178 | HttpStatus: 403 | ||
1179 | |||
1180 | Value: 1857 | ||
1181 | Name: EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID | ||
1182 | Description: The signature from the exchange over the confirmation is invalid. | ||
1183 | HttpStatus: 0 | ||
1184 | |||
1185 | Value: 1858 | ||
1186 | Name: EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA | ||
1187 | Description: The coin was previously deposited with different meta data. | ||
1188 | HttpStatus: 409 | ||
1189 | |||
1190 | Value: 1859 | ||
1191 | Name: EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA | ||
1192 | Description: The encrypted contract was previously uploaded with different meta data. | ||
1193 | HttpStatus: 409 | ||
1194 | |||
1195 | Value: 1860 | ||
1196 | Name: EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE | ||
1197 | Description: The deposited amount is less than the purse fee. | ||
1198 | HttpStatus: 400 | ||
1199 | |||
1200 | Value: 1876 | ||
1201 | Name: EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE | ||
1202 | Description: The signature using the merge key is invalid. | ||
1203 | HttpStatus: 403 | ||
1204 | |||
1205 | Value: 1877 | ||
1206 | Name: EXCHANGE_PURSE_MERGE_INVALID_RESERVE_SIGNATURE | ||
1207 | Description: The signature using the reserve key is invalid. | ||
1208 | HttpStatus: 403 | ||
1209 | |||
1210 | Value: 1878 | ||
1211 | Name: EXCHANGE_PURSE_NOT_FULL | ||
1212 | Description: The targeted purse is not yet full and thus cannot be merged. Retrying the request later may succeed. | ||
1213 | HttpStatus: 409 | ||
1214 | |||
1215 | Value: 1879 | ||
1216 | Name: EXCHANGE_PURSE_MERGE_EXCHANGE_SIGNATURE_INVALID | ||
1217 | Description: The signature from the exchange over the confirmation is invalid. | ||
1218 | HttpStatus: 0 | ||
1219 | |||
1220 | Value: 1880 | ||
1221 | Name: EXCHANGE_MERGE_PURSE_PARTNER_UNKNOWN | ||
1222 | Description: The exchange of the target account is not a partner of this exchange. | ||
1223 | HttpStatus: 404 | ||
1224 | |||
1225 | Value: 1890 | ||
1226 | Name: EXCHANGE_MANAGEMENT_ADD_PARTNER_SIGNATURE_INVALID | ||
1227 | Description: The signature affirming the new partner is invalid. | ||
1228 | HttpStatus: 403 | ||
1229 | |||
1230 | Value: 1891 | ||
1231 | Name: EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT | ||
1232 | Description: Conflicting data for the partner already exists with the exchange. | ||
1233 | HttpStatus: 409 | ||
1234 | |||
726 | 1235 | ||
727 | Value: 1900 | 1236 | Value: 1900 |
728 | Name: EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID | 1237 | Name: EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID |
@@ -759,6 +1268,100 @@ Name: EXCHANGE_KYC_PROOF_BACKEND_AUTHORIZATION_FAILED | |||
759 | Description: The backend signaled an authorization failure. | 1268 | Description: The backend signaled an authorization failure. |
760 | HttpStatus: 403 | 1269 | HttpStatus: 403 |
761 | 1270 | ||
1271 | Value: 1929 | ||
1272 | Name: EXCHANGE_KYC_PROOF_REQUEST_UNKNOWN | ||
1273 | Description: The exchange is unaware of having made an the authorization request. | ||
1274 | HttpStatus: 404 | ||
1275 | |||
1276 | Value: 1930 | ||
1277 | Name: EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED | ||
1278 | Description: The payto-URI hash did not match. Hence the request was denied. | ||
1279 | HttpStatus: 403 | ||
1280 | |||
1281 | Value: 1931 | ||
1282 | Name: EXCHANGE_KYC_GENERIC_LOGIC_UNKNOWN | ||
1283 | Description: The request used a logic specifier that is not known to the exchange. | ||
1284 | HttpStatus: 404 | ||
1285 | |||
1286 | Value: 1932 | ||
1287 | Name: EXCHANGE_KYC_GENERIC_LOGIC_GONE | ||
1288 | Description: The request requires a logic which is no longer configured at the exchange. | ||
1289 | HttpStatus: 500 | ||
1290 | |||
1291 | Value: 1933 | ||
1292 | Name: EXCHANGE_KYC_GENERIC_LOGIC_BUG | ||
1293 | Description: The logic plugin had a bug in its interaction with the KYC provider. | ||
1294 | HttpStatus: 500 | ||
1295 | |||
1296 | Value: 1934 | ||
1297 | Name: EXCHANGE_KYC_GENERIC_PROVIDER_ACCESS_REFUSED | ||
1298 | Description: The exchange could not process the request with its KYC provider because the provider refused access to the service. This indicates some configuration issue at the Taler exchange operator. | ||
1299 | HttpStatus: 511 | ||
1300 | |||
1301 | Value: 1935 | ||
1302 | Name: EXCHANGE_KYC_GENERIC_PROVIDER_TIMEOUT | ||
1303 | Description: There was a timeout in the interaction between the exchange and the KYC provider. The most likely cause is some networking problem. Trying again later might succeed. | ||
1304 | HttpStatus: 504 | ||
1305 | |||
1306 | Value: 1936 | ||
1307 | Name: EXCHANGE_KYC_GENERIC_PROVIDER_UNEXPECTED_REPLY | ||
1308 | Description: The KYC provider responded with a status that was completely unexpected by the KYC logic of the exchange. | ||
1309 | HttpStatus: 502 | ||
1310 | |||
1311 | Value: 1937 | ||
1312 | Name: EXCHANGE_KYC_GENERIC_PROVIDER_RATE_LIMIT_EXCEEDED | ||
1313 | Description: The rate limit of the exchange at the KYC provider has been exceeded. Trying much later might work. | ||
1314 | HttpStatus: 503 | ||
1315 | |||
1316 | Value: 1938 | ||
1317 | Name: EXCHANGE_KYC_WEBHOOK_UNAUTHORIZED | ||
1318 | Description: The request to the webhook lacked proper authorization or authentication data. | ||
1319 | HttpStatus: 401 | ||
1320 | |||
1321 | |||
1322 | |||
1323 | Value: 1950 | ||
1324 | Name: EXCHANGE_CONTRACTS_UNKNOWN | ||
1325 | Description: The exchange does not know a contract under the given contract public key. | ||
1326 | HttpStatus: 404 | ||
1327 | |||
1328 | Value: 1951 | ||
1329 | Name: EXCHANGE_CONTRACTS_INVALID_CONTRACT_PUB | ||
1330 | Description: The URL does not encode a valid exchange public key in its path. | ||
1331 | HttpStatus: 400 | ||
1332 | |||
1333 | Value: 1952 | ||
1334 | Name: EXCHANGE_CONTRACTS_DECRYPTION_FAILED | ||
1335 | Description: The returned encrypted contract did not decrypt. | ||
1336 | HttpStatus: 0 | ||
1337 | |||
1338 | Value: 1953 | ||
1339 | Name: EXCHANGE_CONTRACTS_SIGNATURE_INVALID | ||
1340 | Description: The signature on the encrypted contract did not validate. | ||
1341 | HttpStatus: 0 | ||
1342 | |||
1343 | Value: 1954 | ||
1344 | Name: EXCHANGE_CONTRACTS_DECODING_FAILED | ||
1345 | Description: The decrypted contract was malformed. | ||
1346 | HttpStatus: 0 | ||
1347 | |||
1348 | Value: 1975 | ||
1349 | Name: EXCHANGE_PURSE_DEPOSIT_COIN_SIGNATURE_INVALID | ||
1350 | Description: A coin signature for a deposit into the purse is invalid. | ||
1351 | HttpStatus: 403 | ||
1352 | |||
1353 | Value: 1976 | ||
1354 | Name: EXCHANGE_PURSE_DEPOSIT_DECIDED_ALREADY | ||
1355 | Description: It is too late to deposit coins into the purse. | ||
1356 | HttpStatus: 410 | ||
1357 | |||
1358 | |||
1359 | |||
1360 | Value: 1980 | ||
1361 | Name: EXCHANGE_TOTP_KEY_INVALID | ||
1362 | Description: TOTP key is not valid. | ||
1363 | HttpStatus: 0 | ||
1364 | |||
762 | 1365 | ||
763 | 1366 | ||
764 | 1367 | ||
@@ -776,19 +1379,9 @@ Description: The start and end-times in the wire fee structure leave a hole. Thi | |||
776 | HttpStatus: 0 | 1379 | HttpStatus: 0 |
777 | 1380 | ||
778 | Value: 2002 | 1381 | Value: 2002 |
779 | Name: MERCHANT_GENERIC_RESERVE_PUB_MALFORMED | 1382 | Name: MERCHANT_GENERIC_EXCHANGE_WIRE_REQUEST_FAILED |
780 | Description: The reserve key of given to a /reserves/ handler was malformed. | 1383 | Description: The merchant was unable to obtain a valid answer to /wire from the exchange. |
781 | HttpStatus: 400 | 1384 | HttpStatus: 502 |
782 | |||
783 | Value: 2003 | ||
784 | Name: MERCHANT_GENERIC_FAILED_TO_LOAD_TEMPLATE | ||
785 | Description: The backend could not locate a required template to generate an HTML reply. | ||
786 | HttpStatus: 406 | ||
787 | |||
788 | Value: 2004 | ||
789 | Name: MERCHANT_GENERIC_FAILED_TO_EXPAND_TEMPLATE | ||
790 | Description: The backend could not expand the template to generate an HTML reply. | ||
791 | HttpStatus: 500 | ||
792 | 1385 | ||
793 | Value: 2005 | 1386 | Value: 2005 |
794 | Name: MERCHANT_GENERIC_ORDER_UNKNOWN | 1387 | Name: MERCHANT_GENERIC_ORDER_UNKNOWN |
@@ -801,8 +1394,8 @@ Description: The order provided to the backend could not be completed, because a | |||
801 | HttpStatus: 404 | 1394 | HttpStatus: 404 |
802 | 1395 | ||
803 | Value: 2007 | 1396 | Value: 2007 |
804 | Name: MERCHANT_GENERIC_TIP_ID_UNKNOWN | 1397 | Name: MERCHANT_GENERIC_REWARD_ID_UNKNOWN |
805 | Description: The tip ID is unknown. This could happen if the tip has expired. | 1398 | Description: The reward ID is unknown. This could happen if the reward has expired. |
806 | HttpStatus: 404 | 1399 | HttpStatus: 404 |
807 | 1400 | ||
808 | Value: 2008 | 1401 | Value: 2008 |
@@ -855,6 +1448,40 @@ Name: MERCHANT_GENERIC_TRANSFER_UNKNOWN | |||
855 | Description: The backend could not find the inbound wire transfer specified in the request. | 1448 | Description: The backend could not find the inbound wire transfer specified in the request. |
856 | HttpStatus: 404 | 1449 | HttpStatus: 404 |
857 | 1450 | ||
1451 | Value: 2018 | ||
1452 | Name: MERCHANT_GENERIC_TEMPLATE_UNKNOWN | ||
1453 | Description: The backend could not find the template(id) because it is not exist. | ||
1454 | HttpStatus: 404 | ||
1455 | |||
1456 | Value: 2019 | ||
1457 | Name: MERCHANT_GENERIC_WEBHOOK_UNKNOWN | ||
1458 | Description: The backend could not find the webhook(id) because it is not exist. | ||
1459 | HttpStatus: 404 | ||
1460 | |||
1461 | Value: 2020 | ||
1462 | Name: MERCHANT_GENERIC_PENDING_WEBHOOK_UNKNOWN | ||
1463 | Description: The backend could not find the webhook(serial) because it is not exist. | ||
1464 | HttpStatus: 404 | ||
1465 | |||
1466 | Value: 2021 | ||
1467 | Name: MERCHANT_GENERIC_OTP_DEVICE_UNKNOWN | ||
1468 | Description: The backend could not find the OTP device(id) because it is not exist. | ||
1469 | HttpStatus: 404 | ||
1470 | |||
1471 | Value: 2022 | ||
1472 | Name: MERCHANT_GENERIC_ACCOUNT_UNKNOWN | ||
1473 | Description: The account is not known to the backend. | ||
1474 | HttpStatus: 404 | ||
1475 | |||
1476 | Value: 2023 | ||
1477 | Name: MERCHANT_GENERIC_H_WIRE_MALFORMED | ||
1478 | Description: The wire hash was malformed. | ||
1479 | HttpStatus: 400 | ||
1480 | |||
1481 | Value: 2024 | ||
1482 | Name: MERCHANT_GENERIC_CURRENCY_MISMATCH | ||
1483 | Description: The currency specified in the operation does not work with the current state of the given resource. | ||
1484 | HttpStatus: 409 | ||
858 | 1485 | ||
859 | # 2100-2499: public API | 1486 | # 2100-2499: public API |
860 | # 2100-2149: get orders endpoint | 1487 | # 2100-2149: get orders endpoint |
@@ -864,7 +1491,6 @@ Name: MERCHANT_GET_ORDERS_EXCHANGE_TRACKING_FAILURE | |||
864 | Description: The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response. | 1491 | Description: The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response. |
865 | HttpStatus: 200 | 1492 | HttpStatus: 200 |
866 | 1493 | ||
867 | |||
868 | Value: 2103 | 1494 | Value: 2103 |
869 | Name: MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE | 1495 | Name: MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE |
870 | Description: The merchant backend failed to construct the request for tracking to the exchange, thus tracking details are not in the response. | 1496 | Description: The merchant backend failed to construct the request for tracking to the exchange, thus tracking details are not in the response. |
@@ -915,12 +1541,12 @@ HttpStatus: 400 | |||
915 | Value: 2155 | 1541 | Value: 2155 |
916 | Name: MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES | 1542 | Name: MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES |
917 | Description: After considering deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. The client should revisit the logic used to calculate fees it must cover. | 1543 | Description: After considering deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. The client should revisit the logic used to calculate fees it must cover. |
918 | HttpStatus: 406 | 1544 | HttpStatus: 400 |
919 | 1545 | ||
920 | Value: 2156 | 1546 | Value: 2156 |
921 | Name: MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT | 1547 | Name: MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT |
922 | Description: Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. | 1548 | Description: Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. |
923 | HttpStatus: 406 | 1549 | HttpStatus: 400 |
924 | 1550 | ||
925 | Value: 2157 | 1551 | Value: 2157 |
926 | Name: MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID | 1552 | Name: MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID |
@@ -937,6 +1563,11 @@ Name: MERCHANT_POST_ORDERS_ID_PAY_REFUND_DEADLINE_PAST_WIRE_TRANSFER_DEADLINE | |||
937 | Description: The refund deadline in the contract is after the transfer deadline. | 1563 | Description: The refund deadline in the contract is after the transfer deadline. |
938 | HttpStatus: 500 | 1564 | HttpStatus: 500 |
939 | 1565 | ||
1566 | Value: 2160 | ||
1567 | Name: MERCHANT_POST_ORDERS_ID_PAY_ALREADY_PAID | ||
1568 | Description: The order was already paid (maybe by another wallet). | ||
1569 | HttpStatus: 409 | ||
1570 | |||
940 | Value: 2161 | 1571 | Value: 2161 |
941 | Name: MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED | 1572 | Name: MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED |
942 | Description: The payment is too late, the offer has expired. | 1573 | Description: The payment is too late, the offer has expired. |
@@ -982,7 +1613,33 @@ Name: MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_FAILED | |||
982 | Description: The payment failed at the exchange. | 1613 | Description: The payment failed at the exchange. |
983 | HttpStatus: 502 | 1614 | HttpStatus: 502 |
984 | 1615 | ||
985 | # 2200-2249: post orders ID paid endpoint | 1616 | Value: 2171 |
1617 | Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_MISSING | ||
1618 | Description: The payment required a minimum age but one of the coins (of a denomination with support for age restriction) did not provide any age_commitment. | ||
1619 | HttpStatus: 400 | ||
1620 | |||
1621 | Value: 2172 | ||
1622 | Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_SIZE_MISMATCH | ||
1623 | Description: The payment required a minimum age but one of the coins provided an age_commitment that contained a wrong number of public keys compared to the number of age groups defined in the denomination of the coin. | ||
1624 | HttpStatus: 400 | ||
1625 | |||
1626 | Value: 2173 | ||
1627 | Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_VERIFICATION_FAILED | ||
1628 | Description: The payment required a minimum age but one of the coins provided a minimum_age_sig that couldn't be verified with the given age_commitment for that particular minimum age. | ||
1629 | HttpStatus: 400 | ||
1630 | |||
1631 | Value: 2174 | ||
1632 | Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_HASH_MISSING | ||
1633 | Description: The payment required no minimum age but one of the coins (of a denomination with support for age restriction) did not provide the required h_age_commitment. | ||
1634 | HttpStatus: 400 | ||
1635 | |||
1636 | Value: 2175 | ||
1637 | Name: MERCHANT_POST_ORDERS_ID_PAY_WIRE_METHOD_UNSUPPORTED | ||
1638 | Description: The exchange does not support the selected bank account of the merchant. Likely the merchant had stale data on the bank accounts of the exchange and thus selected an inappropriate exchange when making the offer. | ||
1639 | HttpStatus: 409 | ||
1640 | |||
1641 | |||
1642 | # 2200-2224: post orders ID paid endpoint | ||
986 | 1643 | ||
987 | Value: 2200 | 1644 | Value: 2200 |
988 | Name: MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH | 1645 | Name: MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH |
@@ -994,9 +1651,21 @@ Name: MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID | |||
994 | Description: The signature of the merchant is not valid for the given contract hash. | 1651 | Description: The signature of the merchant is not valid for the given contract hash. |
995 | HttpStatus: 403 | 1652 | HttpStatus: 403 |
996 | 1653 | ||
997 | # 2250-2299: post orders ID abort endpoint | 1654 | # 2225-2249: token families endpoints |
1655 | |||
1656 | Value: 2225 | ||
1657 | Name: MERCHANT_POST_TOKEN_FAMILY_CONFLICT | ||
1658 | Description: A token family with this ID but conflicting data exists. | ||
1659 | HttpStatus: 409 | ||
1660 | |||
1661 | Value: 2226 | ||
1662 | Name: MERCHANT_PATCH_TOKEN_FAMILY_NOT_FOUND | ||
1663 | Description: The backend is unaware of a token family with the given ID. | ||
1664 | HttpStatus: 404 | ||
998 | 1665 | ||
999 | 1666 | ||
1667 | # 2250-2256: post orders ID abort endpoint | ||
1668 | |||
1000 | Value: 2251 | 1669 | Value: 2251 |
1001 | Name: MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED | 1670 | Name: MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED |
1002 | Description: The merchant failed to send the exchange the refund request. | 1671 | Description: The merchant failed to send the exchange the refund request. |
@@ -1027,6 +1696,44 @@ Name: MERCHANT_POST_ORDERS_ID_ABORT_COINS_ARRAY_EMPTY | |||
1027 | Description: The array of coins cannot be empty. | 1696 | Description: The array of coins cannot be empty. |
1028 | HttpStatus: 400 | 1697 | HttpStatus: 400 |
1029 | 1698 | ||
1699 | Value: 2258 | ||
1700 | Name: MERCHANT_EXCHANGE_TRANSFERS_AWAITING_KEYS | ||
1701 | Description: We are waiting for the exchange to provide us with key material before checking the wire transfer. | ||
1702 | HttpStatus: 202 | ||
1703 | |||
1704 | Value: 2259 | ||
1705 | Name: MERCHANT_EXCHANGE_TRANSFERS_AWAITING_LIST | ||
1706 | Description: We are waiting for the exchange to provide us with the list of aggregated transactions. | ||
1707 | HttpStatus: 202 | ||
1708 | |||
1709 | |||
1710 | Value: 2260 | ||
1711 | Name: MERCHANT_EXCHANGE_TRANSFERS_FATAL_NO_EXCHANGE | ||
1712 | Description: The endpoint indicated in the wire transfer does not belong to a GNU Taler exchange. | ||
1713 | HttpStatus: 200 | ||
1714 | |||
1715 | Value: 2261 | ||
1716 | Name: MERCHANT_EXCHANGE_TRANSFERS_FATAL_NOT_FOUND | ||
1717 | Description: The exchange indicated in the wire transfer claims to know nothing about the wire transfer. | ||
1718 | HttpStatus: 0 | ||
1719 | |||
1720 | Value: 2262 | ||
1721 | Name: MERCHANT_EXCHANGE_TRANSFERS_RATE_LIMITED | ||
1722 | Description: The interaction with the exchange is delayed due to rate limiting. | ||
1723 | HttpStatus: 202 | ||
1724 | |||
1725 | Value: 2263 | ||
1726 | Name: MERCHANT_EXCHANGE_TRANSFERS_TRANSIENT_FAILURE | ||
1727 | Description: We experienced a transient failure in our interaction with the exchange. | ||
1728 | HttpStatus: 202 | ||
1729 | |||
1730 | Value: 2264 | ||
1731 | Name: MERCHANT_EXCHANGE_TRANSFERS_HARD_FAILURE | ||
1732 | Description: The response from the exchange was unacceptable and should be reviewed with an auditor. | ||
1733 | HttpStatus: 200 | ||
1734 | |||
1735 | |||
1736 | |||
1030 | # 2300-2349: post orders ID claim endpoint | 1737 | # 2300-2349: post orders ID claim endpoint |
1031 | 1738 | ||
1032 | Value: 2300 | 1739 | Value: 2300 |
@@ -1051,38 +1758,38 @@ Name: MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED | |||
1051 | Description: The backend failed to sign the refund request. | 1758 | Description: The backend failed to sign the refund request. |
1052 | HttpStatus: 0 | 1759 | HttpStatus: 0 |
1053 | 1760 | ||
1054 | # 2400-2449: tip pickup endpoint | 1761 | # 2400-2449: reward pickup endpoint |
1055 | 1762 | ||
1056 | Value: 2400 | 1763 | Value: 2400 |
1057 | Name: MERCHANT_TIP_PICKUP_UNBLIND_FAILURE | 1764 | Name: MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE |
1058 | Description: The client failed to unblind the signature returned by the merchant. | 1765 | Description: The client failed to unblind the signature returned by the merchant. |
1059 | HttpStatus: 0 | 1766 | HttpStatus: 0 |
1060 | 1767 | ||
1061 | 1768 | ||
1062 | 1769 | ||
1063 | Value: 2403 | 1770 | Value: 2403 |
1064 | Name: MERCHANT_TIP_PICKUP_EXCHANGE_ERROR | 1771 | Name: MERCHANT_REWARD_PICKUP_EXCHANGE_ERROR |
1065 | Description: The exchange returned a failure code for the withdraw operation. | 1772 | Description: The exchange returned a failure code for the withdraw operation. |
1066 | HttpStatus: 502 | 1773 | HttpStatus: 502 |
1067 | 1774 | ||
1068 | 1775 | ||
1069 | Value: 2404 | 1776 | Value: 2404 |
1070 | Name: MERCHANT_TIP_PICKUP_SUMMATION_FAILED | 1777 | Name: MERCHANT_REWARD_PICKUP_SUMMATION_FAILED |
1071 | Description: The merchant failed to add up the amounts to compute the pick up value. | 1778 | Description: The merchant failed to add up the amounts to compute the pick up value. |
1072 | HttpStatus: 500 | 1779 | HttpStatus: 500 |
1073 | 1780 | ||
1074 | Value: 2405 | 1781 | Value: 2405 |
1075 | Name: MERCHANT_TIP_PICKUP_HAS_EXPIRED | 1782 | Name: MERCHANT_REWARD_PICKUP_HAS_EXPIRED |
1076 | Description: The tip expired. | 1783 | Description: The reward expired. |
1077 | HttpStatus: 410 | 1784 | HttpStatus: 410 |
1078 | 1785 | ||
1079 | Value: 2406 | 1786 | Value: 2406 |
1080 | Name: MERCHANT_TIP_PICKUP_AMOUNT_EXCEEDS_TIP_REMAINING | 1787 | Name: MERCHANT_REWARD_PICKUP_AMOUNT_EXCEEDS_REWARD_REMAINING |
1081 | Description: The requested withdraw amount exceeds the amount remaining to be picked up. | 1788 | Description: The requested withdraw amount exceeds the amount remaining to be picked up. |
1082 | HttpStatus: 400 | 1789 | HttpStatus: 400 |
1083 | 1790 | ||
1084 | Value: 2407 | 1791 | Value: 2407 |
1085 | Name: MERCHANT_TIP_PICKUP_DENOMINATION_UNKNOWN | 1792 | Name: MERCHANT_REWARD_PICKUP_DENOMINATION_UNKNOWN |
1086 | Description: The merchant did not find the specified denomination key in the exchange's key set. | 1793 | Description: The merchant did not find the specified denomination key in the exchange's key set. |
1087 | HttpStatus: 409 | 1794 | HttpStatus: 409 |
1088 | 1795 | ||
@@ -1093,34 +1800,53 @@ HttpStatus: 409 | |||
1093 | 1800 | ||
1094 | Value: 2500 | 1801 | Value: 2500 |
1095 | Name: MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE | 1802 | Name: MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE |
1096 | Description: The backend lacks a wire transfer method configuration option for the given instance. Thus, this instance is unavailable (not findable for creating new orders). | 1803 | Description: The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders. |
1097 | HttpStatus: 404 | 1804 | HttpStatus: 404 |
1098 | 1805 | ||
1099 | Value: 2501 | 1806 | Value: 2501 |
1100 | Name: MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME | 1807 | Name: MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME |
1101 | Description: The proposal had no timestamp and the backend failed to obtain the local time. Likely to be an internal error. | 1808 | Description: The proposal had no timestamp and the merchant backend failed to obtain the current local time. |
1102 | HttpStatus: 500 | 1809 | HttpStatus: 500 |
1103 | 1810 | ||
1104 | Value: 2502 | 1811 | Value: 2502 |
1105 | Name: MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR | 1812 | Name: MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR |
1106 | Description: The order provided to the backend could not be parsed, some required fields were missing or ill-formed. | 1813 | Description: The order provided to the backend could not be parsed; likely some required fields were missing or ill-formed. |
1107 | HttpStatus: 400 | 1814 | HttpStatus: 400 |
1108 | 1815 | ||
1109 | Value: 2503 | 1816 | Value: 2503 |
1110 | Name: MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS | 1817 | Name: MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS |
1111 | Description: The backend encountered an error: the proposal already exists. | 1818 | Description: A conflicting order (sharing the same order identifier) already exists at this merchant backend instance. |
1112 | HttpStatus: 409 | 1819 | HttpStatus: 409 |
1113 | 1820 | ||
1114 | Value: 2504 | 1821 | Value: 2504 |
1115 | Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE | 1822 | Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE |
1116 | Description: The request is invalid: the wire deadline is before the refund deadline. | 1823 | Description: The order creation request is invalid because the given wire deadline is before the refund deadline. |
1117 | HttpStatus: 400 | 1824 | HttpStatus: 400 |
1118 | 1825 | ||
1119 | Value: 2505 | 1826 | Value: 2505 |
1120 | Name: MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST | 1827 | Name: MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST |
1121 | Description: The request is invalid: a delivery date was given, but it is in the past. | 1828 | Description: The order creation request is invalid because the delivery date given is in the past. |
1829 | HttpStatus: 400 | ||
1830 | |||
1831 | Value: 2506 | ||
1832 | Name: MERCHANT_PRIVATE_POST_ORDERS_WIRE_DEADLINE_IS_NEVER | ||
1833 | Description: The order creation request is invalid because a wire deadline of "never" is not allowed. | ||
1122 | HttpStatus: 400 | 1834 | HttpStatus: 400 |
1123 | 1835 | ||
1836 | Value: 2507 | ||
1837 | Name: MERCHANT_PRIVATE_POST_ORDERS_PAY_DEADLINE_IN_PAST | ||
1838 | Description: The order ceration request is invalid because the given payment deadline is in the past. | ||
1839 | HttpStatus: 400 | ||
1840 | |||
1841 | Value: 2508 | ||
1842 | Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_DEADLINE_IN_PAST | ||
1843 | Description: The order creation request is invalid because the given refund deadline is in the past. | ||
1844 | HttpStatus: 400 | ||
1845 | |||
1846 | Value: 2509 | ||
1847 | Name: MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGES_FOR_WIRE_METHOD | ||
1848 | Description: The backend does not trust any exchange that would allow funds to be wired to any bank account of this instance using the wire method specified with the order. Note that right now, we do not support the use of exchange bank accounts with mandatory currency conversion. | ||
1849 | HttpStatus: 409 | ||
1124 | 1850 | ||
1125 | Value: 2510 | 1851 | Value: 2510 |
1126 | Name: MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT | 1852 | Name: MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT |
@@ -1134,22 +1860,27 @@ HttpStatus: 409 | |||
1134 | 1860 | ||
1135 | Value: 2520 | 1861 | Value: 2520 |
1136 | Name: MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT | 1862 | Name: MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT |
1137 | Description: The order provided to the backend could not be deleted, our offer is still valid and awaiting payment. | 1863 | Description: The order provided to the backend could not be deleted, our offer is still valid and awaiting payment. Deletion may work later after the offer has expired if it remains unpaid. |
1864 | HttpStatus: 409 | ||
1865 | |||
1866 | Value: 2521 | ||
1867 | Name: MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID | ||
1868 | Description: The order provided to the backend could not be deleted as the order was already paid. | ||
1138 | HttpStatus: 409 | 1869 | HttpStatus: 409 |
1139 | 1870 | ||
1140 | Value: 2530 | 1871 | Value: 2530 |
1141 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT | 1872 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT |
1142 | Description: The amount to be refunded is inconsistent: either is lower than the previous amount being awarded, or it is too big to be paid back. In this second case, the fault stays on the business dept. side. | 1873 | Description: The amount to be refunded is inconsistent: either is lower than the previous amount being awarded, or it exceeds the original price paid by the customer. |
1143 | HttpStatus: 409 | 1874 | HttpStatus: 409 |
1144 | 1875 | ||
1145 | Value: 2531 | 1876 | Value: 2531 |
1146 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID | 1877 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID |
1147 | Description: The frontend gave an unpaid order id to issue the refund to. | 1878 | Description: Only paid orders can be refunded, and the frontend specified an unpaid order to issue a refund for. |
1148 | HttpStatus: 409 | 1879 | HttpStatus: 409 |
1149 | 1880 | ||
1150 | Value: 2532 | 1881 | Value: 2532 |
1151 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT | 1882 | Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT |
1152 | Description: The refund delay was set to 0 and thus no refunds are allowed for this order. | 1883 | Description: The refund delay was set to 0 and thus no refunds are ever allowed for this order. |
1153 | HttpStatus: 403 | 1884 | HttpStatus: 403 |
1154 | 1885 | ||
1155 | 1886 | ||
@@ -1196,6 +1927,11 @@ Name: MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_SUBMISSION | |||
1196 | Description: The backend was previously informed about a wire transfer with the same ID but a different amount. Multiple wire transfers with the same ID are not allowed. If the new amount is correct, the old transfer should first be deleted. | 1927 | Description: The backend was previously informed about a wire transfer with the same ID but a different amount. Multiple wire transfers with the same ID are not allowed. If the new amount is correct, the old transfer should first be deleted. |
1197 | HttpStatus: 409 | 1928 | HttpStatus: 409 |
1198 | 1929 | ||
1930 | Value: 2563 | ||
1931 | Name: MERCHANT_EXCHANGE_TRANSFERS_CONFLICTING_TRANSFERS | ||
1932 | Description: The amount transferred differs between what was submitted and what the exchange claimed. | ||
1933 | HttpStatus: 0 | ||
1934 | |||
1199 | 1935 | ||
1200 | # 2600-2649: instance operations | 1936 | # 2600-2649: instance operations |
1201 | 1937 | ||
@@ -1224,6 +1960,16 @@ Name: MERCHANT_PRIVATE_PATCH_INSTANCES_PURGE_REQUIRED | |||
1224 | Description: The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first. | 1960 | Description: The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first. |
1225 | HttpStatus: 409 | 1961 | HttpStatus: 409 |
1226 | 1962 | ||
1963 | Value: 2626 | ||
1964 | Name: MERCHANT_PRIVATE_ACCOUNT_DELETE_UNKNOWN_ACCOUNT | ||
1965 | Description: The bank account referenced in the requested operation was not found. | ||
1966 | HttpStatus: 404 | ||
1967 | |||
1968 | Value: 2627 | ||
1969 | Name: MERCHANT_PRIVATE_ACCOUNT_EXISTS | ||
1970 | Description: The bank account specified in the request already exists at the merchant. | ||
1971 | HttpStatus: 409 | ||
1972 | |||
1227 | 1973 | ||
1228 | # 2650-2699: product operations | 1974 | # 2650-2699: product operations |
1229 | 1975 | ||
@@ -1269,31 +2015,36 @@ Name: MERCHANT_PRIVATE_POST_RESERVES_UNSUPPORTED_WIRE_METHOD | |||
1269 | Description: The requested wire method is not supported by the exchange. | 2015 | Description: The requested wire method is not supported by the exchange. |
1270 | HttpStatus: 409 | 2016 | HttpStatus: 409 |
1271 | 2017 | ||
2018 | Value: 2701 | ||
2019 | Name: MERCHANT_PRIVATE_POST_RESERVES_REWARDS_NOT_ALLOWED | ||
2020 | Description: The requested exchange does not allow rewards. | ||
2021 | HttpStatus: 409 | ||
2022 | |||
1272 | Value: 2710 | 2023 | Value: 2710 |
1273 | Name: MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE | 2024 | Name: MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE |
1274 | Description: The reserve could not be deleted because it is unknown. | 2025 | Description: The reserve could not be deleted because it is unknown. |
1275 | HttpStatus: 404 | 2026 | HttpStatus: 404 |
1276 | 2027 | ||
1277 | # 2750-2799: tip authorization | 2028 | # 2750-2799: reward authorization |
1278 | 2029 | ||
1279 | Value: 2750 | 2030 | Value: 2750 |
1280 | Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_EXPIRED | 2031 | Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_EXPIRED |
1281 | Description: The reserve that was used to fund the tips has expired. | 2032 | Description: The reserve that was used to fund the rewards has expired. |
1282 | HttpStatus: 410 | 2033 | HttpStatus: 410 |
1283 | 2034 | ||
1284 | Value: 2751 | 2035 | Value: 2751 |
1285 | Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_UNKNOWN | 2036 | Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_UNKNOWN |
1286 | Description: The reserve that was used to fund the tips was not found in the DB. | 2037 | Description: The reserve that was used to fund the rewards was not found in the DB. |
1287 | HttpStatus: 503 | 2038 | HttpStatus: 503 |
1288 | 2039 | ||
1289 | Value: 2752 | 2040 | Value: 2752 |
1290 | Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_INSUFFICIENT_FUNDS | 2041 | Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_INSUFFICIENT_FUNDS |
1291 | Description: The backend knows the instance that was supposed to support the tip, and it was configured for tipping. However, the funds remaining are insufficient to cover the tip, and the merchant should top up the reserve. | 2042 | Description: The backend knows the instance that was supposed to support the reward, and it was configured for rewardping. However, the funds remaining are insufficient to cover the reward, and the merchant should top up the reserve. |
1292 | HttpStatus: 0 | 2043 | HttpStatus: 0 |
1293 | 2044 | ||
1294 | Value: 2753 | 2045 | Value: 2753 |
1295 | Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_NOT_FOUND | 2046 | Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_NOT_FOUND |
1296 | Description: The backend failed to find a reserve needed to authorize the tip. | 2047 | Description: The backend failed to find a reserve needed to authorize the reward. |
1297 | HttpStatus: 503 | 2048 | HttpStatus: 503 |
1298 | 2049 | ||
1299 | Value: 2800 | 2050 | Value: 2800 |
@@ -1301,6 +2052,53 @@ Name: MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE | |||
1301 | Description: The merchant backend encountered a failure in computing the deposit total. | 2052 | Description: The merchant backend encountered a failure in computing the deposit total. |
1302 | HttpStatus: 200 | 2053 | HttpStatus: 200 |
1303 | 2054 | ||
2055 | # 2850-2899: template and OTP device operations | ||
2056 | |||
2057 | Value: 2850 | ||
2058 | Name: MERCHANT_PRIVATE_POST_TEMPLATES_CONFLICT_TEMPLATE_EXISTS | ||
2059 | Description: The template ID already exists. | ||
2060 | HttpStatus: 409 | ||
2061 | |||
2062 | Value: 2851 | ||
2063 | Name: MERCHANT_PRIVATE_POST_OTP_DEVICES_CONFLICT_OTP_DEVICE_EXISTS | ||
2064 | Description: The OTP device ID already exists. | ||
2065 | HttpStatus: 409 | ||
2066 | |||
2067 | Value: 2860 | ||
2068 | Name: MERCHANT_POST_USING_TEMPLATES_AMOUNT_CONFLICT_TEMPLATES_CONTRACT_AMOUNT | ||
2069 | Description: Amount given in the using template and in the template contract. There is a conflict. | ||
2070 | HttpStatus: 409 | ||
2071 | |||
2072 | Value: 2861 | ||
2073 | Name: MERCHANT_POST_USING_TEMPLATES_SUMMARY_CONFLICT_TEMPLATES_CONTRACT_SUBJECT | ||
2074 | Description: Subject given in the using template and in the template contract. There is a conflict. | ||
2075 | HttpStatus: 409 | ||
2076 | |||
2077 | Value: 2862 | ||
2078 | Name: MERCHANT_POST_USING_TEMPLATES_NO_AMOUNT | ||
2079 | Description: Amount not given in the using template and in the template contract. There is a conflict. | ||
2080 | HttpStatus: 409 | ||
2081 | |||
2082 | Value: 2863 | ||
2083 | Name: MERCHANT_POST_USING_TEMPLATES_NO_SUMMARY | ||
2084 | Description: Subject not given in the using template and in the template contract. There is a conflict. | ||
2085 | HttpStatus: 409 | ||
2086 | |||
2087 | |||
2088 | |||
2089 | # 2900-2949: webhook operations | ||
2090 | |||
2091 | Value: 2900 | ||
2092 | Name: MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS | ||
2093 | Description: The webhook ID elready exists. | ||
2094 | HttpStatus: 409 | ||
2095 | |||
2096 | Value: 2910 | ||
2097 | Name: MERCHANT_PRIVATE_POST_PENDING_WEBHOOKS_CONFLICT_PENDING_WEBHOOK_EXISTS | ||
2098 | Description: The webhook serial elready exists. | ||
2099 | HttpStatus: 409 | ||
2100 | |||
2101 | |||
1304 | 2102 | ||
1305 | 2103 | ||
1306 | 2104 | ||
@@ -1324,57 +2122,52 @@ HttpStatus: 410 | |||
1324 | Value: 5101 | 2122 | Value: 5101 |
1325 | Name: BANK_SAME_ACCOUNT | 2123 | Name: BANK_SAME_ACCOUNT |
1326 | Description: Wire transfer attempted with credit and debit party being the same bank account. | 2124 | Description: Wire transfer attempted with credit and debit party being the same bank account. |
1327 | HttpStatus: 0 | 2125 | HttpStatus: 400 |
1328 | 2126 | ||
1329 | Value: 5102 | 2127 | Value: 5102 |
1330 | Name: BANK_UNALLOWED_DEBIT | 2128 | Name: BANK_UNALLOWED_DEBIT |
1331 | Description: Wire transfer impossible, due to financial limitation of the party that attempted the payment. | 2129 | Description: Wire transfer impossible, due to financial limitation of the party that attempted the payment. |
1332 | HttpStatus: 0 | 2130 | HttpStatus: 409 |
1333 | 2131 | ||
1334 | Value: 5103 | 2132 | Value: 5103 |
1335 | Name: BANK_NEGATIVE_NUMBER_AMOUNT | 2133 | Name: BANK_NEGATIVE_NUMBER_AMOUNT |
1336 | Description: Negative number was used (as value and/or fraction) to initiate a Amount object. | 2134 | Description: Negative numbers are not allowed (as value and/or fraction) to instantiate an amount object. |
1337 | HttpStatus: 0 | 2135 | HttpStatus: 400 |
1338 | 2136 | ||
1339 | Value: 5104 | 2137 | Value: 5104 |
1340 | Name: BANK_NUMBER_TOO_BIG | 2138 | Name: BANK_NUMBER_TOO_BIG |
1341 | Description: A number too big was used (as value and/or fraction) to initiate a amount object. | 2139 | Description: A too big number was used (as value and/or fraction) to instantiate an amount object. |
1342 | HttpStatus: 0 | 2140 | HttpStatus: 400 |
1343 | |||
1344 | Value: 5105 | ||
1345 | Name: BANK_LOGIN_FAILED | ||
1346 | Description: Could not login for the requested operation. | ||
1347 | HttpStatus: 0 | ||
1348 | 2141 | ||
1349 | Value: 5106 | 2142 | Value: 5106 |
1350 | Name: BANK_UNKNOWN_ACCOUNT | 2143 | Name: BANK_UNKNOWN_ACCOUNT |
1351 | Description: The bank account referenced in the requested operation was not found. Returned along "400 Not found". | 2144 | Description: The bank account referenced in the requested operation was not found. |
1352 | HttpStatus: 0 | 2145 | HttpStatus: 404 |
1353 | 2146 | ||
1354 | Value: 5107 | 2147 | Value: 5107 |
1355 | Name: BANK_TRANSACTION_NOT_FOUND | 2148 | Name: BANK_TRANSACTION_NOT_FOUND |
1356 | Description: The transaction referenced in the requested operation (typically a reject operation), was not found. | 2149 | Description: The transaction referenced in the requested operation (typically a reject operation), was not found. |
1357 | HttpStatus: 0 | 2150 | HttpStatus: 404 |
1358 | 2151 | ||
1359 | Value: 5108 | 2152 | Value: 5108 |
1360 | Name: BANK_BAD_FORMAT_AMOUNT | 2153 | Name: BANK_BAD_FORMAT_AMOUNT |
1361 | Description: Bank received a malformed amount string. | 2154 | Description: Bank received a malformed amount string. |
1362 | HttpStatus: 0 | 2155 | HttpStatus: 400 |
1363 | 2156 | ||
1364 | Value: 5109 | 2157 | Value: 5109 |
1365 | Name: BANK_REJECT_NO_RIGHTS | 2158 | Name: BANK_REJECT_NO_RIGHTS |
1366 | Description: The client does not own the account credited by the transaction which is to be rejected, so it has no rights do reject it. To be returned along HTTP 403 Forbidden. | 2159 | Description: The client does not own the account credited by the transaction which is to be rejected, so it has no rights do reject it. |
1367 | HttpStatus: 0 | 2160 | HttpStatus: 403 |
1368 | 2161 | ||
1369 | Value: 5110 | 2162 | Value: 5110 |
1370 | Name: BANK_UNMANAGED_EXCEPTION | 2163 | Name: BANK_UNMANAGED_EXCEPTION |
1371 | Description: This error code is returned when no known exception types captured the exception, and comes along with a 500 Internal Server Error. | 2164 | Description: This error code is returned when no known exception types captured the exception. |
1372 | HttpStatus: 0 | 2165 | HttpStatus: 500 |
1373 | 2166 | ||
1374 | Value: 5111 | 2167 | Value: 5111 |
1375 | Name: BANK_SOFT_EXCEPTION | 2168 | Name: BANK_SOFT_EXCEPTION |
1376 | Description: This error code is used for all those exceptions that do not really need a specific error code to return to the client, but need to signal the middleware that the bank is not responding with 500 Internal Server Error. Used for example when a client is trying to register with a unavailable username. | 2169 | Description: This error code is used for all those exceptions that do not really need a specific error code to return to the client. Used for example when a client is trying to register with a unavailable username. |
1377 | HttpStatus: 0 | 2170 | HttpStatus: 500 |
1378 | 2171 | ||
1379 | Value: 5112 | 2172 | Value: 5112 |
1380 | Name: BANK_TRANSFER_REQUEST_UID_REUSED | 2173 | Name: BANK_TRANSFER_REQUEST_UID_REUSED |
@@ -1391,6 +2184,160 @@ Name: BANK_DUPLICATE_RESERVE_PUB_SUBJECT | |||
1391 | Description: The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique. | 2184 | Description: The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique. |
1392 | HttpStatus: 409 | 2185 | HttpStatus: 409 |
1393 | 2186 | ||
2187 | Value: 5115 | ||
2188 | Name: BANK_ANCIENT_TRANSACTION_GONE | ||
2189 | Description: The client requested a transaction that is so far in the past, that it has been forgotten by the bank. | ||
2190 | HttpStatus: 410 | ||
2191 | |||
2192 | Value: 5116 | ||
2193 | Name: BANK_ABORT_CONFIRM_CONFLICT | ||
2194 | Description: The client attempted to abort a transaction that was already confirmed. | ||
2195 | HttpStatus: 409 | ||
2196 | |||
2197 | Value: 5117 | ||
2198 | Name: BANK_CONFIRM_ABORT_CONFLICT | ||
2199 | Description: The client attempted to confirm a transaction that was already aborted. | ||
2200 | HttpStatus: 409 | ||
2201 | |||
2202 | Value: 5118 | ||
2203 | Name: BANK_REGISTER_CONFLICT | ||
2204 | Description: The client attempted to register an account with the same name. | ||
2205 | HttpStatus: 409 | ||
2206 | |||
2207 | Value: 5119 | ||
2208 | Name: BANK_POST_WITHDRAWAL_OPERATION_REQUIRED | ||
2209 | Description: The client attempted to confirm a withdrawal operation before the wallet posted the required details. | ||
2210 | HttpStatus: 400 | ||
2211 | |||
2212 | Value: 5120 | ||
2213 | Name: BANK_RESERVED_USERNAME_CONFLICT | ||
2214 | Description: The client tried to register a new account under a reserved username (like 'admin' for example). | ||
2215 | HttpStatus: 409 | ||
2216 | |||
2217 | Value: 5121 | ||
2218 | Name: BANK_REGISTER_USERNAME_REUSE | ||
2219 | Description: The client tried to register a new account with an username already in use. | ||
2220 | HttpStatus: 409 | ||
2221 | |||
2222 | Value: 5122 | ||
2223 | Name: BANK_REGISTER_PAYTO_URI_REUSE | ||
2224 | Description: The client tried to register a new account with a payto:// URI already in use. | ||
2225 | HttpStatus: 409 | ||
2226 | |||
2227 | Value: 5123 | ||
2228 | Name: BANK_ACCOUNT_BALANCE_NOT_ZERO | ||
2229 | Description: The client tried to delete an account with a non null balance. | ||
2230 | HttpStatus: 409 | ||
2231 | |||
2232 | Value: 5124 | ||
2233 | Name: BANK_UNKNOWN_CREDITOR | ||
2234 | Description: The client tried to create a transaction or an operation that credit an unknown account. | ||
2235 | HttpStatus: 409 | ||
2236 | |||
2237 | Value: 5125 | ||
2238 | Name: BANK_UNKNOWN_DEBTOR | ||
2239 | Description: The client tried to create a transaction or an operation that debit an unknown account. | ||
2240 | HttpStatus: 409 | ||
2241 | |||
2242 | Value: 5126 | ||
2243 | Name: BANK_ACCOUNT_IS_EXCHANGE | ||
2244 | Description: The client tried to perform an action prohibited for exchange accounts. | ||
2245 | HttpStatus: 409 | ||
2246 | |||
2247 | Value: 5127 | ||
2248 | Name: BANK_ACCOUNT_IS_NOT_EXCHANGE | ||
2249 | Description: The client tried to perform an action reserved for exchange accounts. | ||
2250 | HttpStatus: 409 | ||
2251 | |||
2252 | Value: 5128 | ||
2253 | Name: BANK_BAD_CONVERSION | ||
2254 | Description: Received currency conversion is wrong. | ||
2255 | HttpStatus: 409 | ||
2256 | |||
2257 | Value: 5129 | ||
2258 | Name: BANK_MISSING_TAN_INFO | ||
2259 | Description: The account referenced in this operation is missing tan info for the chosen channel. | ||
2260 | HttpStatus: 409 | ||
2261 | |||
2262 | Value: 5130 | ||
2263 | Name: BANK_CONFIRM_INCOMPLETE | ||
2264 | Description: The client attempted to confirm a transaction with incomplete info. | ||
2265 | HttpStatus: 409 | ||
2266 | |||
2267 | Value: 5131 | ||
2268 | Name: BANK_TAN_RATE_LIMITED | ||
2269 | Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks. | ||
2270 | HttpStatus: 429 | ||
2271 | |||
2272 | Value: 5132 | ||
2273 | Name: BANK_TAN_CHANNEL_NOT_SUPPORTED | ||
2274 | Description: This TAN channel is not supported. | ||
2275 | HttpStatus: 501 | ||
2276 | |||
2277 | Value: 5133 | ||
2278 | Name: BANK_TAN_CHANNEL_SCRIPT_FAILED | ||
2279 | Description: Failed to send TAN using the helper script. Either script is not found, or script timeout, or script terminated with a non-successful result. | ||
2280 | HttpStatus: 500 | ||
2281 | |||
2282 | Value: 5134 | ||
2283 | Name: BANK_TAN_CHALLENGE_FAILED | ||
2284 | Description: The client's response to the challenge was invalid. | ||
2285 | HttpStatus: 403 | ||
2286 | |||
2287 | Value: 5135 | ||
2288 | Name: BANK_NON_ADMIN_PATCH_LEGAL_NAME | ||
2289 | Description: A non-admin user has tried to change their legal name. | ||
2290 | HttpStatus: 409 | ||
2291 | |||
2292 | Value: 5136 | ||
2293 | Name: BANK_NON_ADMIN_PATCH_DEBT_LIMIT | ||
2294 | Description: A non-admin user has tried to change their debt limit. | ||
2295 | HttpStatus: 409 | ||
2296 | |||
2297 | Value: 5137 | ||
2298 | Name: BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD | ||
2299 | Description: A non-admin user has tried to change their password whihout providing the current one. | ||
2300 | HttpStatus: 409 | ||
2301 | |||
2302 | Value: 5138 | ||
2303 | Name: BANK_PATCH_BAD_OLD_PASSWORD | ||
2304 | Description: Provided old password does not match current password. | ||
2305 | HttpStatus: 409 | ||
2306 | |||
2307 | Value: 5139 | ||
2308 | Name: BANK_PATCH_ADMIN_EXCHANGE | ||
2309 | Description: An admin user has tried to become an exchange. | ||
2310 | HttpStatus: 409 | ||
2311 | |||
2312 | Value: 5140 | ||
2313 | Name: BANK_NON_ADMIN_PATCH_CASHOUT | ||
2314 | Description: A non-admin user has tried to change their cashout account. | ||
2315 | HttpStatus: 409 | ||
2316 | |||
2317 | Value: 5141 | ||
2318 | Name: BANK_NON_ADMIN_PATCH_CONTACT | ||
2319 | Description: A non-admin user has tried to change their contact info. | ||
2320 | HttpStatus: 409 | ||
2321 | |||
2322 | Value: 5142 | ||
2323 | Name: BANK_ADMIN_CREDITOR | ||
2324 | Description: The client tried to create a transaction that credit the admin account. | ||
2325 | HttpStatus: 409 | ||
2326 | |||
2327 | Value: 5143 | ||
2328 | Name: BANK_CHALLENGE_NOT_FOUND | ||
2329 | Description: The referenced challenge was not found. | ||
2330 | HttpStatus: 404 | ||
2331 | |||
2332 | Value: 5144 | ||
2333 | Name: BANK_TAN_CHALLENGE_EXPIRED | ||
2334 | Description: The referenced challenge has expired. | ||
2335 | HttpStatus: 409 | ||
2336 | |||
2337 | Value: 5145 | ||
2338 | Name: BANK_NON_ADMIN_SET_TAN_CHANNEL | ||
2339 | Description: A non-admin user has tried to create an account with 2fa. | ||
2340 | HttpStatus: 409 | ||
1394 | 2341 | ||
1395 | # 6000 - 6999: Reserved for sync | 2342 | # 6000 - 6999: Reserved for sync |
1396 | # 6000 - 6099: Reserved for SYNC_GENERIC | 2343 | # 6000 - 6099: Reserved for SYNC_GENERIC |
@@ -1460,6 +2407,17 @@ Name: SYNC_MISSING_CONTENT_LENGTH | |||
1460 | Description: The "Content-length" field for the upload is missing. | 2407 | Description: The "Content-length" field for the upload is missing. |
1461 | HttpStatus: 400 | 2408 | HttpStatus: 400 |
1462 | 2409 | ||
2410 | Value: 6113 | ||
2411 | Name: SYNC_GENERIC_BACKEND_ERROR | ||
2412 | Description: Sync had problems communicating with its payment backend. | ||
2413 | HttpStatus: 502 | ||
2414 | |||
2415 | Value: 6114 | ||
2416 | Name: SYNC_GENERIC_BACKEND_TIMEOUT | ||
2417 | Description: Sync experienced a timeout communicating with its payment backend. | ||
2418 | HttpStatus: 504 | ||
2419 | |||
2420 | |||
1463 | 2421 | ||
1464 | # 7000 - 7999: Reserved for wallet | 2422 | # 7000 - 7999: Reserved for wallet |
1465 | 2423 | ||
@@ -1544,8 +2502,8 @@ Description: A group of withdrawal operations (typically for the same reserve at | |||
1544 | HttpStatus: 0 | 2502 | HttpStatus: 0 |
1545 | 2503 | ||
1546 | Value: 7016 | 2504 | Value: 7016 |
1547 | Name: WALLET_TIPPING_COIN_SIGNATURE_INVALID | 2505 | Name: WALLET_REWARD_COIN_SIGNATURE_INVALID |
1548 | Description: The signature on a coin by the exchange's denomination key (obtained through the merchant via tipping) is invalid after unblinding it. | 2506 | Description: The signature on a coin by the exchange's denomination key (obtained through the merchant via a reward) is invalid after unblinding it. |
1549 | HttpStatus: 0 | 2507 | HttpStatus: 0 |
1550 | 2508 | ||
1551 | Value: 7017 | 2509 | Value: 7017 |
@@ -1568,7 +2526,77 @@ Name: WALLET_CONTRACT_TERMS_MALFORMED | |||
1568 | Description: The contract terms given by the merchant are malformed. | 2526 | Description: The contract terms given by the merchant are malformed. |
1569 | HttpStatus: 0 | 2527 | HttpStatus: 0 |
1570 | 2528 | ||
1571 | # 8000 - 8999: Reserved for Anastasis | 2529 | Value: 7021 |
2530 | Name: WALLET_PENDING_OPERATION_FAILED | ||
2531 | Description: A pending operation failed, and thus the request can't be completed. | ||
2532 | HttpStatus: 0 | ||
2533 | |||
2534 | Value: 7022 | ||
2535 | Name: WALLET_PAY_MERCHANT_SERVER_ERROR | ||
2536 | Description: A payment was attempted, but the merchant had an internal server error (5xx). | ||
2537 | HttpStatus: 0 | ||
2538 | |||
2539 | Value: 7023 | ||
2540 | Name: WALLET_CRYPTO_WORKER_ERROR | ||
2541 | Description: The crypto worker failed. | ||
2542 | HttpStatus: 0 | ||
2543 | |||
2544 | Value: 7024 | ||
2545 | Name: WALLET_CRYPTO_WORKER_BAD_REQUEST | ||
2546 | Description: The crypto worker received a bad request. | ||
2547 | HttpStatus: 0 | ||
2548 | |||
2549 | Value: 7025 | ||
2550 | Name: WALLET_WITHDRAWAL_KYC_REQUIRED | ||
2551 | Description: A KYC step is required before withdrawal can proceed. | ||
2552 | HttpStatus: 0 | ||
2553 | |||
2554 | Value: 7026 | ||
2555 | Name: WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE | ||
2556 | Description: The wallet does not have sufficient balance to create a deposit group. | ||
2557 | HttpStatus: 0 | ||
2558 | |||
2559 | Value: 7027 | ||
2560 | Name: WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE | ||
2561 | Description: The wallet does not have sufficient balance to create a peer push payment. | ||
2562 | HttpStatus: 0 | ||
2563 | |||
2564 | Value: 7028 | ||
2565 | Name: WALLET_PEER_PULL_PAYMENT_INSUFFICIENT_BALANCE | ||
2566 | Description: The wallet does not have sufficient balance to pay for an invoice. | ||
2567 | HttpStatus: 0 | ||
2568 | |||
2569 | Value: 7029 | ||
2570 | Name: WALLET_REFRESH_GROUP_INCOMPLETE | ||
2571 | Description: A group of refresh operations has errors and will be tried again later. | ||
2572 | HttpStatus: 0 | ||
2573 | |||
2574 | Value: 7030 | ||
2575 | Name: WALLET_EXCHANGE_BASE_URL_MISMATCH | ||
2576 | Description: The exchange's self-reported base URL does not match the one that the wallet is using. | ||
2577 | HttpStatus: 0 | ||
2578 | |||
2579 | Value: 7031 | ||
2580 | Name: WALLET_ORDER_ALREADY_PAID | ||
2581 | Description: The order has already been paid by another wallet. | ||
2582 | HttpStatus: 0 | ||
2583 | |||
2584 | Value: 7032 | ||
2585 | Name: WALLET_EXCHANGE_UNAVAILABLE | ||
2586 | Description: An exchange that is required for some request is currently not available. | ||
2587 | HttpStatus: 0 | ||
2588 | |||
2589 | Value: 7033 | ||
2590 | Name: WALLET_EXCHANGE_ENTRY_USED | ||
2591 | Description: An exchange entry is still used by the exchange, thus it can't be deleted without purging. | ||
2592 | HttpStatus: 0 | ||
2593 | |||
2594 | Value: 7034 | ||
2595 | Name: WALLET_DB_UNAVAILABLE | ||
2596 | Description: The wallet database is unavailable and the wallet thus is not operational. | ||
2597 | HttpStatus: 0 | ||
2598 | |||
2599 | # 8000 - 8499: Reserved for Anastasis | ||
1572 | 2600 | ||
1573 | Value: 8000 | 2601 | Value: 8000 |
1574 | Name: ANASTASIS_GENERIC_BACKEND_TIMEOUT | 2602 | Name: ANASTASIS_GENERIC_BACKEND_TIMEOUT |
@@ -1610,15 +2638,25 @@ Name: ANASTASIS_GENERIC_PAYMENT_CHECK_START_FAILED | |||
1610 | Description: The backend could not check payment status with the payment processor. | 2638 | Description: The backend could not check payment status with the payment processor. |
1611 | HttpStatus: 500 | 2639 | HttpStatus: 500 |
1612 | 2640 | ||
2641 | Value: 8008 | ||
2642 | Name: ANASTASIS_GENERIC_PROVIDER_UNREACHABLE | ||
2643 | Description: The Anastasis provider could not be reached. | ||
2644 | HttpStatus: 0 | ||
2645 | |||
2646 | Value: 8009 | ||
2647 | Name: ANASTASIS_PAYMENT_GENERIC_TIMEOUT | ||
2648 | Description: HTTP server experienced a timeout while awaiting promised payment. | ||
2649 | HttpStatus: 408 | ||
2650 | |||
1613 | 2651 | ||
1614 | Value: 8108 | 2652 | Value: 8108 |
1615 | Name: ANASTASIS_TRUTH_UNKNOWN | 2653 | Name: ANASTASIS_TRUTH_UNKNOWN |
1616 | Description: The truth public key is unknown to the provider. | 2654 | Description: The key share is unknown to the provider. |
1617 | HttpStatus: 404 | 2655 | HttpStatus: 404 |
1618 | 2656 | ||
1619 | Value: 8109 | 2657 | Value: 8109 |
1620 | Name: ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED | 2658 | Name: ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED |
1621 | Description: The authorization method used by the truth is no longer supported by the provider. | 2659 | Description: The authorization method used for the key share is no longer supported by the provider. |
1622 | HttpStatus: 500 | 2660 | HttpStatus: 500 |
1623 | 2661 | ||
1624 | Value: 8110 | 2662 | Value: 8110 |
@@ -1633,13 +2671,8 @@ HttpStatus: 403 | |||
1633 | 2671 | ||
1634 | Value: 8112 | 2672 | Value: 8112 |
1635 | Name: ANASTASIS_TRUTH_CHALLENGE_UNKNOWN | 2673 | Name: ANASTASIS_TRUTH_CHALLENGE_UNKNOWN |
1636 | Description: The service is unaware of having issued a challenge. | 2674 | Description: The backend is not aware of having issued the provided challenge code. Either this is the wrong code, or it has expired. |
1637 | HttpStatus: 410 | 2675 | HttpStatus: 404 |
1638 | |||
1639 | Value: 8113 | ||
1640 | Name: ANASTASIS_TRUTH_CHALLENGE_ACTIVE | ||
1641 | Description: A challenge is already active, the service is thus not issuing a new one. | ||
1642 | HttpStatus: 208 | ||
1643 | 2676 | ||
1644 | Value: 8114 | 2677 | Value: 8114 |
1645 | Name: ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED | 2678 | Name: ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED |
@@ -1673,28 +2706,27 @@ HttpStatus: 502 | |||
1673 | 2706 | ||
1674 | Value: 8120 | 2707 | Value: 8120 |
1675 | Name: ANASTASIS_TRUTH_DECRYPTION_FAILED | 2708 | Name: ANASTASIS_TRUTH_DECRYPTION_FAILED |
1676 | Description: The decryption of the truth object failed with the provided key. | 2709 | Description: The decryption of the key share failed with the provided key. |
1677 | HttpStatus: 417 | 2710 | HttpStatus: 400 |
1678 | 2711 | ||
1679 | Value: 8121 | 2712 | Value: 8121 |
1680 | Name: ANASTASIS_TRUTH_RATE_LIMITED | 2713 | Name: ANASTASIS_TRUTH_RATE_LIMITED |
1681 | Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks. | 2714 | Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks. |
1682 | HttpStatus: 429 | 2715 | HttpStatus: 429 |
1683 | 2716 | ||
1684 | Value: 8122 | 2717 | Value: 8123 |
1685 | Name: ANASTASIS_TRUTH_AUTH_TIMEOUT | 2718 | Name: ANASTASIS_TRUTH_CHALLENGE_WRONG_METHOD |
1686 | Description: The authentication process did not yet complete. The user should try again later. | 2719 | Description: A request to issue a challenge is not valid for this authentication method. |
1687 | HttpStatus: 408 | 2720 | HttpStatus: 400 |
1688 | |||
1689 | 2721 | ||
1690 | Value: 8150 | 2722 | Value: 8150 |
1691 | Name: ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS | 2723 | Name: ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS |
1692 | Description: The backend failed to store the truth because the UUID is already in use. | 2724 | Description: The backend failed to store the key share because the UUID is already in use. |
1693 | HttpStatus: 409 | 2725 | HttpStatus: 409 |
1694 | 2726 | ||
1695 | Value: 8151 | 2727 | Value: 8151 |
1696 | Name: ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED | 2728 | Name: ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED |
1697 | Description: The backend failed to store the truth because the authorization method is not supported. | 2729 | Description: The backend failed to store the key share because the authorization method is not supported. |
1698 | HttpStatus: 400 | 2730 | HttpStatus: 400 |
1699 | 2731 | ||
1700 | 2732 | ||
@@ -1702,7 +2734,7 @@ HttpStatus: 400 | |||
1702 | Value: 8200 | 2734 | Value: 8200 |
1703 | Name: ANASTASIS_SMS_PHONE_INVALID | 2735 | Name: ANASTASIS_SMS_PHONE_INVALID |
1704 | Description: The provided phone number is not an acceptable number. | 2736 | Description: The provided phone number is not an acceptable number. |
1705 | HttpStatus: 417 | 2737 | HttpStatus: 409 |
1706 | 2738 | ||
1707 | Value: 8201 | 2739 | Value: 8201 |
1708 | Name: ANASTASIS_SMS_HELPER_EXEC_FAILED | 2740 | Name: ANASTASIS_SMS_HELPER_EXEC_FAILED |
@@ -1718,7 +2750,7 @@ HttpStatus: 500 | |||
1718 | Value: 8210 | 2750 | Value: 8210 |
1719 | Name: ANASTASIS_EMAIL_INVALID | 2751 | Name: ANASTASIS_EMAIL_INVALID |
1720 | Description: The provided email address is not an acceptable address. | 2752 | Description: The provided email address is not an acceptable address. |
1721 | HttpStatus: 417 | 2753 | HttpStatus: 409 |
1722 | 2754 | ||
1723 | Value: 8211 | 2755 | Value: 8211 |
1724 | Name: ANASTASIS_EMAIL_HELPER_EXEC_FAILED | 2756 | Name: ANASTASIS_EMAIL_HELPER_EXEC_FAILED |
@@ -1734,7 +2766,7 @@ HttpStatus: 500 | |||
1734 | Value: 8220 | 2766 | Value: 8220 |
1735 | Name: ANASTASIS_POST_INVALID | 2767 | Name: ANASTASIS_POST_INVALID |
1736 | Description: The provided postal address is not an acceptable address. | 2768 | Description: The provided postal address is not an acceptable address. |
1737 | HttpStatus: 417 | 2769 | HttpStatus: 409 |
1738 | 2770 | ||
1739 | Value: 8221 | 2771 | Value: 8221 |
1740 | Name: ANASTASIS_POST_HELPER_EXEC_FAILED | 2772 | Name: ANASTASIS_POST_HELPER_EXEC_FAILED |
@@ -1750,18 +2782,23 @@ HttpStatus: 500 | |||
1750 | Value: 8230 | 2782 | Value: 8230 |
1751 | Name: ANASTASIS_IBAN_INVALID | 2783 | Name: ANASTASIS_IBAN_INVALID |
1752 | Description: The provided IBAN address is not an acceptable IBAN. | 2784 | Description: The provided IBAN address is not an acceptable IBAN. |
1753 | HttpStatus: 417 | 2785 | HttpStatus: 409 |
2786 | |||
2787 | Value: 8231 | ||
2788 | Name: ANASTASIS_IBAN_MISSING_TRANSFER | ||
2789 | Description: The provider has not yet received the IBAN wire transfer authorizing the disclosure of the key share. | ||
2790 | HttpStatus: 403 | ||
1754 | 2791 | ||
1755 | 2792 | ||
1756 | Value: 8240 | 2793 | Value: 8240 |
1757 | Name: ANASTASIS_TOTP_KEY_MISSING | 2794 | Name: ANASTASIS_TOTP_KEY_MISSING |
1758 | Description: The backend did not find a TOTP key in the data provided. | 2795 | Description: The backend did not find a TOTP key in the data provided. |
1759 | HttpStatus: 417 | 2796 | HttpStatus: 409 |
1760 | 2797 | ||
1761 | Value: 8241 | 2798 | Value: 8241 |
1762 | Name: ANASTASIS_TOTP_KEY_INVALID | 2799 | Name: ANASTASIS_TOTP_KEY_INVALID |
1763 | Description: The key provided does not satisfy the format restrictions for an Anastasis TOTP key. | 2800 | Description: The key provided does not satisfy the format restrictions for an Anastasis TOTP key. |
1764 | HttpStatus: 417 | 2801 | HttpStatus: 409 |
1765 | 2802 | ||
1766 | 2803 | ||
1767 | Value: 8301 | 2804 | Value: 8301 |
@@ -1848,7 +2885,7 @@ HttpStatus: 0 | |||
1848 | 2885 | ||
1849 | Value: 8410 | 2886 | Value: 8410 |
1850 | Name: ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED | 2887 | Name: ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED |
1851 | Description: Our attempts to download the recovery document failed with all providers. | 2888 | Description: Our attempts to download the recovery document failed with all providers. Most likely the personal information you entered differs from the information you provided during the backup process and you should go back to the previous step. Alternatively, if you used a backup provider that is unknown to this application, you should add that provider manually. |
1852 | HttpStatus: 0 | 2889 | HttpStatus: 0 |
1853 | 2890 | ||
1854 | Value: 8411 | 2891 | Value: 8411 |
@@ -1896,8 +2933,31 @@ Name: ANASTASIS_REDUCER_INTERNAL_ERROR | |||
1896 | Description: The reducer encountered an internal error, likely a bug that needs to be reported. | 2933 | Description: The reducer encountered an internal error, likely a bug that needs to be reported. |
1897 | HttpStatus: 0 | 2934 | HttpStatus: 0 |
1898 | 2935 | ||
2936 | Value: 8420 | ||
2937 | Name: ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED | ||
2938 | Description: The reducer already synchronized with all providers. | ||
2939 | HttpStatus: 0 | ||
2940 | |||
2941 | # 8500 - 8600: Frosix | ||
1899 | 2942 | ||
1900 | # 9000 - 9998: LibEuFin. | 2943 | # 8600 - 8700: Donau |
2944 | |||
2945 | Value: 8607 | ||
2946 | Name: DONAU_GENERIC_KEYS_MISSING | ||
2947 | Description: The Donau failed to perform the operation as it could not find the private keys. This is a problem with the Donau setup, not with the client's request. | ||
2948 | HttpStatus: 503 | ||
2949 | |||
2950 | Value: 8608 | ||
2951 | Name: DONAU_CHARITY_SIGNATURE_INVALID | ||
2952 | Description: The signature of the charity key is not valid. | ||
2953 | HttpStatus: 403 | ||
2954 | |||
2955 | Value: 8609 | ||
2956 | Name: DONAU_CHARITY_NOT_FOUND | ||
2957 | Description: The charity is unknown. | ||
2958 | HttpStatus: 404 | ||
2959 | |||
2960 | # 9000 - 9599: LibEuFin. | ||
1901 | 2961 | ||
1902 | Value: 9000 | 2962 | Value: 9000 |
1903 | Name: LIBEUFIN_NEXUS_GENERIC_ERROR | 2963 | Name: LIBEUFIN_NEXUS_GENERIC_ERROR |
@@ -1919,7 +2979,70 @@ Name: LIBEUFIN_SANDBOX_UNCAUGHT_EXCEPTION | |||
1919 | Description: An uncaught exception happened in the LibEuFin sandbox service. | 2979 | Description: An uncaught exception happened in the LibEuFin sandbox service. |
1920 | HttpStatus: 500 | 2980 | HttpStatus: 500 |
1921 | 2981 | ||
2982 | # 9600 - 9749: Taldir | ||
2983 | Value: 9600 | ||
2984 | Name: TALDIR_METHOD_NOT_SUPPORTED | ||
2985 | Description: This validation method is not supported by the service. | ||
2986 | HttpStatus: 404 | ||
2987 | |||
2988 | Value: 9601 | ||
2989 | Name: TALDIR_REGISTER_RATE_LIMITED | ||
2990 | Description: Number of allowed attempts for initiating a challenge exceeded. | ||
2991 | HttpStatus: 429 | ||
2992 | |||
2993 | # 9750-9999: Challenger | ||
2994 | Value: 9750 | ||
2995 | Name: CHALLENGER_GENERIC_CLIENT_UNKNOWN | ||
2996 | Description: The client is unknown or unauthorized. | ||
2997 | HttpStatus: 404 | ||
2998 | |||
2999 | Value: 9751 | ||
3000 | Name: CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI | ||
3001 | Description: The client is not authorized to use the given redirect URI. | ||
3002 | HttpStatus: 403 | ||
3003 | |||
3004 | Value: 9752 | ||
3005 | Name: CHALLENGER_HELPER_EXEC_FAILED | ||
3006 | Description: The service failed to execute its helper process to send the challenge. | ||
3007 | HttpStatus: 500 | ||
3008 | |||
3009 | Value: 9753 | ||
3010 | Name: CHALLENGER_GRANT_UNKNOWN | ||
3011 | Description: The grant is unknown to the service (it could also have expired). | ||
3012 | HttpStatus: 404 | ||
3013 | |||
3014 | Value: 9754 | ||
3015 | Name: CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE | ||
3016 | Description: The code given is not even well-formed. | ||
3017 | HttpStatus: 403 | ||
3018 | |||
3019 | Value: 9755 | ||
3020 | Name: CHALLENGER_GENERIC_VALIDATION_UNKNOWN | ||
3021 | Description: The service is not aware of the referenced validation process. | ||
3022 | HttpStatus: 404 | ||
3023 | |||
3024 | Value: 9756 | ||
3025 | Name: CHALLENGER_CLIENT_FORBIDDEN_INVALID_CODE | ||
3026 | Description: The code given is not valid. | ||
3027 | HttpStatus: 403 | ||
3028 | |||
3029 | Value: 9757 | ||
3030 | Name: CHALLENGER_TOO_MANY_ATTEMPTS | ||
3031 | Description: Too many attempts have been made, validation is temporarily disabled for this address. | ||
3032 | HttpStatus: 429 | ||
3033 | |||
3034 | Value: 9758 | ||
3035 | Name: CHALLENGER_INVALID_PIN | ||
3036 | Description: The PIN code provided is incorrect. | ||
3037 | HttpStatus: 403 | ||
3038 | |||
3039 | Value: 9759 | ||
3040 | Name: CHALLENGER_MISSING_ADDRESS | ||
3041 | Description: The token cannot be valid as no address was ever provided by the client. | ||
3042 | HttpStatus: 409 | ||
3043 | |||
1922 | 3044 | ||
3045 | # Some of our build systems expect the range to be < 10k, so let's keep it like this for now. | ||
1923 | Value: 9999 | 3046 | Value: 9999 |
1924 | Name: END | 3047 | Name: END |
1925 | Description: End of error code range. | 3048 | Description: End of error code range. |
diff --git a/gnu-taler-error-codes/rst.footer b/gnu-taler-error-codes/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-taler-error-codes/rst.footer | |||
diff --git a/gnu-taler-error-codes/rst.header b/gnu-taler-error-codes/rst.header new file mode 100644 index 0000000..0b30d8a --- /dev/null +++ b/gnu-taler-error-codes/rst.header | |||
@@ -0,0 +1,14 @@ | |||
1 | GNU Taler Error Codes | ||
2 | --------------------- | ||
3 | |||
4 | Entries | ||
5 | ^^^^^^^ | ||
6 | |||
7 | .. list-table:: GNU Taler Error Codes | ||
8 | :widths: auto | ||
9 | :header-rows: 1 | ||
10 | |||
11 | * - Name | ||
12 | - Value | ||
13 | - HTTP Status | ||
14 | - Description | ||
diff --git a/gnu-taler-error-codes/rst.template b/gnu-taler-error-codes/rst.template new file mode 100644 index 0000000..9bff06c --- /dev/null +++ b/gnu-taler-error-codes/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Value}} | ||
3 | - {{HttpStatus_Value}} ({{HttpStatus_Identifier}}) | ||
4 | - {{Description}} | ||
diff --git a/gnu-taler-extensions/Makefile b/gnu-taler-extensions/Makefile new file mode 100644 index 0000000..edb88bb --- /dev/null +++ b/gnu-taler-extensions/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | all: check | ||
2 | |||
3 | check: registry.rec | ||
4 | recfix --check registry.rec | ||
5 | |||
6 | .PHONY: all check | ||
diff --git a/gnu-taler-extensions/registry.rec b/gnu-taler-extensions/registry.rec new file mode 100644 index 0000000..d9b4eff --- /dev/null +++ b/gnu-taler-extensions/registry.rec | |||
@@ -0,0 +1,43 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNU Taler extensions, as per Design document 6 | ||
4 | # | ||
5 | %rec: TalerExtensions | ||
6 | %key: Identifier | ||
7 | %typedef: Identifier_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789:\.]*$/ | ||
8 | %type: Identifier Identifier_t | ||
9 | %unique: Identifier | ||
10 | %mandatory: Identifier | ||
11 | %typedef: Description_t regexp |^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\(\)\.,;!"':#\/ -]*$| | ||
12 | %type: Description Description_t | ||
13 | %mandatory: Description | ||
14 | %mandatory: Critical | ||
15 | %type: Critical bool | ||
16 | %allowed: Contact | ||
17 | %allowed: References | ||
18 | %sort: Identifier Description Contact References | ||
19 | |||
20 | |||
21 | Identifier: AGE_RESTRICTIONS | ||
22 | Description: Restrictions to limit spending of coins on products that are legally sold only to customers below a given age. | ||
23 | Critical: true | ||
24 | Contact: oec-taler@kesim.org | ||
25 | References: Design document 24 | ||
26 | |||
27 | Identifier: POLICY_REFUND | ||
28 | Description: Support for refund in payments. | ||
29 | Critical: false | ||
30 | Contact: team@taler.net | ||
31 | References: Design document 13 | ||
32 | |||
33 | Identifier: POLICY_AUCTION | ||
34 | Description: Auction support via libbrandt | ||
35 | Critical: false | ||
36 | Contact: oec-taler@kesim.org | ||
37 | References: Design document 32 | ||
38 | |||
39 | Identifier: POLICY_ESCROW | ||
40 | Description: Escrow functionality provided by the exchange. Deposited coins can be put into escrow for a specified time interval, potentially in the future. If the owner of the coins and the merchant both sign the contract within the interval, the coins' value will be transferred to the merchant's account. Otherwise, the coins can be refreshed by the owner. | ||
41 | Critical: false | ||
42 | Contact: oec-taler@kesim.org | ||
43 | References: NOT YET | ||
diff --git a/gnu-taler-extensions/rst.footer b/gnu-taler-extensions/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnu-taler-extensions/rst.footer | |||
diff --git a/gnu-taler-extensions/rst.header b/gnu-taler-extensions/rst.header new file mode 100644 index 0000000..a172030 --- /dev/null +++ b/gnu-taler-extensions/rst.header | |||
@@ -0,0 +1,4 @@ | |||
1 | GNS Default Top-Level-Domains | ||
2 | ----------------------------- | ||
3 | |||
4 | |||
diff --git a/gnu-taler-extensions/rst.template b/gnu-taler-extensions/rst.template new file mode 100644 index 0000000..6d757b7 --- /dev/null +++ b/gnu-taler-extensions/rst.template | |||
@@ -0,0 +1,9 @@ | |||
1 | |||
2 | |||
3 | =================== =========================================================== | ||
4 | Suffix {{Name}} | ||
5 | ------------------- ----------------------------------------------------------- | ||
6 | Zone Key {{Key}} | ||
7 | Comment {{Comment}} | ||
8 | =================== =========================================================== | ||
9 | |||
diff --git a/gnu-taler-kyc-attributes/Makefile b/gnu-taler-kyc-attributes/Makefile new file mode 100644 index 0000000..edb88bb --- /dev/null +++ b/gnu-taler-kyc-attributes/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | all: check | ||
2 | |||
3 | check: registry.rec | ||
4 | recfix --check registry.rec | ||
5 | |||
6 | .PHONY: all check | ||
diff --git a/gnu-taler-kyc-attributes/registry.rec b/gnu-taler-kyc-attributes/registry.rec new file mode 100644 index 0000000..af71f4c --- /dev/null +++ b/gnu-taler-kyc-attributes/registry.rec | |||
@@ -0,0 +1,66 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNU Taler attributes, as per Design document 31 | ||
4 | # | ||
5 | %rec: TalerAttributes | ||
6 | %key: Identifier | ||
7 | %typedef: Identifier_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789:\.]*$/ | ||
8 | %type: Identifier Identifier_t | ||
9 | %unique: Identifier | ||
10 | %mandatory: Identifier | ||
11 | %typedef: Description_t regexp |^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\(\)\.,;!"':#\/ -]*$| | ||
12 | %type: Description Description_t | ||
13 | %mandatory: Description | ||
14 | %typedef: Category_t enum individual business both | ||
15 | %type: Category Category_t | ||
16 | %mandatory: Category | ||
17 | %allowed: Contact | ||
18 | %allowed: References | ||
19 | %allowed: Comment | ||
20 | %sort: Identifier Description Contact References | ||
21 | |||
22 | |||
23 | Identifier: BUSINESS_NAME | ||
24 | Description: Full legal name of the business. | ||
25 | Category: business | ||
26 | |||
27 | Identifier: BUSINESS_TAX_ID | ||
28 | Description: Tax identifier of the business. | ||
29 | Category: business | ||
30 | Comment: Format may depend on the country of residence of the business. | ||
31 | |||
32 | Identifier: FULL_NAME | ||
33 | Description: Full legal name of an individual. | ||
34 | Category: individual | ||
35 | |||
36 | Identifier: CONTACT_EMAIL | ||
37 | Description: E-mail address to contact the individual or business. | ||
38 | Category: both | ||
39 | Comment: Can be validated via E-mail with TAN. | ||
40 | |||
41 | Identifier: CONTACT_PHONE | ||
42 | Description: Phone number to contact the individual or business. | ||
43 | Category: both | ||
44 | Comment: Can be validated via SMS-TAN or phone call. | ||
45 | |||
46 | Identifier: CONTACT_DNS_DOMAIN | ||
47 | Description: DNS domain name owned by the individual or business. | ||
48 | Category: both | ||
49 | Comment: Can be validated by having the owner set an appropriate DNS TXT record. | ||
50 | |||
51 | Identifier: CONTACT_WEB_DOMAIN | ||
52 | Description: Web site owned by the individual or business. | ||
53 | Category: both | ||
54 | Comment: Can be validated by having the owner serve an appropriate well-known page. | ||
55 | |||
56 | Identifier: ADDRESS_STREET | ||
57 | Description: Street address (including house number) of the individual or business. | ||
58 | Category: both | ||
59 | |||
60 | Identifier: ADDRESS_CITY | ||
61 | Description: Name of the city where the individual or business resides. | ||
62 | Category: both | ||
63 | |||
64 | Identifier: ADDRESS_COUNTRY | ||
65 | Description: Name of the country where the individual or business resides. | ||
66 | Category: both | ||
diff --git a/gnunet-dht-block-types/.gitignore b/gnunet-dht-block-types/.gitignore new file mode 100644 index 0000000..0a437d0 --- /dev/null +++ b/gnunet-dht-block-types/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnu-name-system-record-types.h | |||
diff --git a/gnunet-dht-block-types/Makefile b/gnunet-dht-block-types/Makefile new file mode 100644 index 0000000..7ac5f54 --- /dev/null +++ b/gnunet-dht-block-types/Makefile | |||
@@ -0,0 +1,28 @@ | |||
1 | FILES=gnunet_dht_block_types.h gnunet_dht_block_types.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | rm -f *.tmp | ||
9 | clean: | ||
10 | rm -f $(FILES) *.tmp | ||
11 | |||
12 | gnunet_dht_block_types.h.tmp: registry.rec h.template | ||
13 | ../format.sh h.template < registry.rec > $@ | ||
14 | |||
15 | gnunet_dht_block_types.h: h.header gnunet_dht_block_types.h.tmp h.footer | ||
16 | cat h.header gnunet_dht_block_types.h.tmp h.footer > $@ | ||
17 | |||
18 | gnunet_dht_block_types.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat README POLICY rst.header.template > $@ | ||
23 | |||
24 | gnunet_dht_block_types.rst: rst.header.tmp gnunet_dht_block_types.rst.tmp rst.footer | ||
25 | cat rst.header.tmp gnunet_dht_block_types.rst.tmp rst.footer > $@ | ||
26 | |||
27 | |||
28 | .PHONY: check clean distclean | ||
diff --git a/gnunet-dht-block-types/POLICY b/gnunet-dht-block-types/POLICY new file mode 100644 index 0000000..4308df6 --- /dev/null +++ b/gnunet-dht-block-types/POLICY | |||
@@ -0,0 +1,11 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Developers working on GNUnet or packages based on GNUnet should | ||
5 | feel free to extend this registry. Entries may be deleted if | ||
6 | no code using them is still expected to be in production anywhere. | ||
7 | |||
8 | Updating the name of the package or subsystem is allowed provided | ||
9 | that the code using the signature is being moved, as those fields | ||
10 | are merely informational or used for code generation. | ||
11 | |||
diff --git a/gnunet-dht-block-types/README b/gnunet-dht-block-types/README new file mode 100644 index 0000000..844d7e2 --- /dev/null +++ b/gnunet-dht-block-types/README | |||
@@ -0,0 +1,13 @@ | |||
1 | R5N DHT Block Types | ||
2 | ------------------- | ||
3 | |||
4 | This registry is for GNUnet DHT Block Types. | ||
5 | |||
6 | DHT Block Types types uniquely identify the different kinds | ||
7 | of blocks that can be found in the GNUnet DHT. | ||
8 | |||
9 | This registry is used to ensure that the names and numeric values | ||
10 | used to identify block types are uniquely defined and to | ||
11 | allow DHT implementors to find out details about the | ||
12 | respective semantics and human-readable syntax. | ||
13 | |||
diff --git a/gnunet-dht-block-types/h.footer b/gnunet-dht-block-types/h.footer new file mode 100644 index 0000000..6e59d47 --- /dev/null +++ b/gnunet-dht-block-types/h.footer | |||
@@ -0,0 +1,11 @@ | |||
1 | }; | ||
2 | |||
3 | |||
4 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
5 | { | ||
6 | #endif | ||
7 | #ifdef __cplusplus | ||
8 | } | ||
9 | #endif | ||
10 | |||
11 | #endif | ||
diff --git a/gnunet-dht-block-types/h.header b/gnunet-dht-block-types/h.header new file mode 100644 index 0000000..1ecca53 --- /dev/null +++ b/gnunet-dht-block-types/h.header | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNUNET_DHT_BLOCK_TYPES_H | ||
21 | #define GNUNET_DHT_BLOCK_TYPES_H | ||
22 | |||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add DHT block types, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
31 | |||
32 | #ifdef __cplusplus | ||
33 | extern "C" { | ||
34 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
35 | } | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | /** | ||
40 | * Blocks in the datastore and the datacache must have a unique type. | ||
41 | */ | ||
42 | enum GNUNET_BLOCK_Type | ||
43 | { | ||
diff --git a/gnunet-dht-block-types/h.template b/gnunet-dht-block-types/h.template new file mode 100644 index 0000000..5bdad42 --- /dev/null +++ b/gnunet-dht-block-types/h.template | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Comment}} | ||
5 | */ | ||
6 | GNUNET_BLOCK_TYPE_{{Name}} = {{Number}}, | ||
diff --git a/gnunet-dht-block-types/registry.rec b/gnunet-dht-block-types/registry.rec new file mode 100644 index 0000000..e73dea4 --- /dev/null +++ b/gnunet-dht-block-types/registry.rec | |||
@@ -0,0 +1,102 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNU Name System record types | ||
4 | # | ||
5 | |||
6 | %rec: BlockType | ||
7 | %key: Number | ||
8 | %type: Number int | ||
9 | %mandatory: Number | ||
10 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | ||
11 | %type: Name Name_t | ||
12 | %unique: Name | ||
13 | %mandatory: Name | ||
14 | %mandatory: Comment | ||
15 | %allowed: Contact | ||
16 | %allowed: References | ||
17 | %sort: Number Name Contact References | ||
18 | |||
19 | Number: 0 | ||
20 | Name: ANY | ||
21 | Comment: Identifier for any block. | ||
22 | References: None | ||
23 | |||
24 | Number: 1 | ||
25 | Name: FS_DBLOCK | ||
26 | Comment: Data block (leaf) in the CHK tree. | ||
27 | References: None | ||
28 | |||
29 | Number: 2 | ||
30 | Name: FS_IBLOCK | ||
31 | Comment: Inner block in the CHK tree. | ||
32 | References: None | ||
33 | |||
34 | Number: 6 | ||
35 | Name: FS_ONDEMAND | ||
36 | Comment: Type of a block representing a block to be encoded on demand from disk. Should never appear on the network directly. | ||
37 | References: None | ||
38 | |||
39 | Number: 7 | ||
40 | Name: LEGACY_HELLO | ||
41 | Comment: Legacy type of a block that contains a HELLO for a peer. | ||
42 | References: None | ||
43 | |||
44 | Number: 8 | ||
45 | Name: TEST | ||
46 | Comment: Block for testing. | ||
47 | References: None | ||
48 | |||
49 | Number: 9 | ||
50 | Name: FS_UBLOCK | ||
51 | Comment: Type of a block representing any type of search result (universal). | ||
52 | References: None | ||
53 | |||
54 | Number: 10 | ||
55 | Name: DNS | ||
56 | Comment: Block for storing DNS exit service advertisements. | ||
57 | References: None | ||
58 | |||
59 | Number: 11 | ||
60 | Name: GNS_NAMERECORD | ||
61 | Comment: Block for storing GNS record data. | ||
62 | References: None | ||
63 | |||
64 | Number: 12 | ||
65 | Name: REVOCATION | ||
66 | Comment: Block type for a revocation message by which a key is revoked. | ||
67 | References: None | ||
68 | |||
69 | Number: 13 | ||
70 | Name: DHT_HELLO | ||
71 | Comment: Type of a block that contains a DHT-NG HELLO for a peer. | ||
72 | References: LSD-0004 | ||
73 | |||
74 | Number: 22 | ||
75 | Name: REGEX | ||
76 | Comment: Block to store a cadet regex state | ||
77 | References: None | ||
78 | |||
79 | Number: 23 | ||
80 | Name: REGEX_ACCEPT | ||
81 | Comment: Block to store a cadet regex accepting state | ||
82 | References: None | ||
83 | |||
84 | Number: 24 | ||
85 | Name: SET_TEST | ||
86 | Comment: Block for testing set/consensus. If first byte of the block is non-zero, the block is considered invalid. | ||
87 | References: None | ||
88 | |||
89 | Number: 25 | ||
90 | Name: CONSENSUS_ELEMENT | ||
91 | Comment: Block type for consensus elements. Contains either special marker elements or a nested block. | ||
92 | References: None | ||
93 | |||
94 | Number: 26 | ||
95 | Name: SETI_TEST | ||
96 | Comment: Block for testing set intersection. If first byte of the block is non-zero, the block is considered invalid. | ||
97 | References: None | ||
98 | |||
99 | Number: 27 | ||
100 | Name: SETU_TEST | ||
101 | Comment: Block for testing set union. If first byte of the block is non-zero, the block is considered invalid. | ||
102 | References: None | ||
diff --git a/gnunet-dht-block-types/rst.footer b/gnunet-dht-block-types/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnunet-dht-block-types/rst.footer | |||
diff --git a/gnunet-dht-block-types/rst.header.template b/gnunet-dht-block-types/rst.header.template new file mode 100644 index 0000000..a577b68 --- /dev/null +++ b/gnunet-dht-block-types/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: R5N Block Types | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - References | ||
11 | - Comment | ||
diff --git a/gnunet-dht-block-types/rst.template b/gnunet-dht-block-types/rst.template new file mode 100644 index 0000000..11468c9 --- /dev/null +++ b/gnunet-dht-block-types/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{References}} | ||
4 | - {{Comment}} | ||
diff --git a/gnunet-error-codes/.gitignore b/gnunet-error-codes/.gitignore new file mode 100644 index 0000000..f6c67c1 --- /dev/null +++ b/gnunet-error-codes/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | gnunet_error_codes.c | ||
2 | gnunet_error_codes.go | ||
3 | gnunet_error_codes.ts | ||
diff --git a/gnunet-error-codes/Makefile b/gnunet-error-codes/Makefile new file mode 100644 index 0000000..14fd480 --- /dev/null +++ b/gnunet-error-codes/Makefile | |||
@@ -0,0 +1,71 @@ | |||
1 | FILES=gnunet_error_codes.h \ | ||
2 | gnunet_error_codes.c \ | ||
3 | gnunet_error_codes.ts \ | ||
4 | gnunet_error_codes.go \ | ||
5 | gnunet_error_codes.rst | ||
6 | |||
7 | all: check $(FILES) | ||
8 | |||
9 | check: registry.rec | ||
10 | recfix --check registry.rec | ||
11 | |||
12 | distclean: | ||
13 | rm -f *.tmp | ||
14 | |||
15 | clean: | ||
16 | rm -f $(FILES) *.tmp | ||
17 | |||
18 | prep: | ||
19 | cd ../http-status-codes; make ; cd - | ||
20 | |||
21 | # Because prep is phony, this rule always triggers. To avoid | ||
22 | # combined.tmp cascading into triggering the other rules even | ||
23 | # if nothing changed, we use 'diff' to make sure that 'recsel' | ||
24 | # actually changed the result. | ||
25 | combined.tmp: registry.rec prep | ||
26 | recsel -t GnunetErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp | ||
27 | if ! diff $@ combined.xtmp > /dev/null; then mv combined.xtmp $@; else rm combined.xtmp; fi | ||
28 | |||
29 | combined-escaped.tmp: combined.tmp | ||
30 | sed 's/"/\\"/g' combined.tmp > $@ | ||
31 | |||
32 | length.tmp: combined.tmp | ||
33 | recsel -p "Count(Description):ECS_LENGTH" combined.tmp > $@ | ||
34 | |||
35 | gnunet_error_codes.h.tmp: combined.tmp h.template | ||
36 | ../format.sh h.template < combined.tmp > $@ | ||
37 | |||
38 | gnunet_error_codes.h: h.header gnunet_error_codes.h.tmp h.footer | ||
39 | cat h.header gnunet_error_codes.h.tmp h.footer > $@ | ||
40 | |||
41 | gnunet_error_codes.c.tmp: combined-escaped.tmp c.template | ||
42 | ../format.sh c.template < combined-escaped.tmp > $@ | ||
43 | |||
44 | gnunet_error_codes-length.c.tmp: length.tmp c-length.template | ||
45 | ../format.sh c-length.template < length.tmp > $@ | ||
46 | |||
47 | gnunet_error_codes.c: c.header gnunet_error_codes.c.tmp gnunet_error_codes-length.c.tmp c.footer | ||
48 | cat c.header gnunet_error_codes.c.tmp gnunet_error_codes-length.c.tmp c.footer > $@ | ||
49 | |||
50 | gnunet_error_codes.ts.tmp: combined.tmp ts.template | ||
51 | ../format.sh ts.template < combined.tmp > $@ | ||
52 | |||
53 | gnunet_error_codes.ts: ts.header gnunet_error_codes.ts.tmp ts.footer | ||
54 | cat ts.header gnunet_error_codes.ts.tmp ts.footer > $@ | ||
55 | |||
56 | gnunet_error_codes.go.tmp: combined.tmp go.template | ||
57 | ../format.sh go.template < combined.tmp > $@ | ||
58 | |||
59 | gnunet_error_codes.go: go.header gnunet_error_codes.go.tmp go.footer | ||
60 | cat go.header gnunet_error_codes.go.tmp go.footer > $@ | ||
61 | |||
62 | gnunet_error_codes.rst.tmp: combined.tmp rst.template | ||
63 | ../format.sh rst.template < combined.tmp > $@ | ||
64 | |||
65 | rst.header.tmp: | ||
66 | cat README POLICY rst.header.template > $@ | ||
67 | |||
68 | gnunet_error_codes.rst: rst.header.tmp gnunet_error_codes.rst.tmp rst.footer | ||
69 | cat rst.header.tmp gnunet_error_codes.rst.tmp rst.footer > $@ | ||
70 | |||
71 | .PHONY: check clean distclean prep | ||
diff --git a/gnunet-error-codes/POLICY b/gnunet-error-codes/POLICY new file mode 100644 index 0000000..4308df6 --- /dev/null +++ b/gnunet-error-codes/POLICY | |||
@@ -0,0 +1,11 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Developers working on GNUnet or packages based on GNUnet should | ||
5 | feel free to extend this registry. Entries may be deleted if | ||
6 | no code using them is still expected to be in production anywhere. | ||
7 | |||
8 | Updating the name of the package or subsystem is allowed provided | ||
9 | that the code using the signature is being moved, as those fields | ||
10 | are merely informational or used for code generation. | ||
11 | |||
diff --git a/gnunet-error-codes/README b/gnunet-error-codes/README new file mode 100644 index 0000000..6fce4a8 --- /dev/null +++ b/gnunet-error-codes/README | |||
@@ -0,0 +1,5 @@ | |||
1 | GNUnet Error Codes | ||
2 | ------------------ | ||
3 | |||
4 | GNUnet error code registry. | ||
5 | |||
diff --git a/gnunet-error-codes/c-length.template b/gnunet-error-codes/c-length.template new file mode 100644 index 0000000..24e3e41 --- /dev/null +++ b/gnunet-error-codes/c-length.template | |||
@@ -0,0 +1,9 @@ | |||
1 | |||
2 | |||
3 | }; | ||
4 | |||
5 | |||
6 | /** | ||
7 | * The length of @e code_hint_pairs. | ||
8 | */ | ||
9 | static const unsigned int code_hint_pairs_length = {{ECS_LENGTH}}; | ||
diff --git a/gnunet-error-codes/c.footer b/gnunet-error-codes/c.footer new file mode 100644 index 0000000..ad326ec --- /dev/null +++ b/gnunet-error-codes/c.footer | |||
@@ -0,0 +1,66 @@ | |||
1 | |||
2 | |||
3 | |||
4 | const char * | ||
5 | GNUNET_ErrorCode_get_hint (enum GNUNET_ErrorCode ec) | ||
6 | { | ||
7 | unsigned int lower = 0; | ||
8 | unsigned int upper = code_hint_pairs_length - 1; | ||
9 | unsigned int mid = upper / 2; | ||
10 | while (lower <= upper) | ||
11 | { | ||
12 | mid = (upper + lower) / 2; | ||
13 | if (code_hint_pairs[mid].ec < ec) | ||
14 | { | ||
15 | lower = mid + 1; | ||
16 | } | ||
17 | else if (code_hint_pairs[mid].ec > ec) | ||
18 | { | ||
19 | upper = mid - 1; | ||
20 | } | ||
21 | else | ||
22 | { | ||
23 | return code_hint_pairs[mid].hint; | ||
24 | } | ||
25 | } | ||
26 | return "<no hint found>"; | ||
27 | } | ||
28 | |||
29 | |||
30 | unsigned int | ||
31 | GNUNET_ErrorCode_get_http_status (enum GNUNET_ErrorCode ec) | ||
32 | { | ||
33 | unsigned int lower = 0; | ||
34 | unsigned int upper = code_hint_pairs_length - 1; | ||
35 | unsigned int mid = upper / 2; | ||
36 | while (lower <= upper) | ||
37 | { | ||
38 | mid = (upper + lower) / 2; | ||
39 | if (code_hint_pairs[mid].ec < ec) | ||
40 | { | ||
41 | lower = mid + 1; | ||
42 | } | ||
43 | else if (code_hint_pairs[mid].ec > ec) | ||
44 | { | ||
45 | upper = mid - 1; | ||
46 | } | ||
47 | else | ||
48 | { | ||
49 | return code_hint_pairs[mid].http_code; | ||
50 | } | ||
51 | } | ||
52 | return UINT_MAX; | ||
53 | } | ||
54 | |||
55 | |||
56 | unsigned int | ||
57 | GNUNET_ErrorCode_get_http_status_safe (enum GNUNET_ErrorCode ec) | ||
58 | { | ||
59 | unsigned int hc; | ||
60 | |||
61 | hc = GNUNET_ErrorCode_get_http_status (ec); | ||
62 | if ( (0 == hc) || | ||
63 | (UINT_MAX == hc) ) | ||
64 | return MHD_HTTP_INTERNAL_SERVER_ERROR; | ||
65 | return hc; | ||
66 | } | ||
diff --git a/gnunet-error-codes/c.header b/gnunet-error-codes/c.header new file mode 100644 index 0000000..9539ef3 --- /dev/null +++ b/gnunet-error-codes/c.header | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #include "gnunet_error_codes.h" | ||
21 | #include <stddef.h> | ||
22 | #include <microhttpd.h> | ||
23 | #include <gettext.h> | ||
24 | |||
25 | /** | ||
26 | * MHD does not define our value for 0 (client-side generated code). | ||
27 | */ | ||
28 | #define MHD_HTTP_UNINITIALIZED 0 | ||
29 | |||
30 | /** | ||
31 | * A pair containing an error code and its hint. | ||
32 | */ | ||
33 | struct ErrorCodeAndHint | ||
34 | { | ||
35 | /** | ||
36 | * The error code. | ||
37 | */ | ||
38 | enum GNUNET_ErrorCode ec; | ||
39 | |||
40 | /** | ||
41 | * The hint. | ||
42 | */ | ||
43 | const char *hint; | ||
44 | |||
45 | /** | ||
46 | * The HTTP status code. | ||
47 | */ | ||
48 | unsigned int http_code; | ||
49 | }; | ||
50 | |||
51 | |||
52 | /** | ||
53 | * The list of all error codes with their hints. | ||
54 | */ | ||
55 | static const struct ErrorCodeAndHint code_hint_pairs[] = { | ||
diff --git a/gnunet-error-codes/c.template b/gnunet-error-codes/c.template new file mode 100644 index 0000000..140f09f --- /dev/null +++ b/gnunet-error-codes/c.template | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | { | ||
3 | .ec = GNUNET_EC_{{Name}}, | ||
4 | .hint = gettext_noop ("{{Description}}"), | ||
5 | .http_code = MHD_HTTP_{{HttpStatus_Identifier}} | ||
6 | }, | ||
diff --git a/gnunet-error-codes/go.footer b/gnunet-error-codes/go.footer new file mode 100644 index 0000000..bea8cd1 --- /dev/null +++ b/gnunet-error-codes/go.footer | |||
@@ -0,0 +1 @@ | |||
) | |||
diff --git a/gnunet-error-codes/go.header b/gnunet-error-codes/go.header new file mode 100644 index 0000000..9c5d1e7 --- /dev/null +++ b/gnunet-error-codes/go.header | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | |||
21 | package gana | ||
22 | |||
23 | const ( | ||
diff --git a/gnunet-error-codes/go.template b/gnunet-error-codes/go.template new file mode 100644 index 0000000..fd4ba79 --- /dev/null +++ b/gnunet-error-codes/go.template | |||
@@ -0,0 +1,7 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Description}} | ||
5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). | ||
6 | */ | ||
7 | {{Name}} = {{Value}} | ||
diff --git a/gnunet-error-codes/h.footer b/gnunet-error-codes/h.footer new file mode 100644 index 0000000..fcd44d7 --- /dev/null +++ b/gnunet-error-codes/h.footer | |||
@@ -0,0 +1,45 @@ | |||
1 | |||
2 | |||
3 | }; | ||
4 | |||
5 | |||
6 | /** | ||
7 | * Returns a hint for a given error code. | ||
8 | * | ||
9 | * @param ec the error code. | ||
10 | * @return the hint if it could be found, otherwise "<no hint found>" | ||
11 | */ | ||
12 | const char * | ||
13 | GNUNET_ErrorCode_get_hint (enum GNUNET_ErrorCode ec); | ||
14 | |||
15 | |||
16 | /** | ||
17 | * Return HTTP status for a given error code. | ||
18 | * | ||
19 | * @param ec the error code. | ||
20 | * @return the HTTP status code for the given @a ec, UINT_MAX if not found | ||
21 | */ | ||
22 | unsigned int | ||
23 | GNUNET_ErrorCode_get_http_status (enum GNUNET_ErrorCode ec); | ||
24 | |||
25 | |||
26 | /** | ||
27 | * Return HTTP status for a given error code that is guaranteed | ||
28 | * to work (no corner cases). | ||
29 | * | ||
30 | * @param ec the error code. | ||
31 | * @return the HTTP status code for the given @a ec, 500 if | ||
32 | * the @a ec is not found or is a client-side code | ||
33 | */ | ||
34 | unsigned int | ||
35 | GNUNET_ErrorCode_get_http_status_safe (enum GNUNET_ErrorCode ec); | ||
36 | |||
37 | |||
38 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
39 | { | ||
40 | #endif | ||
41 | #ifdef __cplusplus | ||
42 | } | ||
43 | #endif | ||
44 | |||
45 | #endif | ||
diff --git a/gnunet-error-codes/h.header b/gnunet-error-codes/h.header new file mode 100644 index 0000000..92debba --- /dev/null +++ b/gnunet-error-codes/h.header | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | /** | ||
21 | * @file include/taler_error_codes.h | ||
22 | * @brief GNUnet error codes, generated via https://gana.gnunet.org/ | ||
23 | * | ||
24 | * Do NOT edit this file, it is generated! | ||
25 | */ | ||
26 | #ifndef GNUNET_ERROR_CODES_H | ||
27 | #define GNUNET_ERROR_CODES_H | ||
28 | |||
29 | #ifdef __cplusplus | ||
30 | extern "C" { | ||
31 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
32 | } | ||
33 | #endif | ||
34 | #endif | ||
35 | |||
36 | #include <limits.h> | ||
37 | |||
38 | |||
39 | /** | ||
40 | * Taler error codes. | ||
41 | */ | ||
42 | enum GNUNET_ErrorCode | ||
43 | { | ||
diff --git a/gnunet-error-codes/h.template b/gnunet-error-codes/h.template new file mode 100644 index 0000000..b79bf6c --- /dev/null +++ b/gnunet-error-codes/h.template | |||
@@ -0,0 +1,7 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Description}} | ||
5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). | ||
6 | */ | ||
7 | GNUNET_EC_{{Name}} = {{Value}}, | ||
diff --git a/gnunet-error-codes/registry.rec b/gnunet-error-codes/registry.rec new file mode 100644 index 0000000..e833bb5 --- /dev/null +++ b/gnunet-error-codes/registry.rec | |||
@@ -0,0 +1,136 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for GNUnet errors. | ||
4 | # | ||
5 | %rec: GnunetErrorCode | ||
6 | %key: Value | ||
7 | %typedef: ValueRange_t range 0 9999 | ||
8 | %type: Value ValueRange_t | ||
9 | %mandatory: Value | ||
10 | %typedef: Description_t regexp |^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\(\)\.,;!"':#\/ -]*$| | ||
11 | %type: Description Description_t | ||
12 | %mandatory: Description | ||
13 | %typedef: Name_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$/ | ||
14 | %type: Name Name_t | ||
15 | %unique: Name | ||
16 | %mandatory: Name | ||
17 | # A status of 0 means no HTTP status is associated | ||
18 | %type: HttpStatus rec HttpStatusCode | ||
19 | %mandatory: HttpStatus | ||
20 | %sort: Value | ||
21 | |||
22 | Value: 0 | ||
23 | Name: NONE | ||
24 | Description: No error (success). | ||
25 | HttpStatus: 0 | ||
26 | |||
27 | Value: 1 | ||
28 | Name: UNKNOWN | ||
29 | Description: Unknown and unspecified error. | ||
30 | HttpStatus: 500 | ||
31 | |||
32 | Value: 101 | ||
33 | Name: SERVICE_COMMUNICATION_FAILED | ||
34 | Description: Communication with service failed. | ||
35 | HttpStatus: 500 | ||
36 | |||
37 | # IDENTITY Error Codes | ||
38 | |||
39 | Value: 200 | ||
40 | Name: IDENTITY_NOT_FOUND | ||
41 | Description: Ego not found. | ||
42 | HttpStatus: 404 | ||
43 | |||
44 | Value: 201 | ||
45 | Name: IDENTITY_NAME_CONFLICT | ||
46 | Description: Identifier already in use for another ego. | ||
47 | HttpStatus: 409 | ||
48 | |||
49 | Value: 202 | ||
50 | Name: IDENTITY_INVALID | ||
51 | Description: The given ego is invalid or malformed. | ||
52 | HttpStatus: 500 | ||
53 | |||
54 | # NAMESTORE Error Codes | ||
55 | |||
56 | Value: 5000 | ||
57 | Name: NAMESTORE_UNKNOWN | ||
58 | Description: Unknown namestore error. | ||
59 | HttpStatus: 500 | ||
60 | |||
61 | Value: 5001 | ||
62 | Name: NAMESTORE_ITERATION_FAILED | ||
63 | Description: Zone iteration failed. | ||
64 | HttpStatus: 500 | ||
65 | |||
66 | Value: 5002 | ||
67 | Name: NAMESTORE_ZONE_NOT_FOUND | ||
68 | Description: Zone not found. | ||
69 | HttpStatus: 404 | ||
70 | |||
71 | Value: 5003 | ||
72 | Name: NAMESTORE_RECORD_NOT_FOUND | ||
73 | Description: Record not found. | ||
74 | HttpStatus: 404 | ||
75 | |||
76 | Value: 5004 | ||
77 | Name: NAMESTORE_RECORD_DELETE_FAILED | ||
78 | Description: Zone iteration failed. | ||
79 | HttpStatus: 500 | ||
80 | |||
81 | Value: 5005 | ||
82 | Name: NAMESTORE_ZONE_EMPTY | ||
83 | Description: Zone does not contain any records. | ||
84 | HttpStatus: 404 | ||
85 | |||
86 | Value: 5006 | ||
87 | Name: NAMESTORE_LOOKUP_ERROR | ||
88 | Description: Failed to lookup record. | ||
89 | HttpStatus: 500 | ||
90 | |||
91 | Value: 5007 | ||
92 | Name: NAMESTORE_NO_RECORDS_GIVEN | ||
93 | Description: No records given. | ||
94 | HttpStatus: 400 | ||
95 | |||
96 | Value: 5008 | ||
97 | Name: NAMESTORE_RECORD_DATA_INVALID | ||
98 | Description: Record data invalid. | ||
99 | HttpStatus: 400 | ||
100 | |||
101 | Value: 5009 | ||
102 | Name: NAMESTORE_NO_LABEL_GIVEN | ||
103 | Description: No label given. | ||
104 | HttpStatus: 400 | ||
105 | |||
106 | Value: 5010 | ||
107 | Name: NAMESTORE_NO_RESULTS | ||
108 | Description: No results given. | ||
109 | HttpStatus: 404 | ||
110 | |||
111 | Value: 5011 | ||
112 | Name: NAMESTORE_RECORD_EXISTS | ||
113 | Description: Record already exists. | ||
114 | HttpStatus: 409 | ||
115 | |||
116 | Value: 5012 | ||
117 | Name: NAMESTORE_RECORD_TOO_BIG | ||
118 | Description: Record size exceeds maximum limit. | ||
119 | HttpStatus: 500 | ||
120 | |||
121 | Value: 5013 | ||
122 | Name: NAMESTORE_BACKEND_FAILED | ||
123 | Description: There was an error in the database backend. | ||
124 | HttpStatus: 500 | ||
125 | |||
126 | Value: 5014 | ||
127 | Name: NAMESTORE_STORE_FAILED | ||
128 | Description: Failed to store the given records. | ||
129 | HttpStatus: 500 | ||
130 | |||
131 | Value: 5015 | ||
132 | Name: NAMESTORE_LABEL_INVALID | ||
133 | Description: Label invalid or malformed. | ||
134 | HttpStatus: 400 | ||
135 | |||
136 | |||
diff --git a/gnunet-error-codes/rst.footer b/gnunet-error-codes/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnunet-error-codes/rst.footer | |||
diff --git a/gnunet-error-codes/rst.header.template b/gnunet-error-codes/rst.header.template new file mode 100644 index 0000000..2c4ddcf --- /dev/null +++ b/gnunet-error-codes/rst.header.template | |||
@@ -0,0 +1,11 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNUnet Error Codes | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Value | ||
10 | - HttpStatus | ||
11 | - Description | ||
diff --git a/gnunet-error-codes/rst.template b/gnunet-error-codes/rst.template new file mode 100644 index 0000000..9bff06c --- /dev/null +++ b/gnunet-error-codes/rst.template | |||
@@ -0,0 +1,4 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Value}} | ||
3 | - {{HttpStatus_Value}} ({{HttpStatus_Identifier}}) | ||
4 | - {{Description}} | ||
diff --git a/gnunet-error-codes/ts.footer b/gnunet-error-codes/ts.footer new file mode 100644 index 0000000..b285e7d --- /dev/null +++ b/gnunet-error-codes/ts.footer | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | |||
3 | } | ||
diff --git a/gnunet-error-codes/ts.header b/gnunet-error-codes/ts.header new file mode 100644 index 0000000..1438b99 --- /dev/null +++ b/gnunet-error-codes/ts.header | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | |||
21 | export enum GnunetErrorCode { | ||
diff --git a/gnunet-error-codes/ts.template b/gnunet-error-codes/ts.template new file mode 100644 index 0000000..ee72f88 --- /dev/null +++ b/gnunet-error-codes/ts.template | |||
@@ -0,0 +1,7 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Description}} | ||
5 | * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). | ||
6 | */ | ||
7 | {{Name}} = {{Value}}, | ||
diff --git a/gnunet-protocols/.gitignore b/gnunet-protocols/.gitignore new file mode 100644 index 0000000..0a437d0 --- /dev/null +++ b/gnunet-protocols/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnu-name-system-record-types.h | |||
diff --git a/gnunet-protocols/Makefile b/gnunet-protocols/Makefile new file mode 100644 index 0000000..f87c482 --- /dev/null +++ b/gnunet-protocols/Makefile | |||
@@ -0,0 +1,30 @@ | |||
1 | FILES=gnunet_overlay_protocols.h gnunet_overlay_protocols.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | check: | ||
5 | recfix --check registry.rec | ||
6 | |||
7 | distclean: | ||
8 | rm -f *.tmp | ||
9 | clean: | ||
10 | rm -f $(FILES) *.tmp | ||
11 | |||
12 | gnunet_overlay_protocols.h.tmp: registry.rec h.template | ||
13 | ../format.sh h.template < registry.rec > $@ | ||
14 | |||
15 | gnunet_overlay_protocols.h: h.header gnunet_overlay_protocols.h.tmp h.footer | ||
16 | cat h.header gnunet_overlay_protocols.h.tmp h.footer > $@ | ||
17 | |||
18 | gnunet_overlay_protocols.rst.tmp: registry.rec rst.template | ||
19 | ../format.sh rst.template < registry.rec > $@ | ||
20 | |||
21 | rst.header.tmp: | ||
22 | cat rst.header.template README POLICY > $@ | ||
23 | echo "Entries" >> $@ | ||
24 | echo "^^^^^^^" >> $@ | ||
25 | |||
26 | gnunet_overlay_protocols.rst: rst.header.tmp gnunet_overlay_protocols.rst.tmp rst.footer | ||
27 | cat rst.header.tmp gnunet_overlay_protocols.rst.tmp rst.footer > $@ | ||
28 | |||
29 | |||
30 | .PHONY: check clean distclean | ||
diff --git a/gnunet-protocols/POLICY b/gnunet-protocols/POLICY new file mode 100644 index 0000000..24ebdf3 --- /dev/null +++ b/gnunet-protocols/POLICY | |||
@@ -0,0 +1,20 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Each registry entry should contain three values: the "Number" of the | ||
5 | protocol, which must be above 255 (to avoid conflicts with legacy | ||
6 | Internet protocols), the "Name" of the protocol, and a "Reference" with links | ||
7 | to further information about the record type. | ||
8 | |||
9 | The "Name" must be unique in the entire registry. The value must be a | ||
10 | case insensitive ASCII string and is restricted to alphanumeric | ||
11 | characters. | ||
12 | |||
13 | Adding protocols is possible after expert review, using a | ||
14 | first-come-first-served policy for unique "Name" allocation. | ||
15 | Experts are responsible to ensure that the chosen "Name" is | ||
16 | appropriate for the record type. | ||
17 | |||
18 | The current contact(s) for expert review are reachable at | ||
19 | gns-registry@gnunet.org. | ||
20 | |||
diff --git a/gnunet-protocols/README b/gnunet-protocols/README new file mode 100644 index 0000000..e335357 --- /dev/null +++ b/gnunet-protocols/README | |||
@@ -0,0 +1,10 @@ | |||
1 | This registry is for overlay protocols. | ||
2 | |||
3 | Overlay protocol numbers uniquely identify the different kinds | ||
4 | of protocols implemented to realize overlay service communication. | ||
5 | |||
6 | This registry is used to ensure that the names and numeric values | ||
7 | used to identify the protocols are uniquely defined and to | ||
8 | allow implementors to find out details about the respective semantics and | ||
9 | specifications. | ||
10 | |||
diff --git a/gnunet-protocols/h.footer b/gnunet-protocols/h.footer new file mode 100644 index 0000000..adccc7a --- /dev/null +++ b/gnunet-protocols/h.footer | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | |||
3 | |||
4 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
5 | { | ||
6 | #endif | ||
7 | #ifdef __cplusplus | ||
8 | } | ||
9 | #endif | ||
10 | |||
11 | #endif | ||
diff --git a/gnunet-protocols/h.header b/gnunet-protocols/h.header new file mode 100644 index 0000000..8bbba29 --- /dev/null +++ b/gnunet-protocols/h.header | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | Copyright (C) 2012-2022 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | #ifndef GNUNET_OVERLAY_PROTOCOLS_H | ||
21 | #define GNUNET_OVERLAY_PROTOCOLS_H | ||
22 | |||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add overlay protocols, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
diff --git a/gnunet-protocols/h.template b/gnunet-protocols/h.template new file mode 100644 index 0000000..2d7e828 --- /dev/null +++ b/gnunet-protocols/h.template | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | |||
3 | /** | ||
4 | * {{Comment}} | ||
5 | */ | ||
6 | #define GNUNET_OVERLAY_PROTOCOL_{{Name}} {{Number}} | ||
diff --git a/gnunet-protocols/registry.rec b/gnunet-protocols/registry.rec new file mode 100644 index 0000000..96c8dcb --- /dev/null +++ b/gnunet-protocols/registry.rec | |||
@@ -0,0 +1,23 @@ | |||
1 | # -*- mode: rec -*- | ||
2 | # | ||
3 | # Registry for overlay protocols | ||
4 | # | ||
5 | |||
6 | %rec: OverlayProtocol | ||
7 | %key: Number | ||
8 | %typedef: NumberRange_t range 256 65535 | ||
9 | %type: Number NumberRange_t | ||
10 | %mandatory: Number | ||
11 | %typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/ | ||
12 | %type: Name Name_t | ||
13 | %unique: Name | ||
14 | %mandatory: Name | ||
15 | %mandatory: Comment | ||
16 | %allowed: Contact | ||
17 | %allowed: References | ||
18 | %sort: Number Name Contact References | ||
19 | |||
20 | Number: 256 | ||
21 | Name: CADET | ||
22 | Comment: CADET protocol. | ||
23 | References: https://git.gnunet.org/bibliography.git/plain/docs/cadet.pdf | ||
diff --git a/gnunet-protocols/rst.footer b/gnunet-protocols/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnunet-protocols/rst.footer | |||
diff --git a/gnunet-protocols/rst.header.template b/gnunet-protocols/rst.header.template new file mode 100644 index 0000000..f6e68fa --- /dev/null +++ b/gnunet-protocols/rst.header.template | |||
@@ -0,0 +1,4 @@ | |||
1 | GNUnet Overlay Protocols | ||
2 | ------------------------ | ||
3 | |||
4 | |||
diff --git a/gnunet-protocols/rst.template b/gnunet-protocols/rst.template new file mode 100644 index 0000000..e032a7f --- /dev/null +++ b/gnunet-protocols/rst.template | |||
@@ -0,0 +1,10 @@ | |||
1 | |||
2 | |||
3 | =================== =========================================================== | ||
4 | Name GNUNET_OVERLAY_PROTOCOL_{{Name}} | ||
5 | ------------------- ----------------------------------------------------------- | ||
6 | Number {{Number}} | ||
7 | Comment {{Comment}} | ||
8 | References {{References}} | ||
9 | =================== =========================================================== | ||
10 | |||
diff --git a/gnunet-signatures/Makefile b/gnunet-signatures/Makefile index 32640e6..509febf 100644 --- a/gnunet-signatures/Makefile +++ b/gnunet-signatures/Makefile | |||
@@ -1,15 +1,25 @@ | |||
1 | FILES=registry.rec gnunet_signatures.h | 1 | FILES=gnunet_signatures.h gnunet_signatures.rst |
2 | all: check $(FILES) | 2 | all: check $(FILES) |
3 | check: registry.rec | 3 | check: |
4 | recfix --check registry.rec | 4 | recfix --check registry.rec |
5 | distclean: | 5 | distclean: |
6 | rm -f *.tmp | 6 | rm -f *.tmp |
7 | clean: | 7 | clean: |
8 | rm -f $(FILES) *.tmp | 8 | rm -f $(FILES) *.tmp |
9 | gnunet_signatures.h.tmp: registry.rec h.template | 9 | gnunet_signatures.h.tmp: registry.rec h.template |
10 | ../format.sh h.template < registry.rec > $@ | 10 | ../format.sh h.template 'Package = "GNUnet"' < registry.rec > $@ |
11 | 11 | ||
12 | gnunet_signatures.h: h.header gnunet_signatures.h.tmp h.footer | 12 | gnunet_signatures.h: h.header gnunet_signatures.h.tmp h.footer |
13 | cat $^ > $@ | 13 | cat h.header gnunet_signatures.h.tmp h.footer > $@ |
14 | |||
15 | gnunet_signatures.rst.tmp: registry.rec rst.template | ||
16 | ../format.sh rst.template 'Package = "GNUnet"' < registry.rec > $@ | ||
17 | |||
18 | rst.header.tmp: | ||
19 | cat README POLICY rst.header.template > $@ | ||
20 | |||
21 | gnunet_signatures.rst: rst.header.tmp gnunet_signatures.rst.tmp rst.footer | ||
22 | cat rst.header.tmp gnunet_signatures.rst.tmp rst.footer > $@ | ||
23 | |||
14 | 24 | ||
15 | .PHONY: check clean distclean | 25 | .PHONY: check clean distclean |
diff --git a/gnunet-signatures/POLICY b/gnunet-signatures/POLICY new file mode 100644 index 0000000..4308df6 --- /dev/null +++ b/gnunet-signatures/POLICY | |||
@@ -0,0 +1,11 @@ | |||
1 | Policy | ||
2 | ^^^^^^ | ||
3 | |||
4 | Developers working on GNUnet or packages based on GNUnet should | ||
5 | feel free to extend this registry. Entries may be deleted if | ||
6 | no code using them is still expected to be in production anywhere. | ||
7 | |||
8 | Updating the name of the package or subsystem is allowed provided | ||
9 | that the code using the signature is being moved, as those fields | ||
10 | are merely informational or used for code generation. | ||
11 | |||
diff --git a/gnunet-signatures/README b/gnunet-signatures/README index 99587b7..b68b960 100644 --- a/gnunet-signatures/README +++ b/gnunet-signatures/README | |||
@@ -1,3 +1,6 @@ | |||
1 | GNUnet Signature Purposes | ||
2 | ------------------------- | ||
3 | |||
1 | GNUnet signature purpose registry. | 4 | GNUnet signature purpose registry. |
2 | 5 | ||
3 | Every time a signature is created or verified with libgnunetutil's | 6 | Every time a signature is created or verified with libgnunetutil's |
@@ -5,3 +8,4 @@ signature functions, the signer must provide a "purpose" that provides | |||
5 | the context for the signature. By signing over the "purpose", it is | 8 | the context for the signature. By signing over the "purpose", it is |
6 | not possible for an adversary to use a signature made in one context | 9 | not possible for an adversary to use a signature made in one context |
7 | in another context. | 10 | in another context. |
11 | |||
diff --git a/gnunet-signatures/h.footer b/gnunet-signatures/h.footer index 5d32ee9..389d1b4 100644 --- a/gnunet-signatures/h.footer +++ b/gnunet-signatures/h.footer | |||
@@ -1,8 +1,5 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | }; | ||
4 | |||
5 | |||
6 | #if 0 /* keep Emacsens' auto-indent happy */ | 3 | #if 0 /* keep Emacsens' auto-indent happy */ |
7 | { | 4 | { |
8 | #endif | 5 | #endif |
diff --git a/gnunet-signatures/h.header b/gnunet-signatures/h.header index 57fced0..acb4d49 100644 --- a/gnunet-signatures/h.header +++ b/gnunet-signatures/h.header | |||
@@ -1,25 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2012-2020 GNUnet e.V. | 3 | Copyright (C) 2012-2022 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation, either version 3 of the License, | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | or (at your option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
18 | SPDX-License-Identifier: GPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | #ifndef GNUNET_SIGNATURES_H | 20 | #ifndef GNUNET_SIGNATURES_H |
21 | #define GNUNET_SIGNATURES_H | 21 | #define GNUNET_SIGNATURES_H |
22 | 22 | ||
23 | /** | ||
24 | * WARNING: | ||
25 | * This header is generated! | ||
26 | * In order to add a signature purpose, you must register | ||
27 | * them in GANA, and then use the header generation script | ||
28 | * to create an update of this file. You may then replace this | ||
29 | * file with the update. | ||
30 | */ | ||
31 | |||
32 | |||
33 | |||
23 | #ifdef __cplusplus | 34 | #ifdef __cplusplus |
24 | extern "C" { | 35 | extern "C" { |
25 | #if 0 /* keep Emacsens' auto-indent happy */ | 36 | #if 0 /* keep Emacsens' auto-indent happy */ |
@@ -32,4 +43,4 @@ extern "C" { | |||
32 | * Network signature purpose definitions. Note that all values | 43 | * Network signature purpose definitions. Note that all values |
33 | * must be uint32_t and encoded in network byte order in the structs. | 44 | * must be uint32_t and encoded in network byte order in the structs. |
34 | */ | 45 | */ |
35 | enum GNUNET_SignaturePurpose { | 46 | |
diff --git a/gnunet-signatures/h.template b/gnunet-signatures/h.template index 5fb7cf4..f9c2213 100644 --- a/gnunet-signatures/h.template +++ b/gnunet-signatures/h.template | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | /** | 3 | /** |
4 | * {{Description}} ({{Subsystem}}) | 4 | * {{Comment}} ({{Subsystem}}) |
5 | */ | 5 | */ |
6 | GNUNET_SIGNATURE_PURPOSE_{{Identifier}} = {{Value}}, | 6 | #define GNUNET_SIGNATURE_PURPOSE_{{Name}} {{Number}} |
diff --git a/gnunet-signatures/registry.rec b/gnunet-signatures/registry.rec index 36ea5f4..d3a2a12 100644 --- a/gnunet-signatures/registry.rec +++ b/gnunet-signatures/registry.rec | |||
@@ -1,6 +1,6 @@ | |||
1 | # -*- mode: rec -*- | 1 | # -*- mode: rec -*- |
2 | # | 2 | # |
3 | # Registry for GNUnet Signature purposes | 3 | # Registry for Signature purposes |
4 | # | 4 | # |
5 | 5 | ||
6 | %rec: SignaturePurpose | 6 | %rec: SignaturePurpose |
@@ -12,151 +12,623 @@ | |||
12 | %unique: Name | 12 | %unique: Name |
13 | %mandatory: Name | 13 | %mandatory: Name |
14 | %mandatory: Comment | 14 | %mandatory: Comment |
15 | %mandatory: Package | ||
15 | %allowed: Subsystem | 16 | %allowed: Subsystem |
16 | %sort: Number Name | 17 | %sort: Number Name |
17 | 18 | ||
18 | 19 | ||
20 | #----------------------------------------------------------------------------- | ||
21 | # GNUnet | ||
22 | |||
19 | Number: 0 | 23 | Number: 0 |
20 | Name: TEST | 24 | Name: TEST |
21 | Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value). | 25 | Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value). |
26 | Package: GNUnet | ||
22 | Subsystem: GNUnet | 27 | Subsystem: GNUnet |
23 | 28 | ||
24 | Number: 1 | 29 | Number: 1 |
25 | Name: TRANSPORT_PONG_OWN | 30 | Name: TRANSPORT_PONG_OWN |
26 | Comment: Signature for confirming that this peer uses a particular address. | 31 | Comment: Signature for confirming that this peer uses a particular address. |
32 | Package: GNUnet | ||
27 | Subsystem: GNUnet-TRANSPORT | 33 | Subsystem: GNUnet-TRANSPORT |
28 | 34 | ||
29 | Number: 2 | 35 | Number: 2 |
30 | Name: TRANSPORT_DISCONNECT | 36 | Name: TRANSPORT_DISCONNECT |
31 | Comment: Signature for confirming that this peer intends to disconnect. | 37 | Comment: Signature for confirming that this peer intends to disconnect. |
38 | Package: GNUnet | ||
32 | Subsystem: GNUnet-TRANSPORT | 39 | Subsystem: GNUnet-TRANSPORT |
33 | 40 | ||
34 | Number: 3 | 41 | Number: 3 |
35 | Name: REVOCATION | 42 | Name: GNS_REVOCATION |
36 | Comment: Signature for confirming a key revocation. | 43 | Comment: GNS zone key revocation |
37 | Subsystem: GNUnet-Revocation | 44 | Package: GNUnet |
45 | Subsystem: GNS | ||
38 | 46 | ||
39 | Number: 4 | 47 | Number: 4 |
40 | Name: NAMESPACE_ADVERTISEMENT | 48 | Name: NAMESPACE_ADVERTISEMENT |
41 | Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner). | 49 | Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner). |
50 | Package: GNUnet | ||
42 | Subsystem: GNUnet-FS | 51 | Subsystem: GNUnet-FS |
43 | 52 | ||
44 | Number: 5 | 53 | Number: 5 |
45 | Name: PEER_PLACEMENT | 54 | Name: PEER_PLACEMENT |
46 | Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs. | 55 | Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs. |
56 | Package: GNUnet | ||
47 | Subsystem: GNUnet-FS | 57 | Subsystem: GNUnet-FS |
48 | 58 | ||
59 | Number: 6 | ||
60 | Name: DHT_HOP | ||
61 | Comment: Signature by which a peer affirms that it forwarded a message in the DHT. | ||
62 | Package: GNUnet | ||
63 | Subsystem: GNUnet-DHT | ||
64 | |||
65 | Number: 7 | ||
66 | Name: HELLO | ||
67 | Comment: Signature by which a peer affirms its address. | ||
68 | Package: GNUnet | ||
69 | Subsystem: GNUnet-HELLO | ||
70 | |||
49 | Number: 11 | 71 | Number: 11 |
50 | Name: DNS_RECORD | 72 | Name: DNS_RECORD |
51 | Comment: Signature on a GNUNET_DNS_Advertisement. | 73 | Comment: Signature on a GNUNET_DNS_Advertisement. |
74 | Package: GNUnet | ||
52 | Subsystem: GNUnet-DNS+Exit | 75 | Subsystem: GNUnet-DNS+Exit |
53 | 76 | ||
77 | Number: 12 | ||
78 | Name: CHAT_MESSAGE | ||
79 | Comment: Signature of a chat message. | ||
80 | Package: GNUnet | ||
81 | Subsystem: GNUnet-MESSENGER | ||
82 | |||
83 | Number: 13 | ||
84 | Name: CHAT_RECEIPT | ||
85 | Comment: Signature of confirmation receipt for a chat message. | ||
86 | Package: GNUnet | ||
87 | Subsystem: GNUnet-MESSENGER | ||
88 | |||
54 | Number: 14 | 89 | Number: 14 |
55 | Name: NSE_SEND | 90 | Name: NSE_SEND |
56 | Comment: Signature of a network size estimate message. | 91 | Comment: Signature of a network size estimate message. |
92 | Package: GNUnet | ||
57 | Subsystem: GNUnet-NSE | 93 | Subsystem: GNUnet-NSE |
58 | 94 | ||
59 | Number: 15 | 95 | Number: 15 |
60 | Name: GNS_RECORD_SIGN | 96 | Name: GNS_RECORD_SIGN |
61 | Comment: Signature of a gnunet naming system record block | 97 | Comment: GNS record set signature |
62 | Subsystem: GNUnet-GNSRECORD | 98 | Package: GNUnet |
99 | Subsystem: GNS | ||
63 | 100 | ||
64 | Number: 16 | 101 | Number: 16 |
65 | Name: SET_ECC_KEY | 102 | Name: SET_ECC_KEY |
66 | Comment: Purpose is to set a session key. | 103 | Comment: Purpose is to set a session key. |
104 | Package: GNUnet | ||
67 | Subsystem: GNUnet-CORE | 105 | Subsystem: GNUnet-CORE |
68 | 106 | ||
69 | Number: 17 | 107 | Number: 17 |
70 | Name: FS_UBLOCK | 108 | Name: FS_UBLOCK |
71 | Comment: UBlock Signature, done using DSS, not ECC | 109 | Comment: UBlock Signature, done using DSS, not ECC |
110 | Package: GNUnet | ||
72 | Subsystem: GNUnet-FS | 111 | Subsystem: GNUnet-FS |
73 | 112 | ||
74 | Number: 18 | 113 | Number: 18 |
75 | Name: REGEX_ACCEPT | 114 | Name: REGEX_ACCEPT |
76 | Comment: Accept state in regex DFA. Peer affirms that it offers the matching service. | 115 | Comment: Accept state in regex DFA. Peer affirms that it offers the matching service. |
116 | Package: GNUnet | ||
77 | Subsystem: GNUnet-REGEX | 117 | Subsystem: GNUnet-REGEX |
78 | 118 | ||
79 | Number: 20 | 119 | Number: 20 |
80 | Name: CONVERSATION_RING | 120 | Name: CONVERSATION_RING |
81 | Comment: Signature of a conversation ring. | 121 | Comment: Signature of a conversation ring. |
122 | Package: GNUnet | ||
82 | Subsystem: GNUnet-CONVERSATION | 123 | Subsystem: GNUnet-CONVERSATION |
83 | 124 | ||
84 | Number: 21 | 125 | Number: 21 |
85 | Name: SECRETSHARING_DKG1 | 126 | Name: SECRETSHARING_DKG1 |
86 | Comment: Signature for the first round of distributed key generation. | 127 | Comment: Signature for the first round of distributed key generation. |
128 | Package: GNUnet | ||
87 | Subsystem: GNUnet-SECRETSHARING | 129 | Subsystem: GNUnet-SECRETSHARING |
88 | 130 | ||
89 | Number: 22 | 131 | Number: 22 |
90 | Name: SECRETSHARING_DKG2 | 132 | Name: SECRETSHARING_DKG2 |
91 | Comment: Signature for the second round of distributed key generation. | 133 | Comment: Signature for the second round of distributed key generation. |
134 | Package: GNUnet | ||
92 | Subsystem: GNUnet-SECRETSHARING | 135 | Subsystem: GNUnet-SECRETSHARING |
93 | 136 | ||
94 | Number: 23 | 137 | Number: 23 |
95 | Name: SECRETSHARING_DECRYPTION | 138 | Name: SECRETSHARING_DECRYPTION |
96 | Comment: Signature for the cooperative decryption. | 139 | Comment: Signature for the cooperative decryption. |
140 | Package: GNUnet | ||
97 | Subsystem: GNUnet-SECRETSHARING | 141 | Subsystem: GNUnet-SECRETSHARING |
98 | 142 | ||
99 | Number: 27 | 143 | Number: 27 |
100 | Name: RECLAIM_CODE_SIGN | 144 | Name: RECLAIM_CODE_SIGN |
101 | Comment: Signature for a GNUid Ticket | 145 | Comment: Signature for a GNUid Ticket |
146 | Package: GNUnet | ||
102 | Subsystem: Reclaim | 147 | Subsystem: Reclaim |
103 | 148 | ||
104 | Number: 28 | 149 | Number: 28 |
105 | Name: DELEGATE | 150 | Name: DELEGATE |
106 | Comment: Signature for a GNUnet credential | 151 | Comment: Signature for a GNUnet credential |
152 | Package: GNUnet | ||
107 | Subsystem: Reclaim | 153 | Subsystem: Reclaim |
108 | 154 | ||
109 | Number: 29 | 155 | Number: 29 |
110 | Name: TRANSPORT_ADDRESS | 156 | Name: TRANSPORT_ADDRESS |
111 | Comment: Signature by a peer affirming that this is one of its addresses for the given time period. | 157 | Comment: Signature by a peer affirming that this is one of its addresses for the given time period. |
158 | Package: GNUnet | ||
112 | Subsystem: GNUnet-TRANSPORT | 159 | Subsystem: GNUnet-TRANSPORT |
113 | 160 | ||
114 | Number: 30 | 161 | Number: 30 |
115 | Name: TRANSPORT_EPHEMERAL | 162 | Name: TRANSPORT_EPHEMERAL |
116 | Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service. | 163 | Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service. |
164 | Package: GNUnet | ||
117 | Subsystem: GNUnet-TRANSPORT | 165 | Subsystem: GNUnet-TRANSPORT |
118 | 166 | ||
119 | Number: 31 | 167 | Number: 31 |
120 | Name: COMMUNICATOR_TCP_HANDSHAKE | 168 | Name: COMMUNICATOR_TCP_HANDSHAKE |
121 | Comment: Signature used by TCP communicator handshake. | 169 | Comment: Signature used by TCP communicator handshake. |
170 | Package: GNUnet | ||
122 | Subsystem: GNUnet-TRANSPORT-TCP | 171 | Subsystem: GNUnet-TRANSPORT-TCP |
123 | 172 | ||
124 | Number: 32 | 173 | Number: 32 |
125 | Name: COMMUNICATOR_TCP_REKEY | 174 | Name: COMMUNICATOR_TCP_REKEY |
126 | Comment: Signature used by TCP communicator rekey. | 175 | Comment: Signature used by TCP communicator rekey. |
176 | Package: GNUnet | ||
127 | Subsystem: GNUnet-TRANSPORT-TCP | 177 | Subsystem: GNUnet-TRANSPORT-TCP |
128 | 178 | ||
129 | Number: 33 | 179 | Number: 33 |
130 | Name: COMMUNICATOR_UDP_HANDSHAKE | 180 | Name: COMMUNICATOR_UDP_HANDSHAKE |
131 | Comment: Signature used by UDP communicator handshake. | 181 | Comment: Signature used by UDP communicator handshake. |
182 | Package: GNUnet | ||
132 | Subsystem: GNUnet-TRANSPORT-UDP | 183 | Subsystem: GNUnet-TRANSPORT-UDP |
133 | 184 | ||
134 | Number: 34 | 185 | Number: 34 |
135 | Name: COMMUNICATOR_UDP_BROADCAST | 186 | Name: COMMUNICATOR_UDP_BROADCAST |
136 | Comment: Signature used by UDP broadcasts. | 187 | Comment: Signature used by UDP broadcasts. |
188 | Package: GNUnet | ||
137 | Subsystem: GNUnet-TRANSPORT-UDP | 189 | Subsystem: GNUnet-TRANSPORT-UDP |
138 | 190 | ||
139 | Number: 35 | 191 | Number: 35 |
140 | Name: TRANSPORT_CHALLENGE | 192 | Name: TRANSPORT_CHALLENGE |
141 | Comment: Signature by a peer affirming that it received a challenge (and stating how long it expects the address on which the challenge was received to remain valid). | 193 | Comment: Signature by a peer affirming that it received a challenge (and stating how long it expects the address on which the challenge was received to remain valid). |
194 | Package: GNUnet | ||
142 | Subsystem: GNUnet-TRANSPORT | 195 | Subsystem: GNUnet-TRANSPORT |
143 | 196 | ||
144 | Number: 36 | 197 | Number: 36 |
145 | Name: TRANSPORT_DV_HOP | 198 | Name: TRANSPORT_DV_HOP |
146 | Comment: Signature by a peer affirming that it is on a DV path. | 199 | Comment: Signature by a peer affirming that it is on a DV path. |
200 | Package: GNUnet | ||
147 | Subsystem: GNUnet-TRANSPORT | 201 | Subsystem: GNUnet-TRANSPORT |
148 | 202 | ||
149 | Number: 37 | 203 | Number: 37 |
150 | Name: TRANSPORT_DV_INITIATOR | 204 | Name: TRANSPORT_DV_INITIATOR |
151 | Comment: Signature by a peer affirming that it originated the DV path. | 205 | Comment: Signature by a peer affirming that it originated the DV path. |
206 | Package: GNUnet | ||
152 | Subsystem: GNUnet-TRANSPORT | 207 | Subsystem: GNUnet-TRANSPORT |
153 | 208 | ||
154 | Number: 38 | 209 | Number: 38 |
155 | Name: CADET_CONNECTION_INITIATOR | 210 | Name: CADET_CONNECTION_INITIATOR |
156 | Comment: Signature by a peer that like to create a connection. | 211 | Comment: Signature by a peer that like to create a connection. |
212 | Package: GNUnet | ||
157 | Subsystem: GNUnet-CADET | 213 | Subsystem: GNUnet-CADET |
158 | 214 | ||
159 | Number: 39 | 215 | Number: 39 |
160 | Name: COMMUNICATOR_TCP_HANDSHAKE_ACK | 216 | Name: COMMUNICATOR_TCP_HANDSHAKE_ACK |
161 | Comment: Signature by a peer sending back the nonce received at initial handshake. | 217 | Comment: Signature by a peer sending back the nonce received at initial handshake. |
218 | Package: GNUnet | ||
162 | Subsystem: GNUnet-TRANSPORT-TCP | 219 | Subsystem: GNUnet-TRANSPORT-TCP |
220 | |||
221 | #----------------------------------------------------------------------------- | ||
222 | # GNU Taler, >= 1000 | ||
223 | |||
224 | # | ||
225 | # Exchange offline signatures (with master key) | ||
226 | # | ||
227 | |||
228 | Number: 1017 | ||
229 | Name: MASTER_AML_KEY | ||
230 | Comment: Initialize or update the status of an AML key for an AML officer | ||
231 | Package: GNU Taler | ||
232 | |||
233 | Number: 1018 | ||
234 | Name: MASTER_DRAIN_PROFIT | ||
235 | Comment: Affirm wiring of exchange profits to operator account. | ||
236 | Package: GNU Taler | ||
237 | |||
238 | Number: 1019 | ||
239 | Name: MASTER_PARTNER_DETAILS | ||
240 | Comment: Signature affirming a partner configuration for wads. | ||
241 | Package: GNU Taler | ||
242 | |||
243 | Number: 1020 | ||
244 | Name: MASTER_SIGNING_KEY_REVOKED | ||
245 | Comment: The given revocation key was revoked and must no longer be used. | ||
246 | Package: GNU Taler | ||
247 | |||
248 | Number: 1021 | ||
249 | Name: MASTER_ADD_WIRE | ||
250 | Comment: Add payto URI to the list of our wire methods. | ||
251 | Package: GNU Taler | ||
252 | |||
253 | Number: 1022 | ||
254 | Name: MASTER_GLOBAL_FEES | ||
255 | Comment: Signature over global set of fees charged by the exchange. | ||
256 | Package: GNU Taler | ||
257 | |||
258 | Number: 1023 | ||
259 | Name: MASTER_DEL_WIRE | ||
260 | Comment: Remove payto URI from the list of our wire methods. | ||
261 | Package: GNU Taler | ||
262 | |||
263 | Number: 1024 | ||
264 | Name: MASTER_SIGNING_KEY_VALIDITY | ||
265 | Comment: Purpose for signing public keys signed by the exchange master key. | ||
266 | Package: GNU Taler | ||
267 | |||
268 | Number: 1025 | ||
269 | Name: MASTER_DENOMINATION_KEY_VALIDITY | ||
270 | Comment: Purpose for denomination keys signed by the exchange master key. | ||
271 | Package: GNU Taler | ||
272 | |||
273 | Number: 1026 | ||
274 | Name: MASTER_ADD_AUDITOR | ||
275 | Comment: Add an auditor to the list of our auditors. | ||
276 | Package: GNU Taler | ||
277 | |||
278 | Number: 1027 | ||
279 | Name: MASTER_DEL_AUDITOR | ||
280 | Comment: Remove an auditor from the list of our auditors. | ||
281 | Package: GNU Taler | ||
282 | |||
283 | Number: 1028 | ||
284 | Name: MASTER_WIRE_FEES | ||
285 | Comment: Fees charged per (aggregate) wire transfer to the merchant. | ||
286 | Package: GNU Taler | ||
287 | |||
288 | Number: 1029 | ||
289 | Name: MASTER_DENOMINATION_KEY_REVOKED | ||
290 | Comment: The given revocation key was revoked and must no longer be used. | ||
291 | Package: GNU Taler | ||
292 | |||
293 | Number: 1030 | ||
294 | Name: MASTER_WIRE_DETAILS | ||
295 | Comment: Signature where the Exchange confirms its IBAN details in the /wire response. | ||
296 | Package: GNU Taler | ||
297 | |||
298 | Number: 1031 | ||
299 | Name: MASTER_EXTENSION | ||
300 | Comment: Set the configuration of an extension (age-restriction or peer2peer) | ||
301 | Package: GNU Taler | ||
302 | |||
303 | |||
304 | # | ||
305 | # Exchange online signatures (with signing key) | ||
306 | # | ||
307 | |||
308 | Number: 1032 | ||
309 | Name: EXCHANGE_RESERVE_STATUS | ||
310 | Comment: Purpose for the state of a reserve, signed by the exchange's signing key. | ||
311 | Package: GNU Taler | ||
312 | |||
313 | Number: 1033 | ||
314 | Name: EXCHANGE_CONFIRM_DEPOSIT | ||
315 | Comment: Signature where the Exchange confirms a deposit request. | ||
316 | Package: GNU Taler | ||
317 | |||
318 | Number: 1034 | ||
319 | Name: EXCHANGE_CONFIRM_MELT | ||
320 | Comment: Signature where the exchange (current signing key) confirms the no-reveal index for cut-and-choose and the validity of the melted coins. | ||
321 | Package: GNU Taler | ||
322 | |||
323 | Number: 1035 | ||
324 | Name: EXCHANGE_KEY_SET | ||
325 | Comment: Signature where the Exchange confirms the full /keys response set. | ||
326 | Package: GNU Taler | ||
327 | |||
328 | Number: 1036 | ||
329 | Name: EXCHANGE_CONFIRM_WIRE | ||
330 | Comment: Signature where the Exchange confirms the /track/transaction response. | ||
331 | Package: GNU Taler | ||
332 | |||
333 | Number: 1037 | ||
334 | Name: EXCHANGE_CONFIRM_WIRE_DEPOSIT | ||
335 | Comment: Signature where the Exchange confirms the /wire/deposit response. | ||
336 | Package: GNU Taler | ||
337 | |||
338 | Number: 1038 | ||
339 | Name: EXCHANGE_CONFIRM_REFUND | ||
340 | Comment: Signature where the Exchange confirms a refund request. | ||
341 | Package: GNU Taler | ||
342 | |||
343 | Number: 1039 | ||
344 | Name: EXCHANGE_CONFIRM_RECOUP | ||
345 | Comment: Signature where the Exchange confirms a recoup. | ||
346 | Package: GNU Taler | ||
347 | |||
348 | Number: 1040 | ||
349 | Name: EXCHANGE_RESERVE_CLOSED | ||
350 | Comment: Signature where the Exchange confirms it closed a reserve. | ||
351 | Package: GNU Taler | ||
352 | |||
353 | Number: 1041 | ||
354 | Name: EXCHANGE_CONFIRM_RECOUP_REFRESH | ||
355 | Comment: Signature where the Exchange confirms a recoup-refresh operation. | ||
356 | Package: GNU Taler | ||
357 | |||
358 | Number: 1042 | ||
359 | Name: EXCHANGE_AFFIRM_DENOM_UNKNOWN | ||
360 | Comment: Signature where the Exchange confirms that it does not know a denomination (hash). | ||
361 | Package: GNU Taler | ||
362 | |||
363 | Number: 1043 | ||
364 | Name: EXCHANGE_AFFIRM_DENOM_EXPIRED | ||
365 | Comment: Signature where the Exchange confirms that it does not consider a denomination valid for the given operation at this time. | ||
366 | Package: GNU Taler | ||
367 | |||
368 | Number: 1044 | ||
369 | Name: EXCHANGE_ACCOUNT_SETUP_SUCCESS | ||
370 | Comment: Signature by which an exchange affirms that an account successfully passed the KYC checks. | ||
371 | Package: GNU Taler | ||
372 | |||
373 | Number: 1045 | ||
374 | Name: EXCHANGE_CONFIRM_PURSE_CREATION | ||
375 | Comment: Signature by which the exchange affirms that a purse was created with a certain amount deposited into it. | ||
376 | Package: GNU Taler | ||
377 | |||
378 | Number: 1046 | ||
379 | Name: EXCHANGE_CONFIRM_PURSE_MERGED | ||
380 | Comment: Signature by which the exchange affirms that a purse was merged into a reserve with a certain amount in it. | ||
381 | Package: GNU Taler | ||
382 | |||
383 | Number: 1047 | ||
384 | Name: EXCHANGE_PURSE_STATUS | ||
385 | Comment: Purpose for the state of a purse, signed by the exchange's signing key. | ||
386 | Package: GNU Taler | ||
387 | |||
388 | Number: 1048 | ||
389 | Name: EXCHANGE_RESERVE_ATTEST_DETAILS | ||
390 | Comment: Signature by which the exchange attests identity attributes of a particular reserve owner. | ||
391 | Package: GNU Taler | ||
392 | |||
393 | Number: 1049 | ||
394 | Name: EXCHANGE_CONFIRM_PURSE_REFUND | ||
395 | Comment: Signature by which the exchange confirms that a purse expired and a coin was refunded. | ||
396 | Package: GNU Taler | ||
397 | |||
398 | Number: 1050 | ||
399 | Name: EXCHANGE_CONFIRM_AGE_WITHDRAW | ||
400 | Comment: Signature where the Exchange confirms an age-withdraw. | ||
401 | Package: GNU Taler | ||
402 | |||
403 | # | ||
404 | # Auditor signatures | ||
405 | # | ||
406 | |||
407 | Number: 1064 | ||
408 | Name: AUDITOR_EXCHANGE_KEYS | ||
409 | Comment: Signature where the auditor confirms that he is aware of certain denomination keys from the exchange. | ||
410 | Package: GNU Taler | ||
411 | |||
412 | # | ||
413 | # Merchant signatures | ||
414 | # | ||
415 | |||
416 | Number: 1101 | ||
417 | Name: MERCHANT_CONTRACT | ||
418 | Comment: Signature where the merchant confirms a contract (to the customer). | ||
419 | Package: GNU Taler | ||
420 | |||
421 | Number: 1102 | ||
422 | Name: MERCHANT_REFUND | ||
423 | Comment: Signature where the merchant confirms a refund (of a coin). | ||
424 | Package: GNU Taler | ||
425 | |||
426 | Number: 1103 | ||
427 | Name: MERCHANT_TRACK_TRANSACTION | ||
428 | Comment: Signature where the merchant confirms that he needs the wire transfer identifier for a deposit operation. | ||
429 | Package: GNU Taler | ||
430 | |||
431 | Number: 1104 | ||
432 | Name: MERCHANT_PAYMENT_OK | ||
433 | Comment: Signature where the merchant confirms that the payment was successful | ||
434 | Package: GNU Taler | ||
435 | |||
436 | Number: 1107 | ||
437 | Name: MERCHANT_WIRE_DETAILS | ||
438 | Comment: Signature where the merchant confirms its own (salted) wire details (not yet really used). | ||
439 | Package: GNU Taler | ||
440 | |||
441 | # | ||
442 | # Wallet signatures | ||
443 | # | ||
444 | |||
445 | Number: 1200 | ||
446 | Name: WALLET_RESERVE_WITHDRAW | ||
447 | Comment: Signature where the reserve key confirms a withdraw request. Signed with the reserve private key. | ||
448 | Package: GNU Taler | ||
449 | |||
450 | Number: 1201 | ||
451 | Name: WALLET_COIN_DEPOSIT | ||
452 | Comment: Signature made by the wallet of a user to confirm a deposit of a coin. | ||
453 | Package: GNU Taler | ||
454 | |||
455 | Number: 1202 | ||
456 | Name: WALLET_COIN_MELT | ||
457 | Comment: Signature using a coin key confirming the melting of a coin. Signed with the coin's private key. | ||
458 | Package: GNU Taler | ||
459 | |||
460 | Number: 1203 | ||
461 | Name: WALLET_COIN_RECOUP | ||
462 | Comment: Signature using a coin key requesting recoup. Signed with the coin's private key. | ||
463 | Package: GNU Taler | ||
464 | |||
465 | Number: 1204 | ||
466 | Name: WALLET_COIN_LINK | ||
467 | Comment: Signature using a coin key authenticating link data. Signed with the old coin's private key. | ||
468 | Package: GNU Taler | ||
469 | |||
470 | Number: 1205 | ||
471 | Name: WALLET_ACCOUNT_SETUP | ||
472 | Comment: Signature using a reserve key by which a wallet requests a payment target UUID for itself. Signs over just a purpose (no body), as the signature only serves to demonstrate that the request comes from the wallet controlling the private key, and not some third party. | ||
473 | Package: GNU Taler | ||
474 | |||
475 | Number: 1206 | ||
476 | Name: WALLET_COIN_RECOUP_REFRESH | ||
477 | Comment: Signature using a coin key requesting recoup-refresh. Signed with the coin private key. | ||
478 | Package: GNU Taler | ||
479 | |||
480 | Number: 1207 | ||
481 | Name: WALLET_AGE_ATTESTATION | ||
482 | Comment: Signature using a age restriction key for attestation of a particular age/age-group. | ||
483 | Package: GNU Taler | ||
484 | |||
485 | Number: 1208 | ||
486 | Name: WALLET_RESERVE_HISTORY | ||
487 | Comment: Request full or partial reserve history. Signed with the reserve private key. | ||
488 | Package: GNU Taler | ||
489 | |||
490 | Number: 1209 | ||
491 | Name: WALLET_COIN_HISTORY | ||
492 | Comment: Request full or partial coin history. Signed with the coin private key. | ||
493 | Package: GNU Taler | ||
494 | |||
495 | Number: 1210 | ||
496 | Name: WALLET_PURSE_CREATE | ||
497 | Comment: Request purse creation (without reserve). Signed by the purse private key. | ||
498 | Package: GNU Taler | ||
499 | |||
500 | Number: 1211 | ||
501 | Name: WALLET_PURSE_DEPOSIT | ||
502 | Comment: Request coin to be deposited into a purse. Signed with the coin private key. | ||
503 | Package: GNU Taler | ||
504 | |||
505 | Number: 1212 | ||
506 | Name: WALLET_PURSE_STATUS | ||
507 | Comment: Request purse status. Signed with the purse private key. | ||
508 | Package: GNU Taler | ||
509 | |||
510 | Number: 1213 | ||
511 | Name: WALLET_PURSE_MERGE | ||
512 | Comment: Request purse to be merged with a reserve. Signed with the purse private key. | ||
513 | Package: GNU Taler | ||
514 | |||
515 | Number: 1214 | ||
516 | Name: WALLET_ACCOUNT_MERGE | ||
517 | Comment: Request purse to be merged with a reserve. Signed by the reserve private key. | ||
518 | Package: GNU Taler | ||
519 | |||
520 | Number: 1215 | ||
521 | Name: WALLET_RESERVE_CLOSE | ||
522 | Comment: Request account to be closed. Signed with the reserve private key. | ||
523 | Package: GNU Taler | ||
524 | |||
525 | Number: 1216 | ||
526 | Name: WALLET_PURSE_ECONTRACT | ||
527 | Comment: Associates encrypted contract with a purse. Signed with the purse private key. | ||
528 | Package: GNU Taler | ||
529 | |||
530 | Number: 1217 | ||
531 | Name: WALLET_RESERVE_OPEN | ||
532 | Comment: Request reserve to be kept open. Signed with the reserve private key. | ||
533 | Package: GNU Taler | ||
534 | |||
535 | Number: 1218 | ||
536 | Name: WALLET_RESERVE_OPEN_DEPOSIT | ||
537 | Comment: Request coin to be used to pay for reserve to be kept open. Signed with the coin private key. | ||
538 | Package: GNU Taler | ||
539 | |||
540 | Number: 1219 | ||
541 | Name: WALLET_RESERVE_ATTEST_DETAILS | ||
542 | Comment: Request attestation about reserve owner. Signed by the reserve private key. | ||
543 | Package: GNU Taler | ||
544 | |||
545 | Number: 1220 | ||
546 | Name: WALLET_PURSE_DELETE | ||
547 | Comment: Signature by which a wallet requests a purse to be deleted. | ||
548 | Package: GNU Taler | ||
549 | |||
550 | Number: 1221 | ||
551 | Name: WALLET_RESERVE_AGE_WITHDRAW | ||
552 | Comment: Signature where the reserve key confirms an age-withdraw request. Signed with the reserve private key. | ||
553 | Package: GNU Taler | ||
554 | |||
555 | # | ||
556 | # Security module signatures | ||
557 | # | ||
558 | |||
559 | Number: 1250 | ||
560 | Name: SM_RSA_DENOMINATION_KEY | ||
561 | Comment: Signature on a denomination key announcement. | ||
562 | Package: GNU Taler | ||
563 | |||
564 | Number: 1251 | ||
565 | Name: SM_SIGNING_KEY | ||
566 | Comment: Signature on an exchange message signing key announcement. | ||
567 | Package: GNU Taler | ||
568 | |||
569 | Number: 1252 | ||
570 | Name: SM_CS_DENOMINATION_KEY | ||
571 | Comment: Signature on a denomination key announcement. | ||
572 | Package: GNU Taler | ||
573 | |||
574 | # | ||
575 | # Test signatures | ||
576 | # | ||
577 | |||
578 | Number: 1302 | ||
579 | Name: CLIENT_TEST_EDDSA | ||
580 | Comment: EdDSA test signature. | ||
581 | Package: GNU Taler | ||
582 | |||
583 | Number: 1303 | ||
584 | Name: EXCHANGE_TEST_EDDSA | ||
585 | Comment: EdDSA test signature. | ||
586 | Package: GNU Taler | ||
587 | |||
588 | # | ||
589 | # AML officer signatures | ||
590 | # | ||
591 | |||
592 | Number: 1350 | ||
593 | Name: AML_DECISION | ||
594 | Comment: Signature by which an AML officer signs an AML decision. | ||
595 | Package: GNU Taler | ||
596 | |||
597 | Number: 1351 | ||
598 | Name: AML_QUERY | ||
599 | Comment: Signature by which an AML officer requests AML data. | ||
600 | Package: GNU Taler | ||
601 | |||
602 | |||
603 | # | ||
604 | # GNU Anastasis signatures, >= 1400 | ||
605 | # | ||
606 | |||
607 | Number: 1400 | ||
608 | Name: ANASTASIS_POLICY_UPLOAD | ||
609 | Comment: EdDSA signature for a policy upload. | ||
610 | Package: GNU Taler | ||
611 | |||
612 | # | ||
613 | # Sync signatures, >= 1450 | ||
614 | # | ||
615 | |||
616 | Number: 1450 | ||
617 | Name: SYNC_BACKUP_UPLOAD | ||
618 | Comment: EdDSA signature for a backup upload. | ||
619 | Package: GNU Taler | ||
620 | |||
621 | |||
622 | # | ||
623 | # Donau signatures, >= 1500 | ||
624 | # | ||
625 | |||
626 | Number: 1500 | ||
627 | Name: DONAU_DONATION_STATEMENT | ||
628 | Comment: The signature is done by the Donau. The Donau signes over the total amount of the corresponding year, the corresponding year and the donation identifier of a specific donor. The statement confirms that the donor made this total in donations for the given year. | ||
629 | Package: Donau | ||
630 | |||
631 | Number: 1501 | ||
632 | Name: CHARITY_DONATION_CONFIRMATION | ||
633 | Comment: The signature is made by a charity and shows that the charity is in agreement with the donation request which it sends to the Donau. The charity signs over all blinded identifiers and key pairs which it has received from the donor. The signature affirms that the charity wants the donation receipts to be issued on its behalf. | ||
634 | Package: Donau | ||
diff --git a/gnunet-signatures/rst.footer b/gnunet-signatures/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gnunet-signatures/rst.footer | |||
diff --git a/gnunet-signatures/rst.header.template b/gnunet-signatures/rst.header.template new file mode 100644 index 0000000..1f2f336 --- /dev/null +++ b/gnunet-signatures/rst.header.template | |||
@@ -0,0 +1,12 @@ | |||
1 | Entries | ||
2 | ^^^^^^^ | ||
3 | |||
4 | .. list-table:: GNS Signature Purposes | ||
5 | :widths: auto | ||
6 | :header-rows: 1 | ||
7 | |||
8 | * - Name | ||
9 | - Number | ||
10 | - Package | ||
11 | - Subsystem | ||
12 | - Comment | ||
diff --git a/gnunet-signatures/rst.template b/gnunet-signatures/rst.template new file mode 100644 index 0000000..7e4af96 --- /dev/null +++ b/gnunet-signatures/rst.template | |||
@@ -0,0 +1,5 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Number}} | ||
3 | - {{Package}} | ||
4 | - {{Subsystem}} | ||
5 | - {{Comment}} | ||
diff --git a/http-status-codes/Makefile b/http-status-codes/Makefile index cea962b..1cc83de 100644 --- a/http-status-codes/Makefile +++ b/http-status-codes/Makefile | |||
@@ -5,14 +5,14 @@ check: registry.rec | |||
5 | 5 | ||
6 | # http-status-codes-1.csv is from IANA! | 6 | # http-status-codes-1.csv is from IANA! |
7 | iana.tmp: http-status-codes-1.csv | 7 | iana.tmp: http-status-codes-1.csv |
8 | cat $^ | grep -v Unassigned | csv2rec > $@ | 8 | cat http-status-codes-1.csv | grep -v Unassigned | csv2rec > $@ |
9 | 9 | ||
10 | # extend by all-caps descriptions suitable for C-style identifier generation | 10 | # extend by all-caps descriptions suitable for C-style identifier generation |
11 | iana-extended.tmp: iana.tmp | 11 | iana-extended.tmp: iana.tmp |
12 | ./extend.sh $@ $^ | 12 | ./extend.sh $@ iana.tmp |
13 | 13 | ||
14 | registry.rec: types.rec iana-extended.tmp extras.rec | 14 | registry.rec: types.rec iana-extended.tmp extras.rec |
15 | cat $^ > $@ | 15 | cat types.rec iana-extended.tmp extras.rec > $@ |
16 | 16 | ||
17 | distclean: | 17 | distclean: |
18 | rm -f *.tmp | 18 | rm -f *.tmp |
@@ -25,7 +25,7 @@ http-status-codes.h.tmp: registry.rec h.template | |||
25 | ../format.sh h.template < registry.rec > $@ | 25 | ../format.sh h.template < registry.rec > $@ |
26 | 26 | ||
27 | http-status-codes.h: h.header http-status-codes.h.tmp h.footer | 27 | http-status-codes.h: h.header http-status-codes.h.tmp h.footer |
28 | cat $^ > $@ | 28 | cat h.header http-status-codes.h.tmp h.footer > $@ |
29 | 29 | ||
30 | 30 | ||
31 | .PHONY: check clean distclean | 31 | .PHONY: check clean distclean |
diff --git a/http-status-codes/POLICY b/http-status-codes/POLICY new file mode 100644 index 0000000..79d1e37 --- /dev/null +++ b/http-status-codes/POLICY | |||
@@ -0,0 +1,5 @@ | |||
1 | The main registry is populated from the IANA registry. | ||
2 | |||
3 | The 'extras.rec' may be populated with additional status | ||
4 | codes that have significant usage and do not conflict with | ||
5 | IANA registry entries. \ No newline at end of file | ||
diff --git a/http-status-codes/extend.sh b/http-status-codes/extend.sh index db09f6b..91a600e 100755 --- a/http-status-codes/extend.sh +++ b/http-status-codes/extend.sh | |||
@@ -12,11 +12,13 @@ cat "$@" > ${TARGET} | |||
12 | TMPDIR=`pwd` | 12 | TMPDIR=`pwd` |
13 | export TMPDIR | 13 | export TMPDIR |
14 | 14 | ||
15 | for n in `seq 100 599` | 15 | n=100 |
16 | while [ "$n" -le 599 ] | ||
16 | do | 17 | do |
17 | VAL=`recsel -e "Value = $n" -P Description iana.tmp || true` | 18 | VAL=`recsel -e "Value = $n" -P Description iana.tmp || true` |
18 | CAPS=`echo ${VAL} | tr [a-z] [A-Z] | tr " -" "__"` | 19 | CAPS=`echo ${VAL} | tr [a-z] [A-Z] | tr " -" "__"` |
19 | recset -f Identifier -a "${CAPS}" -e "Value = $n" ${TARGET} | 20 | recset -f Identifier -a "${CAPS}" -e "Value = $n" ${TARGET} |
21 | n=`expr $n + 1` | ||
20 | done | 22 | done |
21 | 23 | ||
22 | 24 | ||
diff --git a/http-status-codes/http-status-codes-1.csv b/http-status-codes/http-status-codes-1.csv index 9abdcae..b21e36f 100644 --- a/http-status-codes/http-status-codes-1.csv +++ b/http-status-codes/http-status-codes-1.csv | |||
@@ -39,14 +39,14 @@ Value,Description,Reference | |||
39 | 410,Gone,"[RFC7231, Section 6.5.9]" | 39 | 410,Gone,"[RFC7231, Section 6.5.9]" |
40 | 411,Length Required,"[RFC7231, Section 6.5.10]" | 40 | 411,Length Required,"[RFC7231, Section 6.5.10]" |
41 | 412,Precondition Failed,"[RFC7232, Section 4.2][RFC8144, Section 3.2]" | 41 | 412,Precondition Failed,"[RFC7232, Section 4.2][RFC8144, Section 3.2]" |
42 | 413,Payload Too Large,"[RFC7231, Section 6.5.11]" | 42 | 413,Content Too Large,"[RFC9110, Section 15.5.14]" |
43 | 414,URI Too Long,"[RFC7231, Section 6.5.12]" | 43 | 414,URI Too Long,"[RFC7231, Section 6.5.12]" |
44 | 415,Unsupported Media Type,"[RFC7231, Section 6.5.13][RFC7694, Section 3]" | 44 | 415,Unsupported Media Type,"[RFC7231, Section 6.5.13][RFC7694, Section 3]" |
45 | 416,Range Not Satisfiable,"[RFC7233, Section 4.4]" | 45 | 416,Range Not Satisfiable,"[RFC7233, Section 4.4]" |
46 | 417,Expectation Failed,"[RFC7231, Section 6.5.14]" | 46 | 417,Expectation Failed,"[RFC7231, Section 6.5.14]" |
47 | 418-420,Unassigned, | 47 | 418-420,Unassigned, |
48 | 421,Misdirected Request,"[RFC7540, Section 9.1.2]" | 48 | 421,Misdirected Request,"[RFC7540, Section 9.1.2]" |
49 | 422,Unprocessable Entity,[RFC4918] | 49 | 422,Unprocessable Content,"[RFC9110, Sectio 15.5.21]" |
50 | 423,Locked,[RFC4918] | 50 | 423,Locked,[RFC4918] |
51 | 424,Failed Dependency,[RFC4918] | 51 | 424,Failed Dependency,[RFC4918] |
52 | 425,Too Early,[RFC8470] | 52 | 425,Too Early,[RFC8470] |
diff --git a/images/gnunet-blue.png b/images/gnunet-blue.png new file mode 100644 index 0000000..1658455 --- /dev/null +++ b/images/gnunet-blue.png | |||
Binary files differ | |||
diff --git a/index.rst b/index.rst new file mode 100644 index 0000000..c565eb7 --- /dev/null +++ b/index.rst | |||
@@ -0,0 +1,10 @@ | |||
1 | ############################################ | ||
2 | The GNUnet Assigned Numbers Authority (GANA) | ||
3 | ############################################ | ||
4 | |||
5 | |||
6 | .. toctree:: | ||
7 | :maxdepth: 2 | ||
8 | |||
9 | about | ||
10 | registries | ||
diff --git a/payto-payment-target-types/Makefile b/payto-payment-target-types/Makefile index 8364f52..9fa175c 100644 --- a/payto-payment-target-types/Makefile +++ b/payto-payment-target-types/Makefile | |||
@@ -1,2 +1,20 @@ | |||
1 | FILES=payto_payment_target_types.rst | ||
2 | all: check $(FILES) | ||
3 | |||
4 | |||
1 | check: | 5 | check: |
2 | recfix --check registry.rec | 6 | recfix --check registry.rec |
7 | |||
8 | distclean: | ||
9 | rm -f *.tmp | ||
10 | |||
11 | clean: | ||
12 | rm -f $(FILES) *.tmp | ||
13 | |||
14 | payto_payment_target_types.rst.tmp: registry.rec rst.template | ||
15 | ../format.sh rst.template < registry.rec > $@ | ||
16 | |||
17 | payto_payment_target_types.rst: rst.header payto_payment_target_types.rst.tmp | ||
18 | cat rst.header payto_payment_target_types.rst.tmp > $@ | ||
19 | |||
20 | .PHONY: check | ||
diff --git a/payto-payment-target-types/eth.txt b/payto-payment-target-types/eth.txt new file mode 100644 index 0000000..356f17d --- /dev/null +++ b/payto-payment-target-types/eth.txt | |||
@@ -0,0 +1,119 @@ | |||
1 | # Payto Payment Target Type for Ethereum-compatible Blockchain Addresses | ||
2 | |||
3 | ## Target Type "eth" | ||
4 | |||
5 | Name: eth | ||
6 | |||
7 | Description: Ethereum-compatible Blockchain Address | ||
8 | |||
9 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL | ||
10 | NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", | ||
11 | "MAY", and "OPTIONAL" in this document are to be interpreted as | ||
12 | described in RFC 2119 and RFC 8174. | ||
13 | |||
14 | The path consists of two components: The chain ID and the | ||
15 | Ethereum-compatible Mixed-case checksum address. | ||
16 | |||
17 | This is used to uniquely identify both the chain and the account | ||
18 | on the chain. The chain ID is used to prevent replay attacks | ||
19 | between different chains. If the checksum is invalid, the address | ||
20 | and corresponding URI is invalid and the payment should not be sent. | ||
21 | Connecting to the chain is out of scope for this specification. If | ||
22 | the chain is not available, the payment should not be sent, but the | ||
23 | URI is still valid. | ||
24 | |||
25 | The currency type can be omitted from the amount option, leaving | ||
26 | a simple decimal number with a maximum of 8 decimal places. | ||
27 | If the currency type (as part of the amount) is not present, | ||
28 | the currency is assumed to be the native currency of the chain. | ||
29 | If the currency is present, it must be a valid ERC-55 address | ||
30 | pointing to a valid ERC-20 token contract on the chain. If the | ||
31 | currency is not a valid ERC-20 token, then the URI is invalid. | ||
32 | This includes three-letter currency codes, which are not valid | ||
33 | ERC-20 token addresses. | ||
34 | |||
35 | |||
36 | Syntax: | ||
37 | payto-eth-URI = "payto://eth/" addr [ "@" chain_id ] [ "?" opts ] | ||
38 | |||
39 | 'addr' is an Ethereum-compatible Mixed-case checksum address | ||
40 | as defined in [ERC-55](https://eips.ethereum.org/EIPS/eip-55). | ||
41 | It MUST not be the zero address, and the checksum MUST be valid. | ||
42 | If either of these conditions is not met, the URI is invalid. | ||
43 | |||
44 | 'chain_id' is an Ethereum chain ID as defined in | ||
45 | [EIP-155](https://eips.ethereum.org/EIPS/eip-155). | ||
46 | If not present, it MUST default to 1 (mainnet). | ||
47 | |||
48 | 'opts' is defined in | ||
49 | [Section 2 of RFC 8905](https://tools.ietf.org/html/rfc8905#section-2). | ||
50 | |||
51 | |||
52 | Examples: | ||
53 | |||
54 | payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1 | ||
55 | payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1@11155111 | ||
56 | payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1?amount=1.23 | ||
57 | payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1?amount=0x6b175474e89094c44da98b954eedeac495271d0f:1.23 | ||
58 | |||
59 | The first address requests that payment be sent to the | ||
60 | mainnet address '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'. | ||
61 | |||
62 | The second address requests that payment be sent to the | ||
63 | Sepolia testnet address | ||
64 | '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'. | ||
65 | |||
66 | The third address requests that 1.23 ETH (1230000000000000000 | ||
67 | wei) be sent to the mainnet address | ||
68 | '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'. | ||
69 | |||
70 | The fourth address requests that 1.23 DAI (1230000000000000000 | ||
71 | base units of DAI, since DAI has 18 ERC-20 decimals) be sent | ||
72 | to the mainnet address '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'. | ||
73 | |||
74 | |||
75 | Motivation - not normative | ||
76 | |||
77 | This syntax is modeled after the ERC-681 URL format | ||
78 | for transaction requests, commonly used in Ethereum | ||
79 | wallets and DApps. The function and function parameters | ||
80 | are not included in this URI type, since they are not | ||
81 | needed for payment requests. | ||
82 | |||
83 | The chain ID is included in the URI, to prevent replay | ||
84 | attacks between different chains. The checksum address | ||
85 | is included in the URI, to prevent typos and other | ||
86 | errors in the address. The checksum address is also | ||
87 | included in the URI, to prevent phishing attacks by | ||
88 | displaying the address in a different case than the | ||
89 | one used to create the address. | ||
90 | |||
91 | The currency is included in the URI, to allow payments | ||
92 | to be made in any ERC-20 token. Three-letter currency | ||
93 | codes are not included, since they are not valid ERC-20 | ||
94 | token addresses. Should sending traditional currencies | ||
95 | be desired, Stablecoins are often ERC-20 tokens, and are | ||
96 | therefore valid currencies for this URI type. | ||
97 | |||
98 | |||
99 | Contact: <gavinnjohn@gmail.com> | ||
100 | |||
101 | |||
102 | Normative References | ||
103 | |||
104 | * [ERC-20] Token Standard | ||
105 | <https://eips.ethereum.org/EIPS/eip-20> | ||
106 | |||
107 | * [ERC-55] Mixed-case checksum address encoding | ||
108 | <https://eips.ethereum.org/EIPS/eip-55> | ||
109 | |||
110 | * [EIP-155] Simple replay attack protection | ||
111 | <https://eips.ethereum.org/EIPS/eip-155> | ||
112 | |||
113 | * [RFC 8905] The 'payto' URI Scheme for Payments | ||
114 | <https://tools.ietf.org/html/rfc8905> | ||
115 | |||
116 | Informative References | ||
117 | |||
118 | * [EIP-681] URL Format for Transaction Requests | ||
119 | <https://eips.ethereum.org/EIPS/eip-681> | ||
diff --git a/payto-payment-target-types/registry.rec b/payto-payment-target-types/registry.rec index f91ab9c..1c8fb3c 100644 --- a/payto-payment-target-types/registry.rec +++ b/payto-payment-target-types/registry.rec | |||
@@ -37,3 +37,15 @@ Reference: RFC 8905 | |||
37 | Name: ldap | 37 | Name: ldap |
38 | Reference: ldap.txt | 38 | Reference: ldap.txt |
39 | Contact: ietf@pep.security | 39 | Contact: ietf@pep.security |
40 | |||
41 | Name: eth | ||
42 | Reference: eth.txt | ||
43 | Contact: gavinnjohn@gmail.com | ||
44 | |||
45 | Name: interac-etransfer | ||
46 | Reference: TBD | ||
47 | Contact: singpolyma@singpolyma.net | ||
48 | |||
49 | Name: wallee-transaction | ||
50 | Reference: wallee-transaction.txt | ||
51 | Contact: habej2@bfh.ch | ||
diff --git a/payto-payment-target-types/rst.footer b/payto-payment-target-types/rst.footer new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/payto-payment-target-types/rst.footer | |||
diff --git a/payto-payment-target-types/rst.header b/payto-payment-target-types/rst.header new file mode 100644 index 0000000..5840ecc --- /dev/null +++ b/payto-payment-target-types/rst.header | |||
@@ -0,0 +1,13 @@ | |||
1 | GNU Taler Payment Target Types | ||
2 | ------------------------------ | ||
3 | |||
4 | Entries | ||
5 | ^^^^^^^ | ||
6 | |||
7 | .. list-table:: GNU Taler Payment Target Types | ||
8 | :widths: auto | ||
9 | :header-rows: 1 | ||
10 | |||
11 | * - Name | ||
12 | - Reference | ||
13 | - Contact | ||
diff --git a/payto-payment-target-types/rst.template b/payto-payment-target-types/rst.template new file mode 100644 index 0000000..be6e655 --- /dev/null +++ b/payto-payment-target-types/rst.template | |||
@@ -0,0 +1,3 @@ | |||
1 | * - {{Name}} | ||
2 | - {{Reference}} | ||
3 | - {{Contact}} | ||
diff --git a/payto-payment-target-types/wallee-transaction.txt b/payto-payment-target-types/wallee-transaction.txt new file mode 100644 index 0000000..ee03e63 --- /dev/null +++ b/payto-payment-target-types/wallee-transaction.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | # Payto Payment Target Type for Wallee Transactions | ||
2 | |||
3 | ## Target Type "wallee-transaction" | ||
4 | |||
5 | Name: wallee-transaction | ||
6 | |||
7 | Description: Wallee Transaction | ||
8 | |||
9 | A Wallee transaction is targeted by this payto target-type. | ||
10 | It aims to allow refunding a transaction which was initiated | ||
11 | by Wallee. | ||
12 | |||
13 | For refunding a transaction using Wallee, this payto specification | ||
14 | shall be used. To trigger a refund operation in Wallee, the identifier | ||
15 | of the transaction must be given as path parameter. The identifier is | ||
16 | a 64-bit integer. | ||
17 | |||
18 | Syntax: | ||
19 | |||
20 | payto-wallee-transaction-URI = "payto://wallee-transaction/" [ id ] | ||
21 | |||
22 | 'id' is a Long as defined in | ||
23 | [Wallee Type System](https://app-wallee.com/en-us/doc/api/web-service#_type_system) | ||
24 | |||
25 | |||
26 | Examples: | ||
27 | |||
28 | payto://wallee-transaction/18446744073709551616 | ||
29 | payto://wallee-transaction/13434452243525552616 | ||
30 | |||
31 | |||
32 | Contact: <mailto:habej2@bfh.ch> | ||
33 | |||
34 | |||
35 | Normative References | ||
36 | |||
37 | * [RFC 8905] The 'payto' URI Scheme for Payments | ||
38 | <https://tools.ietf.org/html/rfc8905> | ||
39 | |||
40 | Informative References | ||
41 | |||
42 | * [Wallee Transaction Model] The Transaction model of Wallee | ||
43 | <https://app-wallee.com/en-us/doc/api/model/transaction> | ||
44 | |||
45 | * [Wallee Transaction API] The Transaction api of Wallee | ||
46 | <https://app-wallee.com/doc/api/web-service#_transaction> | ||
47 | |||
48 | * [Wallee Type System] The type system used by Wallee | ||
49 | <https://app-wallee.com/en-us/doc/api/web-service#_type_system> | ||
diff --git a/registries.rst b/registries.rst new file mode 100644 index 0000000..35cfa91 --- /dev/null +++ b/registries.rst | |||
@@ -0,0 +1,19 @@ | |||
1 | Registries | ||
2 | ========== | ||
3 | |||
4 | .. toctree:: | ||
5 | :maxdepth: 1 | ||
6 | |||
7 | dot-alt/dot_alt.rst | ||
8 | gnu-name-system-default-tlds/tlds.rst | ||
9 | gnu-name-system-record-flags/gnu_name_system_record_flags.rst | ||
10 | gnu-name-system-record-types/gnu_name_system_record_types.rst | ||
11 | gnunet-error-codes/gnunet_error_codes.rst | ||
12 | gnunet-protocols/gnunet_overlay_protocols.rst | ||
13 | gnunet-signatures/gnunet_signatures.rst | ||
14 | gnunet-dht-block-types/gnunet_dht_block_types.rst | ||
15 | gnu-taler-db-events/taler_dbevents.rst | ||
16 | gnu-taler-error-codes/taler_error_codes.rst | ||
17 | payto-payment-target-types/payto_payment_target_types.rst | ||
18 | gns-protocol-numbers/gnu_name_system_protocols.rst | ||
19 | gns-service-port-numbers/gnu_name_system_service_ports.rst \ No newline at end of file | ||