aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.buildbot/build.sh3
-rwxr-xr-x.buildbot/firefly-x86_64-amdepyc_deploy.sh6
-rw-r--r--.gitignore5
-rw-r--r--Makefile61
-rw-r--r--README16
-rw-r--r--_exts/httpdomain/__init__.py14
-rw-r--r--_exts/httpdomain/autohttp/__init__.py11
-rw-r--r--_exts/httpdomain/autohttp/bottle.py114
-rw-r--r--_exts/httpdomain/autohttp/common.py36
-rw-r--r--_exts/httpdomain/autohttp/flask.py48
-rw-r--r--_exts/httpdomain/autohttp/flask_base.py215
-rw-r--r--_exts/httpdomain/autohttp/flaskqref.py80
-rw-r--r--_exts/httpdomain/autohttp/tornado.py128
-rw-r--r--_exts/httpdomain/httpdomain.py773
-rw-r--r--_exts/typescriptdomain.py587
-rw-r--r--_static/css/custom.css3
-rw-r--r--about.rst52
-rw-r--r--conf.py120
-rw-r--r--dot-alt/Makefile22
-rw-r--r--dot-alt/POLICY13
-rw-r--r--dot-alt/README8
-rw-r--r--dot-alt/registry.rec36
-rw-r--r--dot-alt/rst.header.template11
-rw-r--r--dot-alt/rst.template4
-rwxr-xr-xformat.sh52
-rw-r--r--gns-protocol-numbers/.gitignore1
-rw-r--r--gns-protocol-numbers/Makefile28
-rw-r--r--gns-protocol-numbers/POLICY20
-rw-r--r--gns-protocol-numbers/README8
-rw-r--r--gns-protocol-numbers/h.footer42
-rw-r--r--gns-protocol-numbers/h.header46
-rw-r--r--gns-protocol-numbers/h.template8
-rw-r--r--gns-protocol-numbers/registry.rec22
-rw-r--r--gns-protocol-numbers/rst.footer0
-rw-r--r--gns-protocol-numbers/rst.header.template11
-rw-r--r--gns-protocol-numbers/rst.template4
-rw-r--r--gns-service-port-numbers/.gitignore1
-rw-r--r--gns-service-port-numbers/Makefile28
-rw-r--r--gns-service-port-numbers/POLICY20
-rw-r--r--gns-service-port-numbers/README8
-rw-r--r--gns-service-port-numbers/h.footer42
-rw-r--r--gns-service-port-numbers/h.header46
-rw-r--r--gns-service-port-numbers/h.template8
-rw-r--r--gns-service-port-numbers/registry.rec27
-rw-r--r--gns-service-port-numbers/rst.footer0
-rw-r--r--gns-service-port-numbers/rst.header.template11
-rw-r--r--gns-service-port-numbers/rst.template4
-rw-r--r--gnu-name-system-default-tlds/.gitignore1
-rw-r--r--gnu-name-system-default-tlds/Makefile14
-rw-r--r--gnu-name-system-default-tlds/POLICY4
-rw-r--r--gnu-name-system-default-tlds/README4
-rw-r--r--gnu-name-system-default-tlds/registry.rec10
-rw-r--r--gnu-name-system-default-tlds/rst.footer0
-rw-r--r--gnu-name-system-default-tlds/rst.header.template10
-rw-r--r--gnu-name-system-default-tlds/rst.template3
-rw-r--r--gnu-name-system-default-tlds/tlds.template2
-rw-r--r--gnu-name-system-record-flags/.gitignore1
-rw-r--r--gnu-name-system-record-flags/Makefile28
-rw-r--r--gnu-name-system-record-flags/POLICY20
-rw-r--r--gnu-name-system-record-flags/README13
-rw-r--r--gnu-name-system-record-flags/h.footer11
-rw-r--r--gnu-name-system-record-flags/h.header49
-rw-r--r--gnu-name-system-record-flags/h.template6
-rw-r--r--gnu-name-system-record-flags/registry.rec43
-rw-r--r--gnu-name-system-record-flags/rst.footer0
-rw-r--r--gnu-name-system-record-flags/rst.header.template11
-rw-r--r--gnu-name-system-record-flags/rst.template4
-rw-r--r--gnu-name-system-record-types/Makefile15
-rw-r--r--gnu-name-system-record-types/POLICY6
-rw-r--r--gnu-name-system-record-types/README4
-rw-r--r--gnu-name-system-record-types/h.header2
-rw-r--r--gnu-name-system-record-types/registry.rec64
-rw-r--r--gnu-name-system-record-types/rst.footer0
-rw-r--r--gnu-name-system-record-types/rst.header.template11
-rw-r--r--gnu-name-system-record-types/rst.template4
-rw-r--r--gnu-taler-db-events/Makefile8
-rw-r--r--gnu-taler-db-events/registry.rec84
-rw-r--r--gnu-taler-db-events/rst.footer0
-rw-r--r--gnu-taler-db-events/rst.header13
-rw-r--r--gnu-taler-db-events/rst.template3
-rw-r--r--gnu-taler-error-codes/.gitignore1
-rw-r--r--gnu-taler-error-codes/Makefile21
-rw-r--r--gnu-taler-error-codes/go.footer1
-rw-r--r--gnu-taler-error-codes/go.header26
-rw-r--r--gnu-taler-error-codes/go.template8
-rw-r--r--gnu-taler-error-codes/kt.template2
-rw-r--r--gnu-taler-error-codes/registry.rec1511
-rw-r--r--gnu-taler-error-codes/rst.footer0
-rw-r--r--gnu-taler-error-codes/rst.header14
-rw-r--r--gnu-taler-error-codes/rst.template4
-rw-r--r--gnu-taler-extensions/Makefile6
-rw-r--r--gnu-taler-extensions/registry.rec43
-rw-r--r--gnu-taler-extensions/rst.footer0
-rw-r--r--gnu-taler-extensions/rst.header4
-rw-r--r--gnu-taler-extensions/rst.template9
-rw-r--r--gnu-taler-kyc-attributes/Makefile6
-rw-r--r--gnu-taler-kyc-attributes/registry.rec66
-rw-r--r--gnunet-dht-block-types/.gitignore1
-rw-r--r--gnunet-dht-block-types/Makefile28
-rw-r--r--gnunet-dht-block-types/POLICY11
-rw-r--r--gnunet-dht-block-types/README13
-rw-r--r--gnunet-dht-block-types/h.footer11
-rw-r--r--gnunet-dht-block-types/h.header43
-rw-r--r--gnunet-dht-block-types/h.template6
-rw-r--r--gnunet-dht-block-types/registry.rec102
-rw-r--r--gnunet-dht-block-types/rst.footer0
-rw-r--r--gnunet-dht-block-types/rst.header.template11
-rw-r--r--gnunet-dht-block-types/rst.template4
-rw-r--r--gnunet-error-codes/.gitignore3
-rw-r--r--gnunet-error-codes/Makefile71
-rw-r--r--gnunet-error-codes/POLICY11
-rw-r--r--gnunet-error-codes/README5
-rw-r--r--gnunet-error-codes/c-length.template9
-rw-r--r--gnunet-error-codes/c.footer66
-rw-r--r--gnunet-error-codes/c.header55
-rw-r--r--gnunet-error-codes/c.template6
-rw-r--r--gnunet-error-codes/go.footer1
-rw-r--r--gnunet-error-codes/go.header23
-rw-r--r--gnunet-error-codes/go.template7
-rw-r--r--gnunet-error-codes/h.footer45
-rw-r--r--gnunet-error-codes/h.header43
-rw-r--r--gnunet-error-codes/h.template7
-rw-r--r--gnunet-error-codes/registry.rec136
-rw-r--r--gnunet-error-codes/rst.footer0
-rw-r--r--gnunet-error-codes/rst.header.template11
-rw-r--r--gnunet-error-codes/rst.template4
-rw-r--r--gnunet-error-codes/ts.footer3
-rw-r--r--gnunet-error-codes/ts.header21
-rw-r--r--gnunet-error-codes/ts.template7
-rw-r--r--gnunet-protocols/.gitignore1
-rw-r--r--gnunet-protocols/Makefile30
-rw-r--r--gnunet-protocols/POLICY20
-rw-r--r--gnunet-protocols/README10
-rw-r--r--gnunet-protocols/h.footer11
-rw-r--r--gnunet-protocols/h.header30
-rw-r--r--gnunet-protocols/h.template6
-rw-r--r--gnunet-protocols/registry.rec23
-rw-r--r--gnunet-protocols/rst.footer0
-rw-r--r--gnunet-protocols/rst.header.template4
-rw-r--r--gnunet-protocols/rst.template10
-rw-r--r--gnunet-signatures/Makefile18
-rw-r--r--gnunet-signatures/POLICY11
-rw-r--r--gnunet-signatures/README4
-rw-r--r--gnunet-signatures/h.footer3
-rw-r--r--gnunet-signatures/h.header23
-rw-r--r--gnunet-signatures/h.template8
-rw-r--r--gnunet-signatures/registry.rec484
-rw-r--r--gnunet-signatures/rst.footer0
-rw-r--r--gnunet-signatures/rst.header.template12
-rw-r--r--gnunet-signatures/rst.template5
-rw-r--r--http-status-codes/Makefile8
-rw-r--r--http-status-codes/POLICY5
-rwxr-xr-xhttp-status-codes/extend.sh4
-rw-r--r--http-status-codes/http-status-codes-1.csv4
-rw-r--r--images/gnunet-blue.pngbin0 -> 27941 bytes
-rw-r--r--index.rst10
-rw-r--r--payto-payment-target-types/Makefile18
-rw-r--r--payto-payment-target-types/eth.txt119
-rw-r--r--payto-payment-target-types/registry.rec12
-rw-r--r--payto-payment-target-types/rst.footer0
-rw-r--r--payto-payment-target-types/rst.header13
-rw-r--r--payto-payment-target-types/rst.template3
-rw-r--r--payto-payment-target-types/wallee-transaction.txt49
-rw-r--r--registries.rst19
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
3make
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
5chmod -R ag+rX _build
6rsync --exclude=".*" --exclude="Makefile" --exclude="conf.py" -a --delete ./_build/ handbook@firefly.gnunet.org:~/gana/_build/
diff --git a/.gitignore b/.gitignore
index b25c15b..48ed587 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
4REGISTRIES = 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.
23SPHINXOPTS ?=
24SPHINXBUILD ?= sphinx-build
25SOURCEDIR = .
26BUILDDIR = _build
27
28
29all: rsts html
30
31# Put it first so that "make" without argument is like "make help".
32help:
33 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
34
35.PHONY: all clean help texinfo info Makefile
36
37rsts:
38 for dir in $(REGISTRIES); do \
39 $(MAKE) -C $$dir; \
40 done
41
42html:
43 @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
44
45texinfo:
46 @$(SPHINXBUILD) -M texinfo "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
47
48info:
49 @$(SPHINXBUILD) -M info "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
50
51clean:
52 rm -rf $(BUILDDIR)
53 for dir in $(REGISTRIES); do \
54 $(MAKE) -C $$dir; \
55 done
56
57distclean: clean
58
59# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
60#%: Makefile
61# @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/README b/README
index 7041f00..dda0881 100644
--- a/README
+++ b/README
@@ -8,6 +8,21 @@ protocols. If you need to open a new registry, please feel free
8to contact us at gana@gnunet.org. 8to contact us at gana@gnunet.org.
9 9
10 10
11Contributors
12============
13
14If you have Git access to GANA, you are generally authorized to add
15new entries to the registries. Most registries are under a simple
16first-come first-use policy. If you are unsure about the registration
17policy of a particular registry, do ask gana@gnunet.org before making
18changes.
19
20Deleting or modifying existing entries (except improving comments)
21should be done particularly carefully, so if unsure you might want to
22double-check with gana@gnunet.org before changing or deleting
23anything.
24
25
11History 26History
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
13import re
14import six
15
16from docutils import nodes
17from docutils.parsers.rst import directives
18from docutils.statemachine import ViewList
19
20from sphinx.util import force_decode
21from sphinx.util.compat import Directive
22from sphinx.util.nodes import nested_parse_with_titles
23from sphinx.util.docstrings import prepare_docstring
24from sphinx.pycode import ModuleAnalyzer
25
26from sphinxcontrib import httpdomain
27from sphinxcontrib.autohttp.common import http_directive, import_object
28
29
30def 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
53def 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
59class 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
110def 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"""
11import six
12from six.moves import builtins
13from six.moves import reduce
14
15def 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
25def 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"""
12from __future__ import absolute_import
13
14import re
15import itertools
16import six
17
18from docutils import nodes
19from docutils.parsers.rst import directives
20from docutils.statemachine import ViewList
21
22from sphinx.util import force_decode
23from sphinx.util.compat import Directive
24from sphinx.util.nodes import nested_parse_with_titles
25from sphinx.util.docstrings import prepare_docstring
26from sphinx.pycode import ModuleAnalyzer
27
28from sphinxcontrib import httpdomain
29from sphinxcontrib.autohttp.common import http_directive, import_object
30
31from .flask_base import AutoflaskBase
32
33class 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
45def 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
13import re
14import itertools
15import six
16
17from docutils import nodes
18from docutils.parsers.rst import directives
19from docutils.statemachine import ViewList
20
21from sphinx.util import force_decode
22from sphinx.util.compat import Directive
23from sphinx.util.nodes import nested_parse_with_titles
24from sphinx.util.docstrings import prepare_docstring
25from sphinx.pycode import ModuleAnalyzer
26
27from sphinxcontrib import httpdomain
28from sphinxcontrib.autohttp.common import http_directive, import_object
29
30
31def 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
47def 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
73def 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
100class 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
14from docutils import nodes
15from docutils.statemachine import ViewList
16
17from sphinxcontrib import httpdomain
18from sphinx.util.nodes import nested_parse_with_titles
19
20from .flask import AutoflaskBase
21
22
23class 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
76def 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
13import inspect
14import re
15import six
16
17from docutils import nodes
18from docutils.parsers.rst import directives
19from docutils.statemachine import ViewList
20
21from sphinx.util import force_decode
22from sphinx.util.compat import Directive
23from sphinx.util.nodes import nested_parse_with_titles
24from sphinx.util.docstrings import prepare_docstring
25from sphinx.pycode import ModuleAnalyzer
26
27from sphinxcontrib import httpdomain
28from sphinxcontrib.autohttp.common import http_directive, import_object
29
30
31def 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
49def 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
65def normalize_path(path):
66 if path.endswith('$'):
67 path = path[:-1]
68 return path
69
70
71class 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
125def 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
12import re
13
14from docutils import nodes
15
16from pygments.lexer import RegexLexer, bygroups
17from pygments.lexers import get_lexer_by_name
18from pygments.token import Literal, Text, Operator, Keyword, Name, Number
19from pygments.util import ClassNotFound
20
21from sphinx import addnodes
22from sphinx.roles import XRefRole
23from sphinx.domains import Domain, ObjType, Index
24from sphinx.directives import ObjectDescription, directives
25from sphinx.util.nodes import make_refnode
26from 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
39class 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
53class 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
63class 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
71class 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
78class 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.
89METHOD_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.
106HEADER_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
179HTTP_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
237WEBDAV_STATUS_CODES = [207, 422, 423, 424, 507]
238
239http_sig_param_re = re.compile(r'\((?:(?P<type>[^:)]+):)?(?P<name>[\w_]+)\)',
240 re.VERBOSE)
241
242
243def 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
254def http_resource_anchor(method, path):
255 path = re.sub(r'[{}]', '', re.sub(r'[<>:/]', '-', path))
256 return method.lower() + '-' + path
257
258
259class 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
349class HTTPOptions(HTTPResource):
350
351 method = 'options'
352
353
354class HTTPHead(HTTPResource):
355
356 method = 'head'
357
358
359class HTTPPatch(HTTPResource):
360
361 method = 'patch'
362
363
364class HTTPPost(HTTPResource):
365
366 method = 'post'
367
368
369class HTTPGet(HTTPResource):
370
371 method = 'get'
372
373
374class HTTPPut(HTTPResource):
375
376 method = 'put'
377
378
379class HTTPDelete(HTTPResource):
380
381 method = 'delete'
382
383
384class HTTPTrace(HTTPResource):
385
386 method = 'trace'
387
388
389class HTTPConnect(HTTPResource):
390
391 method = 'connect'
392
393
394class HTTPCopy(HTTPResource):
395
396 method = 'copy'
397
398
399class HTTPAny(HTTPResource):
400
401 method = 'any'
402
403
404class 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
416class 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
437class 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
510class 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
524class 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
571class 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
697class 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
762def 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"""
2TypeScript domain.
3
4:copyright: Copyright 2019 by Taler Systems SA
5:license: LGPLv3+
6:author: Florian Dold
7"""
8
9import re
10
11from pathlib import Path
12
13from docutils import nodes
14from typing import List, Optional, Iterable, Dict, Tuple
15from typing import cast
16
17from pygments.lexers import get_lexer_by_name
18from pygments.filter import Filter
19from pygments.token import Literal, Text, Operator, Keyword, Name, Number
20from pygments.token import Comment, Token, _TokenType
21from pygments.token import *
22from pygments.lexer import RegexLexer, bygroups, include
23from pygments.formatters import HtmlFormatter
24
25from docutils import nodes
26from docutils.nodes import Element, Node
27
28from sphinx.roles import XRefRole
29from sphinx.domains import Domain, ObjType, Index
30from sphinx.directives import directives
31from sphinx.util.docutils import SphinxDirective
32from sphinx.util.nodes import make_refnode
33from sphinx.util import logging
34from sphinx.highlighting import PygmentsBridge
35from sphinx.builders.html import StandaloneHTMLBuilder
36from sphinx.pygments_styles import SphinxStyle
37
38logger = logging.getLogger(__name__)
39
40
41class 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
120class 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
185class 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.
304token_props = {}
305
306
307class 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"&amp;",
363 ord("<"): u"&lt;",
364 ord(">"): u"&gt;",
365 ord('"'): u"&quot;",
366 ord("'"): u"&#39;",
367}
368
369
370class 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
498class 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
528class 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
542def get_annotation(tok, key):
543 if not hasattr(tok, "kv"):
544 return None
545 return tok.kv.get(key)
546
547
548def 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
556def 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
565def 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
574link_reg = re.compile(r"(?<!`)`([^`<]+)\s*(?:<([^>]+)>)?\s*`_?")
575literal_reg = re.compile(r"``([^`]+)``")
576
577
578def 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 @@
1div.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 @@
1About GANA
2==========
3
4The GNUnet Assigned Numbers Authority (GANA) contains various registries
5we maintain, for GNUnet other projects that need names and numbers for
6use in network protocols. If you need to open a new registry, please
7feel free to contact us at gana@gnunet.org.
8
9The registry sources can be found here: https://git.gnunet.org/gana.git
10
11History
12-------
13
14Barry Leiba `wrote on April 4th 2020 <https://datatracker.ietf.org/doc/conflict-review-dold-payto/ballot/>`_ that “Neither IANA nor participants
15in the IETF will have any necessary expertise to evaluate registration
16requests in the sort of registry described, and no one will be well
17served by the creation of such a registry at IANA. It would be far
18better to have a registration process be described in this document
19involving experts from the industry as reviewers and maintenance of the
20registrations by an industry organization, rather than by IANA.”
21
22So here we are. As IETF/IANA “lack the necessary expertise to operate a
23registry” for names and numbers used in network protocols, the GNUnet
24project is happy to step up.
25
26License
27-------
28
29The GANA database is licensed under the GPL. See ``COPYING`` in the Git
30repository.
31
32Design
33------
34
35Each registry must have a unique name and all associated information
36lives in a directory under that unique name in the Git repository.
37
38Each 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``).
diff --git a/conf.py b/conf.py
new file mode 100644
index 0000000..8b8ef69
--- /dev/null
+++ b/conf.py
@@ -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 -----------------------------------------------------
19import sys
20import os
21
22project = 'GANA'
23copyright = '2024, GNUnet Project'
24author = 'GNUnet Project'
25
26sys.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.
33extensions = [
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.
48templates_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.
53exclude_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#
61html_theme = 'sphinx_rtd_theme'
62
63html_sidebars = {
64 #"**": ["navbar-logo.html", "sbt-sidebar-nav.html", "search-field.html"]
65 "**": ["search-field.html", "sbt-sidebar-nav.html"]
66}
67
68html_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".
92html_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
100html_logo = "images/gnunet-blue.png"
101
102# Display to-do items in docs
103todo_include_todos = True
104
105primary_domain = "c"
106
107highlight_language = "c"
108
109rst_prolog = f"""
110.. role:: c(code)
111 :language: c
112
113.. role:: bolditalic
114 :class: bolditalic
115"""
116
117rst_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 @@
1FILES=dot_alt.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8
9 rm -f *.tmp
10clean:
11 rm -f $(FILES) *.tmp
12
13dot_alt.rst.tmp: registry.rec rst.template
14 ../format.sh rst.template < registry.rec > $@
15
16rst.header.tmp:
17 cat README POLICY rst.header.template > $@
18
19dot_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 @@
1Policy
2^^^^^^
3
4The "Label" must be unique in the entire registry. The value must be a
5case insensitive `LDH label <https://www.rfc-editor.org/rfc/rfc5890#section-2.3.1>`__
6following the restrictions on DNS names.
7
8Adding records can be done on a first-come first-served basis after GANA
9committer review.
10
11The current contact(s) for review are reachable at
12alt-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
4This 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
6This registry is used to ensure that names of alternative name systems
7do 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
18Label: gns
19UnicodeLabel: gns
20Contact: Martin Schanzenbach <schanzen@gnunet.org>
21References: RFC 9498
22Description: The .alt subdomain for GNS
23
24Label: i2p
25UnicodeLabel: i2p
26Contact: zzz <zzz AT i2pmail DOT org>
27References: https://geti2p.net/en/docs/naming
28Description: I2P is a P2P network implementing its own name resolution mechanism
29
30# Unreserved unicode example
31Label: xn--fsq
32UnicodeLabel: 例
33Contact: Martin Schanzenbach <schanzen@gnunet.org>
34References: None
35Description: 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 @@
1Entries
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}}
diff --git a/format.sh b/format.sh
index 9af69f1..a8f2265 100755
--- a/format.sh
+++ b/format.sh
@@ -1,2 +1,52 @@
1#!/bin/sh 1#!/bin/sh
2exec 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##
13me=$(basename $0)
14
15version='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
22if [ x"$1" = x--help ] ; then
23 sed '/^##/,/^##/!d;/^##/d;s/^# //g;s/^#$//g' $0
24 exit 0
25fi
26
27if [ x"$1" = x--version ] ; then
28 echo $me '(gana)' $version
29 exit 0
30fi
31
32if [ x"$1" = x ] ; then
33 echo >&2 "$me: ERROR: missing arg TEMPLATE (try --help)"
34 exit 1
35fi
36
37template="$1"
38
39if [ x"$2" = x ] ; then : ; else
40 selexp="$2"
41fi
42
43if [ "$selexp" ] ; then
44 t=$(mktemp)
45 trap "rm -f $t" EXIT
46 recsel -e "$selexp" > $t &&
47 recfmt -f "$template" < $t
48else
49 exec recfmt -f "$template"
50fi
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 @@
1FILES=gnu_name_system_protocols.h gnu_name_system_protocols.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnu_name_system_protocols.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnu_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
18gnu_name_system_protocols.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnu_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 @@
1Policy
2^^^^^^
3
4Each registry entry should contain three values: the port "Number" of the
5protocol, which must be above 255,
6the "Name" of the protocol, and a "Reference" with links
7to further information about the record type.
8
9The "Name" must be unique in the entire registry. The value must be a
10case insensitive ASCII string and is restricted to alphanumeric
11characters.
12
13Adding protocols is possible after expert review, using a
14first-come-first-served policy for unique "Name" allocation.
15Experts are responsible to ensure that the chosen "Name" is
16appropriate for the record type.
17
18The current contact(s) for expert review are reachable at
19gns-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 @@
1GNS Protocol Numbers
2--------------------
3
4This registry is for protocol number mappings for GNS names that are BOXed.
5
6Some "_"-labels map to protocol numbers, but others do not.
7For 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
7uint16_t
8GNUNET_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
21const char*
22GNUNET_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
33extern "C" {
34#if 0 /* keep Emacsens' auto-indent happy */
35}
36#endif
37#endif
38
39struct GNUNET_GNS_Protocol
40{
41 const char *name;
42
43 uint16_t number;
44};
45
46struct 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
19Number: 49152
20Name: trust
21Comment: LIGHTest trust policy scheme
22References: 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 @@
1Entries
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 @@
1FILES=gnu_name_system_service_ports.h gnu_name_system_service_ports.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnu_name_system_service_ports.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnu_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
18gnu_name_system_service_ports.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnu_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 @@
1Policy
2^^^^^^
3
4Each registry entry should contain three values: the port "Number" of the
5service, which must be above 49151 (private/dynamic port range),
6the "Name" of the service, and a "Reference" with links
7to further information about the record type.
8
9The "Name" must be unique in the entire registry. The value must be a
10case insensitive ASCII string and is restricted to alphanumeric
11characters.
12
13Adding records is possible after expert review, using a
14first-come-first-served policy for unique "Name" allocation.
15Experts are responsible to ensure that the chosen "Name" is
16appropriate for the record type.
17
18The current contact(s) for expert review are reachable at
19gns-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 @@
1GNS Service Ports
2-----------------
3
4This registry is for service-to-port mappings for GNS names that are BOXed.
5
6Some "_"-labels map to service ports (RFC 6335), but others do not.
7For 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
7uint16_t
8GNUNET_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
21const char*
22GNUNET_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
33extern "C" {
34#if 0 /* keep Emacsens' auto-indent happy */
35}
36#endif
37#endif
38
39struct GNUNET_GNS_ServicePort
40{
41 const char *name;
42
43 uint16_t port;
44};
45
46struct 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
19Number: 49152
20Name: scheme
21Comment: Used by Trust Scheme Authorities to publish information about Trust Schemes (LIGHTest)
22References: TODO
23
24Number: 49153
25Name: translation
26Comment: Used Trust Translation Authorities to publish information about Trust Translations (LIGHTest)
27References: 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 @@
1Entries
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 @@
1FILES=tlds.conf 1FILES=tlds.conf tlds.rst
2all: check $(FILES) 2all: check $(FILES)
3 3
4check: 4check:
@@ -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
16tlds.conf: tlds.header tlds.conf.tmp 16tlds.conf: tlds.header tlds.conf.tmp
17 cat $^ > $@ 17 cat tlds.header tlds.conf.tmp > $@
18
19tlds.rst.tmp: registry.rec rst.template
20 ../format.sh rst.template < registry.rec > $@
21
22rst.header.tmp:
23 cat README POLICY rst.header.template > $@
24
25tlds.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 @@
1Policy
2^^^^^^
3
1Each registry entry should contain three values: the "Key" of the 4Each registry entry should contain three values: the "Key" of the
2authoritative zone of a TLD, the "Name" of the TLDS, an optional 5authoritative 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
12The current contact(s) for expert review are reachable at 15The current contact(s) for expert review are reachable at
13gns-registry@gnunet.org. 16gns-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 @@
1GNS Default Top-Level-Domains
2-----------------------------
3
1This registry is the default Top-Level-Domains (TLDs) for the GNU Name System. 4This registry is the default Top-Level-Domains (TLDs) for the GNU Name System.
2 5
3This registry is used to ensure that GNS resolvers ship with a default 6This registry is used to ensure that GNS resolvers ship with a default
4configuration of TLDs in order to ease transition and enable instant use. 7configuration 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
20Name: pin 20Name: pin.gns.alt
21Key: 000G001MF6DVMZZ4Y8XRZQDXM1PB3D3VGEK29ZHXBA57EPSNW1QBPKT8J0 21Key: 000G0522TTKQESZ9KPRT2K0RA9ZC8YMD52D2XYVYVGPDCNPMWHH9QXXF4W
22Comment: The FCFS authority managed by GNUnet e.V. 22Comment: The FCFS authority managed by GNUnet e.V.
23
24Name: gnunet.gns.alt
25Key: 000G0522TTKQESZ9KPRT2K0RA9ZC8YMD52D2XYVYVGPDCNPMWHH9QXXF4W
26Comment: 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 @@
1Entries
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 @@
1FILES=gnu_name_system_record_flags.h gnu_name_system_record_flags.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnu_name_system_record_flags.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnu_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
18gnu_name_system_record_flags.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnu_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 @@
1Policy
2^^^^^^
3
4Each registry entry should contain three values: the "Number" of the
5record flags, which must be between 0 and 15,
6the "Name" of the record flag, and a "Reference" with links
7to further information about the record flag.
8
9The "Name" must be unique in the entire registry. The value must be a
10case insensitive ASCII string and is restricted to alphanumeric
11characters.
12
13Adding flags is possible after expert review, using a
14first-come-first-served policy for unique "Name" allocation.
15Experts are responsible to ensure that the chosen "Name" is
16appropriate for the record flag.
17
18The current contact(s) for expert review are reachable at
19gns-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 @@
1GNS Record Flags
2----------------
3
4This registry is for GNU Name System Record Flags.
5
6GNU Name System Record flags uniquely identify the different kinds
7of key-value pairs that can be used as flags of a GNU Name System record.
8
9This registry is used to ensure that the names and numeric values
10used to identify record flags are uniquely defined and to
11allow GNS resolvers implementors to find out details about the
12respective 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 */
44enum 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
20Number: 15
21Name: CRITICAL
22Comment: This record is critical. If it cannot be processed (for example because the record type is unknown) resolution MUST fail
23References: https://lsd.gnunet.org/lsd0001
24
25Number: 14
26Name: SHADOW
27Comment: This record should not be used unless all (other) records in the set with an absolute expiration time have expired.
28References: https://lsd.gnunet.org/lsd0001
29
30Number: 13
31Name: SUPPLEMENTAL
32Comment: This is a supplemental record.
33References: https://lsd.gnunet.org/lsd0001
34
35Number: 1
36Name: RELATIVE_EXPIRATION
37Comment: This expiration time of the record is a relative time (not an absolute time). Used in GNUnet implementation.
38References: https://git.gnunet.org/gnunet.git
39
40Number: 0
41Name: PRIVATE
42Comment: This is a private record of this peer and it should thus not be published.
43References: 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 @@
1Entries
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 @@
1FILES=gnu_name_system_record_types.h 1FILES=gnu_name_system_record_types.h gnu_name_system_record_types.rst
2all: check $(FILES) 2all: check $(FILES)
3 3
4check: 4check:
5 recfix --check registry.rec 5 recfix --check registry.rec
6 6
7distclean: 7distclean:
8
9 rm -f *.tmp 8 rm -f *.tmp
10clean: 9clean:
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
16gnu_name_system_record_types.h: h.header gnu_name_system_record_types.h.tmp h.footer 15gnu_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
18gnu_name_system_record_types.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnu_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 @@
1Policy
2^^^^^^
3
1Each registry entry should contain three values: the "Number" of the 4Each registry entry should contain three values: the "Number" of the
2record type, which must be above 65535 (to avoid conflicts with legacy 5record type, which must be above 65535 (to avoid conflicts with legacy
3DNS record types), the "Name" of the record type, and a "Reference" with links 6DNS 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.
12Experts are responsible to ensure that the chosen "Name" is 15Experts are responsible to ensure that the chosen "Name" is
13appropriate for the record type. 16appropriate for the record type.
14 17
18Numbers above 0xFFFF0000 non-exclusively indicate record types for private use.
19
15The current contact(s) for expert review are reachable at 20The current contact(s) for expert review are reachable at
16gns-registry@gnunet.org. 21gns-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 @@
1GNS Record Types
2----------------
3
1This registry is for GNU Name System Record Types. 4This registry is for GNU Name System Record Types.
2 5
3GNU Name System Record types uniquely identify the different kinds 6GNU 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
7used to identify record types are uniquely defined and to 10used to identify record types are uniquely defined and to
8allow GNS resolvers implementors to find out details about the 11allow GNS resolvers implementors to find out details about the
9respective semantics and human-readable syntax. 12respective 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
19Number: 65536 19Number: 65536
20Name: PKEY 20Name: PKEY
21Comment: GNS zone transfer 21Comment: GNS zone delegation (PKEY)
22References: LSD0001 22References: RFC 9498
23 23
24Number: 65537 24Number: 65537
25Name: NICK 25Name: NICK
26Comment: GNS nick names 26Comment: GNS zone nickname
27References: LSD0001 27References: RFC 9498
28 28
29Number: 65538 29Number: 65538
30Name: LEHO 30Name: LEHO
31Comment: legacy hostnames 31Comment: GNS legacy hostname
32References: LSD0001 32References: RFC 9498
33 33
34Number: 65539 34Number: 65539
35Name: VPN 35Name: VPN
36Comment: VPN resolution 36Comment: VPN resolution
37References: LSD0001 37References:
38 38
39Number: 65540 39Number: 65540
40Name: GNS2DNS 40Name: GNS2DNS
41Comment: Delegation to DNS 41Comment: Delegation to DNS
42References: LSD0001 42References: RFC 9498
43 43
44Number: 65541 44Number: 65541
45Name: BOX 45Name: BOX
46Comment: Boxed records (see TLSA/SRV handling in GNS) 46Comment: Box record
47References: LSD0001 47References: RFC 9498
48 48
49Number: 65542 49Number: 65542
50Name: PLACE 50Name: PLACE
@@ -66,6 +66,12 @@ Name: RECLAIM_TICKET
66Comment: local ticket reference 66Comment: local ticket reference
67Contact: schanzen@gnunet.org 67Contact: schanzen@gnunet.org
68 68
69Number: 65547
70Name: SBOX
71Comment: SBox record
72Contact: sebastian.nadler@tum.de
73References: LSD 0008
74
69Number: 65548 75Number: 65548
70Name: DELEGATE 76Name: DELEGATE
71Comment: For ABD policies 77Comment: For ABD policies
@@ -81,10 +87,10 @@ Name: RECLAIM_ATTRIBUTE_REF
81Comment: for reclaim records 87Comment: for reclaim records
82Contact: schanzen@gnunet.org 88Contact: schanzen@gnunet.org
83 89
84#Number: 65551 90Number: 65551
85#Name: 91Name: REDIRECT
86#Comment: 92Comment: Redirection record
87#Contact: 93Contact: RFC 9498
88 94
89Number: 65552 95Number: 65552
90Name: RECLAIM_OIDC_CLIENT 96Name: RECLAIM_OIDC_CLIENT
@@ -109,9 +115,35 @@ Contact: schanzen@gnunet.org
109 115
110Number: 65556 116Number: 65556
111Name: EDKEY 117Name: EDKEY
112Comment: Record type for EDKEY zone delegations. 118Comment: GNS zone delegation (EDKEY)
113 119
114Number: 65557 120Number: 65557
115Name: ERIS_READ_CAPABILITY 121Name: ERIS_READ_CAPABILITY
116Comment: Encoding for Robust Immutable Storage (ERIS) binary read capability 122Comment: Encoding for Robust Immutable Storage (ERIS) binary read capability
117Reference: http://purl.org/eris 123References: http://purl.org/eris
124
125Number: 65558
126Name: MESSENGER_ROOM_ENTRY
127Comment: Record type to share an entry of a messenger room
128Contact: thejackimonster@gmail.com
129
130Number: 65559
131Name: TOMBSTONE
132Comment: Record type to indicate a previously delete record (PRIVATE only)
133Contact: gnunet-developers@gnunet.org
134
135Number: 65560
136Name: MESSENGER_ROOM_DETAILS
137Comment: Record type to store details about a messenger room
138Contact: thejackimonster@gmail.com
139
140Number: 65561
141Name: DID_DOCUMENT
142Comment: Record type to store DID Documents
143Contact: schanzen@gnunet.orgNumber: 65561
144
145# Private range started from 0xFFFF0000
146Number: 4294901760
147Name: GNS_REGISTRAR_METADATA
148Comment: Private metadata for a delegation registration
149Contact: 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 @@
1Entries
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 @@
1FILES=taler_dbevents.h 1FILES=taler_dbevents.h taler_dbevents.rst
2 2
3all: check $(FILES) 3all: check $(FILES)
4 4
@@ -17,4 +17,10 @@ taler_dbevents.h.tmp: registry.rec h.template
17taler_dbevents.h: h.header taler_dbevents.h.tmp h.footer 17taler_dbevents.h: h.header taler_dbevents.h.tmp h.footer
18 cat $^ > $@ 18 cat $^ > $@
19 19
20taler_dbevents.rst.tmp: registry.rec rst.template
21 ../format.sh rst.template < registry.rec > $@
22
23taler_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
32Name: EXCHANGE_WIRE_UPDATED 32Name: EXCHANGE_WIRE_UPDATED
33Description: Event triggered when the wire response was changed via the management API. 33Description: Event triggered when the wire response was changed via the management API.
34 34
35Value: 1003
36Name: EXCHANGE_KYC_COMPLETED
37Description: Event triggered when a user completed a KYC process.
38
39Value: 1004
40Name: EXCHANGE_EXTENSIONS_UPDATED
41Description: Event triggered when the configuration of an extension is updated.
42
43Value: 1005
44Name: EXCHANGE_PURSE_MERGED
45Description: Event triggered when a purse was merged into a reserve.
46
47Value: 1006
48Name: EXCHANGE_PURSE_DEPOSITED
49Description: Event triggered when coins are deposited into a purse.
50
51Value: 1007
52Name: EXCHANGE_DEPOSIT_STATUS_CHANGED
53Description: Event triggered when the tracking status for a deposit has changed.
54
55Value: 1008
56Name: EXCHANGE_PURSE_REFUNDED
57Description: Event triggered when any purse was refunded.
58
59
35# 1100-1199: For Taler Merchant 60# 1100-1199: For Taler Merchant
36 61
37Value: 1100 62Value: 1100
@@ -58,9 +83,66 @@ Value: 1105
58Name: MERCHANT_ORDERS_CHANGE 83Name: MERCHANT_ORDERS_CHANGE
59Description: Event triggered when the set of orders or their state changes. 84Description: Event triggered when the set of orders or their state changes.
60 85
86Value: 1106
87Name: MERCHANT_WEBHOOK_PENDING
88Description: Event triggered when a new pending webhook is ready to be run.
89
90Value: 1107
91Name: MERCHANT_REWARD_PICKUP
92Description: Event triggered when a reward is being picked up.
93
94Value: 1108
95Name: MERCHANT_WIRE_TRANSFER_CONFIRMED
96Description: Event triggered when a wire transfer is confirmed. Triggers interaction with the exchange to download details about which payments were aggregated.
97
98Value: 1109
99Name: MERCHANT_ACCOUNTS_CHANGED
100Description: Event triggered when the set of accounts has changed. Triggers restart of taler-merchant-wirewatch.
101
102Value: 1110
103Name: MERCHANT_EXCHANGE_KEYS
104Description: Event triggered when we downloaded "/keys" from an exchange and stored it in the database. Extra argument must be the exchange base URL.
105
106Value: 1111
107Name: MERCHANT_NEW_WIRE_DEADLINE
108Description: 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
112Value: 1200
113Name: EXCHANGE_AUDITOR_NEW_DEPOSIT_CONFIRMATION
114Description: 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
64Value: 2000 120Value: 2000
65Name: ANASTASIS_AUTH_IBAN_TRANSFER 121Name: ANASTASIS_AUTH_IBAN_TRANSFER
66Description: A wire transfer from the target account with the correct wire transfer subject was received. \ No newline at end of file 122Description: A wire transfer from the target account with the correct wire transfer subject was received.
123
124# 3000-3099: For Libeufin
125
126Value: 3000
127Name: LIBEUFIN_TALER_INCOMING
128Description: 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.
133Value: 3001
134Name: LIBEUFIN_REGIO_TX
135Description: 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.
140Value: 3002
141Name: LIBEUFIN_SANDBOX_FIAT_INCOMING
142Description: 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.
146Value: 3003
147Name: LIBEUFIN_NEXUS_TX
148Description: 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 @@
1Taler DB Events
2---------------
3
4Entries
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
6taler_error_codes.py 6taler_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
7all: check $(FILES) 9all: 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.
25combined.tmp: registry.rec prep 27combined.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
29combined-escaped.tmp: combined.tmp 31combined-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
38taler_error_codes.h: h.header taler_error_codes.h.tmp h.footer 40taler_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
41taler_error_codes.c.tmp: combined-escaped.tmp c.template 43taler_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
62taler_error_codes.py.tmp: combined.tmp py.template 64taler_error_codes.py.tmp: combined.tmp py.template
63 ../format.sh py.template < combined.tmp > $@ 65 ../format.sh py.template < combined.tmp > $@
64 66
65taler_error_codes.py: py.header taler_error_codes.py.tmp 67taler_error_codes.py: py.header taler_error_codes.py.tmp
68 cat $^ > $@
69
70taler_error_codes.go.tmp: combined.tmp go.template
71 ../format.sh go.template < combined.tmp > $@
72
73taler_error_codes.go: go.header taler_error_codes.go.tmp go.footer
66 cat $^ > $@ 74 cat $^ > $@
67 75
76taler_error_codes.rst.tmp: combined.tmp rst.template
77 ../format.sh rst.template < combined.tmp > $@
78
79taler_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
24package gana
25
26const (
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
26Value: 0 28Value: 0000
27Name: NONE 29Name: NONE
28Description: Special code to indicate success (no error). 30Description: Special code to indicate success (no error).
29HttpStatus: 0 31HttpStatus: 0
30 32
31# We could not get the error code. 33# We could not get the error code.
32 34Value: 0001
33Value: 1
34Name: INVALID 35Name: INVALID
35Description: A non-integer error code was returned in the JSON response. 36Description: 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.
36HttpStatus: 0 37HttpStatus: 0
37 38
39Value: 0002
40Name: GENERIC_CLIENT_INTERNAL_ERROR
41Description: 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.
42HttpStatus: 0
38 43
39# Fundamental problems detected client-side (10-19) 44# Fundamental problems detected client-side (10-19)
40 45
41Value: 10 46Value: 0010
42Name: GENERIC_INVALID_RESPONSE 47Name: GENERIC_INVALID_RESPONSE
43Description: The response we got from the server was not even in JSON format. 48Description: 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.
44HttpStatus: 0 49HttpStatus: 0
45 50
46Value: 11 51Value: 0011
47Name: GENERIC_TIMEOUT 52Name: GENERIC_TIMEOUT
48Description: An operation timed out. 53Description: The operation timed out. Trying again might help. Check the network connection.
49HttpStatus: 0 54HttpStatus: 0
50 55
51Value: 12 56Value: 0012
52Name: GENERIC_VERSION_MALFORMED 57Name: GENERIC_VERSION_MALFORMED
53Description: The version string given does not follow the expected CURRENT:REVISION:AGE Format. 58Description: 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.
54HttpStatus: 0 59HttpStatus: 0
55 60
56Value: 13 61Value: 0013
57Name: GENERIC_REPLY_MALFORMED 62Name: GENERIC_REPLY_MALFORMED
58Description: 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. 63Description: 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.
59HttpStatus: 0 64HttpStatus: 0
60 65
61Value: 14 66Value: 0014
62Name: GENERIC_CONFIGURATION_INVALID 67Name: GENERIC_CONFIGURATION_INVALID
63Description: There is an error in the client-side configuration, for example the base URL specified is malformed. 68Description: 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.
64HttpStatus: 0 69HttpStatus: 0
65 70
71Value: 0015
72Name: GENERIC_UNEXPECTED_REQUEST_ERROR
73Description: 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.
74HttpStatus: 0
75
76Value: 0016
77Name: GENERIC_TOKEN_PERMISSION_INSUFFICIENT
78Description: 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.
79HttpStatus: 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
69Value: 20 84Value: 0020
70Name: GENERIC_METHOD_INVALID 85Name: GENERIC_METHOD_INVALID
71Description: The HTTP method used is invalid for this endpoint. 86Description: 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.
72HttpStatus: 405 87HttpStatus: 405
73 88
74Value: 21 89Value: 0021
75Name: GENERIC_ENDPOINT_UNKNOWN 90Name: GENERIC_ENDPOINT_UNKNOWN
76Description: There is no endpoint defined for the URL provided by the client. 91Description: 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.
77HttpStatus: 404 92HttpStatus: 404
78 93
79Value: 22 94Value: 0022
80Name: GENERIC_JSON_INVALID 95Name: GENERIC_JSON_INVALID
81Description: The JSON in the client's request was malformed (generic parse error). 96Description: 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.
82HttpStatus: 400 97HttpStatus: 400
83 98
84Value: 23 99Value: 0023
85Name: GENERIC_HTTP_HEADERS_MALFORMED 100Name: GENERIC_HTTP_HEADERS_MALFORMED
86Description: Some of the HTTP headers provided by the client caused the server to not be able to handle the request. 101Description: 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.
87HttpStatus: 400 102HttpStatus: 400
88 103
89Value: 24 104Value: 0024
90Name: GENERIC_PAYTO_URI_MALFORMED 105Name: GENERIC_PAYTO_URI_MALFORMED
91Description: The payto:// URI provided by the client is malformed. 106Description: 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.
92HttpStatus: 400 107HttpStatus: 400
93 108
94Value: 25 109Value: 0025
95Name: GENERIC_PARAMETER_MISSING 110Name: GENERIC_PARAMETER_MISSING
96Description: A required parameter in the request was missing. 111Description: 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.
97HttpStatus: 400 112HttpStatus: 400
98 113
99Value: 26 114Value: 0026
100Name: GENERIC_PARAMETER_MALFORMED 115Name: GENERIC_PARAMETER_MALFORMED
101Description: A parameter in the request was malformed. 116Description: 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.
117HttpStatus: 400
118
119Value: 0027
120Name: GENERIC_RESERVE_PUB_MALFORMED
121Description: The reserve public key was malformed.
102HttpStatus: 400 122HttpStatus: 400
123FIXME: Fold with 26?
103 124
125Value: 0028
126Name: GENERIC_COMPRESSION_INVALID
127Description: 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.
128HttpStatus: 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
108Value: 30 133Value: 0030
109Name: GENERIC_CURRENCY_MISMATCH 134Name: GENERIC_CURRENCY_MISMATCH
110Description: The currencies involved in the operation do not match. 135Description: 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.
111HttpStatus: 400 136HttpStatus: 400
112 137
113Value: 31 138Value: 0031
114Name: GENERIC_URI_TOO_LONG 139Name: GENERIC_URI_TOO_LONG
115Description: The URI is longer than the longest URI the HTTP server is willing to parse. 140Description: 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.
116HttpStatus: 414 141HttpStatus: 414
117 142
118Value: 32 143Value: 0032
119Name: GENERIC_UPLOAD_EXCEEDS_LIMIT 144Name: GENERIC_UPLOAD_EXCEEDS_LIMIT
120Description: The body is too large to be permissible for the endpoint. 145Description: 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.
121HttpStatus: 413 146HttpStatus: 413
122 147
123 148
124# 40-49: available for future use 149# 40-49: access control issues
150Value: 0040
151Name: GENERIC_UNAUTHORIZED
152Description: The service refused the request due to lack of proper authorization.
153HttpStatus: 401
154
155Value: 0041
156Name: GENERIC_TOKEN_UNKNOWN
157Description: The service refused the request as the given authorization token is unknown.
158HttpStatus: 401
159
160Value: 0042
161Name: GENERIC_TOKEN_EXPIRED
162Description: The service refused the request as the given authorization token expired.
163HttpStatus: 401
125 164
165Value: 0043
166Name: GENERIC_TOKEN_MALFORMED
167Description: The service refused the request as the given authorization token is malformed.
168HttpStatus: 401
126 169
170Value: 0044
171Name: GENERIC_FORBIDDEN
172Description: The service refused the request due to lack of proper rights on the resource.
173HttpStatus: 403
127 174
128# Server-side database problems (50-59) 175# Server-side database problems (50-59)
129 176
130Value: 50 177Value: 0050
131Name: GENERIC_DB_SETUP_FAILED 178Name: GENERIC_DB_SETUP_FAILED
132Description: The service failed initialize its connection to the database. 179Description: 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.
133HttpStatus: 500 180HttpStatus: 500
134 181
135Value: 51 182Value: 0051
136Name: GENERIC_DB_START_FAILED 183Name: GENERIC_DB_START_FAILED
137Description: The service encountered an error event to just start the database transaction. 184Description: The service encountered an error event to just start the database transaction. The system administrator should check that the database is running.
138HttpStatus: 500 185HttpStatus: 500
139 186
140Value: 52 187Value: 0052
141Name: GENERIC_DB_STORE_FAILED 188Name: GENERIC_DB_STORE_FAILED
142Description: The service failed to store information in its database. 189Description: The service failed to store information in its database. The system administrator should check that the database is running and review the service logs.
143HttpStatus: 500 190HttpStatus: 500
144 191
145Value: 53 192Value: 0053
146Name: GENERIC_DB_FETCH_FAILED 193Name: GENERIC_DB_FETCH_FAILED
147Description: The service failed to fetch information from its database. 194Description: The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs.
148HttpStatus: 500 195HttpStatus: 500
149 196
150Value: 54 197Value: 0054
151Name: GENERIC_DB_COMMIT_FAILED 198Name: GENERIC_DB_COMMIT_FAILED
152Description: The service encountered an error event to commit the database transaction (hard, unrecoverable error). 199Description: 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.
153HttpStatus: 500 200HttpStatus: 500
154 201
155Value: 55 202Value: 0055
156Name: GENERIC_DB_SOFT_FAILURE 203Name: GENERIC_DB_SOFT_FAILURE
157Description: 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.) 204Description: 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.
158HttpStatus: 500 205HttpStatus: 500
159 206
160Value: 56 207Value: 0056
161Name: GENERIC_DB_INVARIANT_FAILURE 208Name: GENERIC_DB_INVARIANT_FAILURE
162Description: The service's database is inconsistent and violates service-internal invariants. 209Description: 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.
163HttpStatus: 500 210HttpStatus: 500
164 211
165 212
166# Server-side computational problems (60-69) 213# Server-side computational problems (60-69)
167 214
168Value: 60 215Value: 0060
169Name: GENERIC_INTERNAL_INVARIANT_FAILURE 216Name: GENERIC_INTERNAL_INVARIANT_FAILURE
170Description: The HTTP server experienced an internal invariant failure (bug). 217Description: 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.
171HttpStatus: 500 218HttpStatus: 500
172 219
173Value: 61 220Value: 0061
174Name: GENERIC_FAILED_COMPUTE_JSON_HASH 221Name: GENERIC_FAILED_COMPUTE_JSON_HASH
175Description: The service could not compute a cryptographic hash over some JSON value. 222Description: 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.
223HttpStatus: 500
224
225Value: 0062
226Name: GENERIC_FAILED_COMPUTE_AMOUNT
227Description: The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers.
176HttpStatus: 500 228HttpStatus: 500
177 229
178 230
179# Server-side resource problems (70-79) 231# Server-side resource problems (70-79)
180 232
181Value: 70 233Value: 0070
182Name: GENERIC_PARSER_OUT_OF_MEMORY 234Name: GENERIC_PARSER_OUT_OF_MEMORY
183Description: The HTTP server had insufficient memory to parse the request. 235Description: 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.
184HttpStatus: 500 236HttpStatus: 500
185 237
186Value: 71 238Value: 0071
187Name: GENERIC_ALLOCATION_FAILURE 239Name: GENERIC_ALLOCATION_FAILURE
188Description: The HTTP server failed to allocate memory. 240Description: 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.
189HttpStatus: 500 241HttpStatus: 500
190 242
191Value: 72 243Value: 0072
192Name: GENERIC_JSON_ALLOCATION_FAILURE 244Name: GENERIC_JSON_ALLOCATION_FAILURE
193Description: The HTTP server failed to allocate memory for building JSON reply. 245Description: 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.
194HttpStatus: 500 246HttpStatus: 500
195 247
196Value: 73 248Value: 0073
197Name: GENERIC_CURL_ALLOCATION_FAILURE 249Name: GENERIC_CURL_ALLOCATION_FAILURE
198Description: The HTTP server failed to allocate memory for making a CURL request. 250Description: 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.
251HttpStatus: 500
252
253Value: 0074
254Name: GENERIC_FAILED_TO_LOAD_TEMPLATE
255Description: 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.
256HttpStatus: 500
257
258Value: 0075
259Name: GENERIC_FAILED_TO_EXPAND_TEMPLATE
260Description: 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.
199HttpStatus: 500 261HttpStatus: 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
245Value: 1007 309Value: 1007
246Name: EXCHANGE_GENERIC_KEYS_MISSING 310Name: EXCHANGE_GENERIC_KEYS_MISSING
247Description: 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. 311Description: 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.
248HttpStatus: 500 312HttpStatus: 503
249 313
250Value: 1008 314Value: 1008
251Name: EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE 315Name: EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE
@@ -262,6 +326,142 @@ Name: EXCHANGE_GENERIC_DENOMINATION_REVOKED
262Description: Denomination key of the coin has been revoked. 326Description: Denomination key of the coin has been revoked.
263HttpStatus: 410 327HttpStatus: 410
264 328
329Value: 1011
330Name: EXCHANGE_GENERIC_SECMOD_TIMEOUT
331Description: An operation where the exchange interacted with a security module timed out.
332HttpStatus: 500
333
334Value: 1012
335Name: EXCHANGE_GENERIC_INSUFFICIENT_FUNDS
336Description: 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".
337HttpStatus: 409
338
339Value: 1013
340Name: EXCHANGE_GENERIC_COIN_HISTORY_COMPUTATION_FAILED
341Description: The exchange had an internal error reconstructing the transaction history of the coin that was being processed.
342HttpStatus: 500
343
344Value: 1014
345Name: EXCHANGE_GENERIC_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS
346Description: The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors.
347HttpStatus: 500
348
349Value: 1015
350Name: EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH
351Description: The same coin was already used with a different age hash previously.
352HttpStatus: 409
353
354Value: 1016
355Name: EXCHANGE_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION
356Description: The requested operation is not valid for the cipher used by the selected denomination.
357HttpStatus: 400
358
359Value: 1017
360Name: EXCHANGE_GENERIC_CIPHER_MISMATCH
361Description: The provided arguments for the operation use inconsistent ciphers.
362HttpStatus: 400
363
364Value: 1018
365Name: EXCHANGE_GENERIC_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE
366Description: The number of denominations specified in the request exceeds the limit of the exchange.
367HttpStatus: 400
368
369Value: 1019
370Name: EXCHANGE_GENERIC_COIN_UNKNOWN
371Description: The coin is not known to the exchange (yet).
372HttpStatus: 404
373
374Value: 1020
375Name: EXCHANGE_GENERIC_CLOCK_SKEW
376Description: The time at the server is too far off from the time specified in the request. Most likely the client system time is wrong.
377HttpStatus: 400
378
379Value: 1021
380Name: EXCHANGE_GENERIC_AMOUNT_EXCEEDS_DENOMINATION_VALUE
381Description: The specified amount for the coin is higher than the value of the denomination of the coin.
382HttpStatus: 400
383
384Value: 1022
385Name: EXCHANGE_GENERIC_GLOBAL_FEES_MISSING
386Description: The exchange was not properly configured with global fees.
387HttpStatus: 500
388
389Value: 1023
390Name: EXCHANGE_GENERIC_WIRE_FEES_MISSING
391Description: The exchange was not properly configured with wire fees.
392HttpStatus: 500
393
394Value: 1024
395Name: EXCHANGE_GENERIC_PURSE_PUB_MALFORMED
396Description: The purse public key was malformed.
397HttpStatus: 400
398
399Value: 1025
400Name: EXCHANGE_GENERIC_PURSE_UNKNOWN
401Description: The purse is unknown.
402HttpStatus: 404
403
404Value: 1026
405Name: EXCHANGE_GENERIC_PURSE_EXPIRED
406Description: The purse has expired.
407HttpStatus: 410
408
409Value: 1027
410Name: EXCHANGE_GENERIC_RESERVE_UNKNOWN
411Description: The exchange has no information about the "reserve_pub" that was given.
412HttpStatus: 404
413
414Value: 1028
415Name: EXCHANGE_GENERIC_KYC_REQUIRED
416Description: The exchange is not allowed to proceed with the operation until the client has satisfied a KYC check.
417HttpStatus: 451
418
419Value: 1029
420Name: EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT
421Description: Inconsistency between provided age commitment and attest: either none or both must be provided
422HttpStatus: 400
423
424Value: 1030
425Name: EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE
426Description: The provided attestation for the minimum age couldn't be verified by the exchange.
427HttpStatus: 400
428
429Value: 1031
430Name: EXCHANGE_GENERIC_PURSE_DELETED
431Description: The purse was deleted.
432HttpStatus: 410
433
434Value: 1032
435Name: EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED
436Description: The public key of the AML officer in the URL was malformed.
437HttpStatus: 400
438
439Value: 1033
440Name: EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID
441Description: The signature affirming the GET request of the AML officer is invalid.
442HttpStatus: 403
443
444Value: 1034
445Name: EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED
446Description: The specified AML officer does not have access at this time.
447HttpStatus: 403
448
449Value: 1035
450Name: EXCHANGE_GENERIC_AML_PENDING
451Description: 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.
452HttpStatus: 451
453
454Value: 1036
455Name: EXCHANGE_GENERIC_AML_FROZEN
456Description: The requested operation is denied as the account was frozen on suspicion of money laundering. Please contact the exchange operator.
457HttpStatus: 451
458
459Value: 1037
460Name: EXCHANGE_GENERIC_KYC_CONVERTER_FAILED
461Description: The exchange failed to start a KYC attribute conversion helper process. It is likely configured incorrectly.
462HttpStatus: 500
463
464
265Value: 1100 465Value: 1100
266Name: EXCHANGE_DEPOSITS_GET_NOT_FOUND 466Name: EXCHANGE_DEPOSITS_GET_NOT_FOUND
267Description: The exchange did not find information about the specified transaction in the database. 467Description: The exchange did not find information about the specified transaction in the database.
@@ -297,15 +497,20 @@ Name: EXCHANGE_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID
297Description: The signature of the merchant is invalid. 497Description: The signature of the merchant is invalid.
298HttpStatus: 403 498HttpStatus: 403
299 499
500Value: 1107
501Name: EXCHANGE_DEPOSITS_POLICY_NOT_ACCEPTED
502Description: The provided policy data was not accepted
503HttpStatus: 400
504
300Value: 1150 505Value: 1150
301Name: EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS 506Name: EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS
302Description: 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. 507Description: 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.
303HttpStatus: 409 508HttpStatus: 409
304 509
305Value: 1151 510Value: 1151
306Name: EXCHANGE_WITHDRAW_RESERVE_UNKNOWN 511Name: EXCHANGE_AGE_WITHDRAW_INSUFFICIENT_FUNDS
307Description: The exchange has no information about the "reserve_pub" that was given. 512Description: 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.
308HttpStatus: 404 513HttpStatus: 409
309 514
310Value: 1152 515Value: 1152
311Name: EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW 516Name: EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW
@@ -323,10 +528,15 @@ Description: The signature of the reserve is not valid.
323HttpStatus: 403 528HttpStatus: 403
324 529
325Value: 1155 530Value: 1155
326Name: EXCHANGE_WITHDRAW_HISTORY_ERROR_INSUFFICIENT_FUNDS 531Name: EXCHANGE_RESERVE_HISTORY_ERROR_INSUFFICIENT_FUNDS
327Description: When computing the reserve history, we ended up with a negative overall balance, which should be impossible. 532Description: When computing the reserve history, we ended up with a negative overall balance, which should be impossible.
328HttpStatus: 500 533HttpStatus: 500
329 534
535Value: 1156
536Name: EXCHANGE_GET_RESERVE_HISTORY_ERROR_INSUFFICIENT_BALANCE
537Description: The reserve did not have sufficient funds in it to pay for a full reserve history statement.
538HttpStatus: 409
539
330Value: 1158 540Value: 1158
331Name: EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST 541Name: EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST
332Description: Withdraw period of the coin to be withdrawn is in the past. 542Description: Withdraw period of the coin to be withdrawn is in the past.
@@ -337,9 +547,39 @@ Name: EXCHANGE_WITHDRAW_UNBLIND_FAILURE
337Description: The client failed to unblind the blind signature. 547Description: The client failed to unblind the blind signature.
338HttpStatus: 0 548HttpStatus: 0
339 549
340Value: 1200 550Value: 1160
341Name: EXCHANGE_DEPOSIT_INSUFFICIENT_FUNDS 551Name: EXCHANGE_WITHDRAW_NONCE_REUSE
342Description: 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. 552Description: The client re-used a withdraw nonce, which is not allowed.
553HttpStatus: 409
554
555Value: 1161
556Name: EXCHANGE_AGE_WITHDRAW_COMMITMENT_UNKNOWN
557Description: The client provided an unknown commitment for an age-withdraw request.
558HttpStatus: 400
559
560Value: 1162
561Name: EXCHANGE_AGE_WITHDRAW_AMOUNT_OVERFLOW
562Description: The total sum of amounts from the denominations did overflow.
563HttpStatus: 500
564
565Value: 1163
566Name: EXCHANGE_AGE_WITHDRAW_AMOUNT_INCORRECT
567Description: The total sum of value and fees from the denominations differs from the committed amount with fees.
568HttpStatus: 400
569
570Value: 1164
571Name: EXCHANGE_AGE_WITHDRAW_REVEAL_INVALID_HASH
572Description: The original commitment differs from the calculated hash
573HttpStatus: 400
574
575Value: 1165
576Name: EXCHANGE_AGE_WITHDRAW_MAXIMUM_AGE_TOO_LARGE
577Description: The maximum age in the commitment is too large for the reserve
578HttpStatus: 409
579
580Value: 1175
581Name: EXCHANGE_WITHDRAW_BATCH_IDEMPOTENT_PLANCHET
582Description: The batch withdraw included a planchet that was already withdrawn. This is not allowed.
343HttpStatus: 409 583HttpStatus: 409
344 584
345Value: 1205 585Value: 1205
@@ -347,6 +587,11 @@ Name: EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID
347Description: The signature made by the coin over the deposit permission is not valid. 587Description: The signature made by the coin over the deposit permission is not valid.
348HttpStatus: 403 588HttpStatus: 403
349 589
590Value: 1206
591Name: EXCHANGE_DEPOSIT_CONFLICTING_CONTRACT
592Description: The same coin was already deposited for the same merchant and contract with other details.
593HttpStatus: 409
594
350Value: 1207 595Value: 1207
351Name: EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE 596Name: EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE
352Description: The stated value of the coin after the deposit fee is subtracted would be negative. 597Description: 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
357Description: The stated refund deadline is after the wire deadline. 602Description: The stated refund deadline is after the wire deadline.
358HttpStatus: 400 603HttpStatus: 400
359 604
605Value: 1209
606Name: EXCHANGE_DEPOSIT_WIRE_DEADLINE_IS_NEVER
607Description: The stated wire deadline is "never", which makes no sense.
608HttpStatus: 400
609
360Value: 1210 610Value: 1210
361Name: EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON 611Name: EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON
362Description: 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. 612Description: 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
378HttpStatus: 400 628HttpStatus: 400
379 629
380 630
381Value: 1250 631Value: 1240
382Name: EXCHANGE_RESERVES_GET_STATUS_UNKNOWN 632Name: EXCHANGE_EXTENSIONS_INVALID_FULFILLMENT
383Description: The reserve status was requested using a unknown key. 633Description: The proof of policy fulfillment was invalid.
384HttpStatus: 404 634HttpStatus: 400
385 635
386Value: 1300
387Name: EXCHANGE_MELT_INSUFFICIENT_FUNDS
388Description: 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".
389HttpStatus: 409
390 636
391Value: 1301 637Value: 1251
392Name: EXCHANGE_MELT_COIN_HISTORY_COMPUTATION_FAILED 638Name: EXCHANGE_COIN_HISTORY_BAD_SIGNATURE
393Description: The exchange had an internal error reconstructing the transaction history of the coin that was being melted. 639Description: The coin history was requested with a bad signature.
394HttpStatus: 500 640HttpStatus: 403
641
642Value: 1252
643Name: EXCHANGE_RESERVE_HISTORY_BAD_SIGNATURE
644Description: The reserve history was requested with a bad signature.
645HttpStatus: 403
646
395 647
396Value: 1302 648Value: 1302
397Name: EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION 649Name: EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION
@@ -403,11 +655,6 @@ Name: EXCHANGE_MELT_COIN_SIGNATURE_INVALID
403Description: The signature made with the coin to be melted is invalid. 655Description: The signature made with the coin to be melted is invalid.
404HttpStatus: 403 656HttpStatus: 403
405 657
406Value: 1304
407Name: EXCHANGE_MELT_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS
408Description: The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors.
409HttpStatus: 500
410
411Value: 1305 658Value: 1305
412Name: EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE 659Name: EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE
413Description: 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). 660Description: 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
439Description: The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1. 686Description: The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1.
440HttpStatus: 400 687HttpStatus: 400
441 688
442Value: 1357
443Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE
444Description: 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.
445HttpStatus: 400
446
447Value: 1358 689Value: 1358
448Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH 690Name: EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH
449Description: The number of envelopes given does not match the number of denomination keys given. 691Description: The number of envelopes given does not match the number of denomination keys given.
@@ -474,6 +716,17 @@ Name: EXCHANGE_REFRESHES_REVEAL_OPERATION_INVALID
474Description: Operation specified invalid for this endpoint. 716Description: Operation specified invalid for this endpoint.
475HttpStatus: 400 717HttpStatus: 400
476 718
719Value: 1364
720Name: EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_NOT_SUPPORTED
721Description: The client provided age commitment data, but age restriction is not supported on this server.
722HttpStatus: 400
723
724Value: 1365
725Name: EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_COMMITMENT_INVALID
726Description: The client provided invalid age commitment data: missing, not an array, or array of invalid size.
727HttpStatus: 400
728
729
477Value: 1400 730Value: 1400
478Name: EXCHANGE_LINK_COIN_UNKNOWN 731Name: EXCHANGE_LINK_COIN_UNKNOWN
479Description: The coin specified in the link request is unknown to the exchange. 732Description: The coin specified in the link request is unknown to the exchange.
@@ -499,6 +752,16 @@ Name: EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT
499Description: The exchange found a wire fee that was above the total transfer value (and thus could not have been charged). 752Description: The exchange found a wire fee that was above the total transfer value (and thus could not have been charged).
500HttpStatus: 500 753HttpStatus: 500
501 754
755Value: 1475
756Name: EXCHANGE_PURSES_INVALID_WAIT_TARGET
757Description: The wait target of the URL was not in the set of expected values.
758HttpStatus: 400
759
760Value: 1476
761Name: EXCHANGE_PURSES_GET_INVALID_SIGNATURE_BY_EXCHANGE
762Description: The signature on the purse status returned by the exchange was invalid.
763HttpStatus: 0
764
502 765
503Value: 1500 766Value: 1500
504Name: EXCHANGE_REFUND_COIN_NOT_FOUND 767Name: EXCHANGE_REFUND_COIN_NOT_FOUND
@@ -569,6 +832,7 @@ Value: 1552
569Name: EXCHANGE_RECOUP_COIN_BALANCE_ZERO 832Name: EXCHANGE_RECOUP_COIN_BALANCE_ZERO
570Description: The coin's remaining balance is zero. The request is denied. 833Description: The coin's remaining balance is zero. The request is denied.
571HttpStatus: 403 834HttpStatus: 403
835Note: dead in latest cde
572 836
573Value: 1553 837Value: 1553
574Name: EXCHANGE_RECOUP_BLINDING_FAILED 838Name: EXCHANGE_RECOUP_BLINDING_FAILED
@@ -579,12 +843,33 @@ Value: 1554
579Name: EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE 843Name: EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE
580Description: The coin's remaining balance is zero. The request is denied. 844Description: The coin's remaining balance is zero. The request is denied.
581HttpStatus: 500 845HttpStatus: 500
846Note: dead in latest cde
582 847
583Value: 1555 848Value: 1555
584Name: EXCHANGE_RECOUP_NOT_ELIGIBLE 849Name: EXCHANGE_RECOUP_NOT_ELIGIBLE
585Description: The coin's denomination has not been revoked yet. 850Description: The coin's denomination has not been revoked yet.
586HttpStatus: 404 851HttpStatus: 404
587 852
853Value: 1575
854Name: EXCHANGE_RECOUP_REFRESH_SIGNATURE_INVALID
855Description: The given coin signature is invalid for the request.
856HttpStatus: 403
857
858Value: 1576
859Name: EXCHANGE_RECOUP_REFRESH_MELT_NOT_FOUND
860Description: The exchange could not find the corresponding melt operation. The request is denied.
861HttpStatus: 404
862
863Value: 1578
864Name: EXCHANGE_RECOUP_REFRESH_BLINDING_FAILED
865Description: The exchange failed to reproduce the coin's blinding.
866HttpStatus: 500
867
868Value: 1580
869Name: EXCHANGE_RECOUP_REFRESH_NOT_ELIGIBLE
870Description: The coin's denomination has not been revoked yet.
871HttpStatus: 404
872
588 873
589Value: 1600 874Value: 1600
590Name: EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN 875Name: EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN
@@ -612,10 +897,45 @@ Description: No wire fees are configured for an enabled wire method of the excha
612HttpStatus: 500 897HttpStatus: 500
613 898
614 899
900Value: 1675
901Name: EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA
902Description: This purse was previously created with different meta data.
903HttpStatus: 409
904
905Value: 1676
906Name: EXCHANGE_RESERVES_PURSE_MERGE_CONFLICTING_META_DATA
907Description: This purse was previously merged with different meta data.
908HttpStatus: 409
909
910Value: 1677
911Name: EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS
912Description: The reserve has insufficient funds to create another purse.
913HttpStatus: 409
914
915Value: 1678
916Name: EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW
917Description: The purse fee specified for the request is lower than the purse fee charged by the exchange at this time.
918HttpStatus: 400
919
920Value: 1679
921Name: EXCHANGE_PURSE_DELETE_ALREADY_DECIDED
922Description: The payment request cannot be deleted anymore, as it either already completed or timed out.
923HttpStatus: 409
924
925Value: 1680
926Name: EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID
927Description: The signature affirming the purse deletion is invalid.
928HttpStatus: 403
929
930Value: 1681
931Name: EXCHANGE_RESERVES_AGE_RESTRICTION_REQUIRED
932Description: Withdrawal from the reserve requires age restriction to be set.
933HttpStatus: 403
934
615Value: 1700 935Value: 1700
616Name: EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE 936Name: EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE
617Description: The exchange failed to talk to the process responsible for its private denomination keys. 937Description: The exchange failed to talk to the process responsible for its private denomination keys or the helpers had no denominations (properly) configured.
618HttpStatus: 500 938HttpStatus: 502
619 939
620Value: 1701 940Value: 1701
621Name: EXCHANGE_DENOMINATION_HELPER_BUG 941Name: EXCHANGE_DENOMINATION_HELPER_BUG
@@ -627,10 +947,16 @@ Name: EXCHANGE_DENOMINATION_HELPER_TOO_EARLY
627Description: The helper refuses to sign with the key, because it is too early: the validity period has not yet started. 947Description: The helper refuses to sign with the key, because it is too early: the validity period has not yet started.
628HttpStatus: 400 948HttpStatus: 400
629 949
950Value: 1725
951Name: EXCHANGE_PURSE_DEPOSIT_EXCHANGE_SIGNATURE_INVALID
952Description: The signature of the exchange on the reply was invalid.
953HttpStatus: 0
954
955
630Value: 1750 956Value: 1750
631Name: EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE 957Name: EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE
632Description: The exchange failed to talk to the process responsible for its private signing keys. 958Description: The exchange failed to talk to the process responsible for its private signing keys.
633HttpStatus: 500 959HttpStatus: 502
634 960
635Value: 1751 961Value: 1751
636Name: EXCHANGE_SIGNKEY_HELPER_BUG 962Name: EXCHANGE_SIGNKEY_HELPER_BUG
@@ -643,6 +969,51 @@ Description: The helper refuses to sign with the key, because it is too early: t
643HttpStatus: 400 969HttpStatus: 400
644 970
645 971
972Value: 1775
973Name: EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW
974Description: The purse expiration time is in the past at the time of its creation.
975HttpStatus: 400
976
977Value: 1776
978Name: EXCHANGE_RESERVES_PURSE_EXPIRATION_IS_NEVER
979Description: The purse expiration time is set to never, which is not allowed.
980HttpStatus: 400
981
982Value: 1777
983Name: EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID
984Description: The signature affirming the merge of the purse is invalid.
985HttpStatus: 403
986
987Value: 1778
988Name: EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID
989Description: The signature by the reserve affirming the merge is invalid.
990HttpStatus: 403
991
992Value: 1785
993Name: EXCHANGE_RESERVES_OPEN_BAD_SIGNATURE
994Description: The signature by the reserve affirming the open operation is invalid.
995HttpStatus: 403
996
997Value: 1786
998Name: EXCHANGE_RESERVES_CLOSE_BAD_SIGNATURE
999Description: The signature by the reserve affirming the close operation is invalid.
1000HttpStatus: 403
1001
1002Value: 1787
1003Name: EXCHANGE_RESERVES_ATTEST_BAD_SIGNATURE
1004Description: The signature by the reserve affirming the attestion request is invalid.
1005HttpStatus: 403
1006
1007Value: 1788
1008Name: EXCHANGE_RESERVES_CLOSE_NO_TARGET_ACCOUNT
1009Description: 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.
1010HttpStatus: 409
1011
1012Value: 1789
1013Name: EXCHANGE_RESERVES_OPEN_INSUFFICIENT_FUNDS
1014Description: The reserve balance is insufficient to pay for the open operation.
1015HttpStatus: 409
1016
646Value: 1800 1017Value: 1800
647Name: EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND 1018Name: EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND
648Description: The auditor that was supposed to be disabled is unknown to this exchange. 1019Description: 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
723Description: The signature affirming the signing key is invalid. 1094Description: The signature affirming the signing key is invalid.
724HttpStatus: 403 1095HttpStatus: 403
725 1096
1097Value: 1816
1098Name: EXCHANGE_MANAGEMENT_GLOBAL_FEE_MISMATCH
1099Description: The signature conflicts with a previous signature affirming different fees.
1100HttpStatus: 409
1101
1102Value: 1817
1103Name: EXCHANGE_MANAGEMENT_GLOBAL_FEE_SIGNATURE_INVALID
1104Description: The signature affirming the fee structure is invalid.
1105HttpStatus: 403
1106
1107Value: 1818
1108Name: EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID
1109Description: The signature affirming the profit drain is invalid.
1110HttpStatus: 403
1111
1112Value: 1825
1113Name: EXCHANGE_AML_DECISION_ADD_SIGNATURE_INVALID
1114Description: The signature affirming the AML decision is invalid.
1115HttpStatus: 403
1116
1117Value: 1826
1118Name: EXCHANGE_AML_DECISION_INVALID_OFFICER
1119Description: The AML officer specified is not allowed to make AML decisions right now.
1120HttpStatus: 403
1121
1122Value: 1827
1123Name: EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT
1124Description: There is a more recent AML decision on file. The decision was rejected as timestamps of AML decisions must be monotonically increasing.
1125HttpStatus: 409
1126
1127Value: 1828
1128Name: EXCHANGE_AML_DECISION_UNKNOWN_CHECK
1129Description: There AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange.
1130HttpStatus: 400
1131
1132Value: 1830
1133Name: EXCHANGE_MANAGEMENT_UPDATE_AML_OFFICER_SIGNATURE_INVALID
1134Description: The signature affirming the change in the AML officer status is invalid.
1135HttpStatus: 403
1136
1137Value: 1831
1138Name: EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT
1139Description: A more recent decision about the AML officer status is known to the exchange.
1140HttpStatus: 409
1141
1142
1143
1144
1145Value: 1850
1146Name: EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA
1147Description: The purse was previously created with different meta data.
1148HttpStatus: 409
1149
1150Value: 1851
1151Name: EXCHANGE_PURSE_CREATE_CONFLICTING_CONTRACT_STORED
1152Description: The purse was previously created with a different contract.
1153HttpStatus: 409
1154
1155Value: 1852
1156Name: EXCHANGE_PURSE_CREATE_COIN_SIGNATURE_INVALID
1157Description: A coin signature for a deposit into the purse is invalid.
1158HttpStatus: 403
1159
1160Value: 1853
1161Name: EXCHANGE_PURSE_CREATE_EXPIRATION_BEFORE_NOW
1162Description: The purse expiration time is in the past.
1163HttpStatus: 400
1164
1165Value: 1854
1166Name: EXCHANGE_PURSE_CREATE_EXPIRATION_IS_NEVER
1167Description: The purse expiration time is "never".
1168HttpStatus: 400
1169
1170Value: 1855
1171Name: EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID
1172Description: The purse signature over the purse meta data is invalid.
1173HttpStatus: 403
1174
1175Value: 1856
1176Name: EXCHANGE_PURSE_ECONTRACT_SIGNATURE_INVALID
1177Description: The signature over the encrypted contract is invalid.
1178HttpStatus: 403
1179
1180Value: 1857
1181Name: EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID
1182Description: The signature from the exchange over the confirmation is invalid.
1183HttpStatus: 0
1184
1185Value: 1858
1186Name: EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA
1187Description: The coin was previously deposited with different meta data.
1188HttpStatus: 409
1189
1190Value: 1859
1191Name: EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA
1192Description: The encrypted contract was previously uploaded with different meta data.
1193HttpStatus: 409
1194
1195Value: 1860
1196Name: EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE
1197Description: The deposited amount is less than the purse fee.
1198HttpStatus: 400
1199
1200Value: 1876
1201Name: EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE
1202Description: The signature using the merge key is invalid.
1203HttpStatus: 403
1204
1205Value: 1877
1206Name: EXCHANGE_PURSE_MERGE_INVALID_RESERVE_SIGNATURE
1207Description: The signature using the reserve key is invalid.
1208HttpStatus: 403
1209
1210Value: 1878
1211Name: EXCHANGE_PURSE_NOT_FULL
1212Description: The targeted purse is not yet full and thus cannot be merged. Retrying the request later may succeed.
1213HttpStatus: 409
1214
1215Value: 1879
1216Name: EXCHANGE_PURSE_MERGE_EXCHANGE_SIGNATURE_INVALID
1217Description: The signature from the exchange over the confirmation is invalid.
1218HttpStatus: 0
1219
1220Value: 1880
1221Name: EXCHANGE_MERGE_PURSE_PARTNER_UNKNOWN
1222Description: The exchange of the target account is not a partner of this exchange.
1223HttpStatus: 404
1224
1225Value: 1890
1226Name: EXCHANGE_MANAGEMENT_ADD_PARTNER_SIGNATURE_INVALID
1227Description: The signature affirming the new partner is invalid.
1228HttpStatus: 403
1229
1230Value: 1891
1231Name: EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT
1232Description: Conflicting data for the partner already exists with the exchange.
1233HttpStatus: 409
1234
726 1235
727Value: 1900 1236Value: 1900
728Name: EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID 1237Name: EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID
@@ -759,6 +1268,100 @@ Name: EXCHANGE_KYC_PROOF_BACKEND_AUTHORIZATION_FAILED
759Description: The backend signaled an authorization failure. 1268Description: The backend signaled an authorization failure.
760HttpStatus: 403 1269HttpStatus: 403
761 1270
1271Value: 1929
1272Name: EXCHANGE_KYC_PROOF_REQUEST_UNKNOWN
1273Description: The exchange is unaware of having made an the authorization request.
1274HttpStatus: 404
1275
1276Value: 1930
1277Name: EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED
1278Description: The payto-URI hash did not match. Hence the request was denied.
1279HttpStatus: 403
1280
1281Value: 1931
1282Name: EXCHANGE_KYC_GENERIC_LOGIC_UNKNOWN
1283Description: The request used a logic specifier that is not known to the exchange.
1284HttpStatus: 404
1285
1286Value: 1932
1287Name: EXCHANGE_KYC_GENERIC_LOGIC_GONE
1288Description: The request requires a logic which is no longer configured at the exchange.
1289HttpStatus: 500
1290
1291Value: 1933
1292Name: EXCHANGE_KYC_GENERIC_LOGIC_BUG
1293Description: The logic plugin had a bug in its interaction with the KYC provider.
1294HttpStatus: 500
1295
1296Value: 1934
1297Name: EXCHANGE_KYC_GENERIC_PROVIDER_ACCESS_REFUSED
1298Description: 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.
1299HttpStatus: 511
1300
1301Value: 1935
1302Name: EXCHANGE_KYC_GENERIC_PROVIDER_TIMEOUT
1303Description: 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.
1304HttpStatus: 504
1305
1306Value: 1936
1307Name: EXCHANGE_KYC_GENERIC_PROVIDER_UNEXPECTED_REPLY
1308Description: The KYC provider responded with a status that was completely unexpected by the KYC logic of the exchange.
1309HttpStatus: 502
1310
1311Value: 1937
1312Name: EXCHANGE_KYC_GENERIC_PROVIDER_RATE_LIMIT_EXCEEDED
1313Description: The rate limit of the exchange at the KYC provider has been exceeded. Trying much later might work.
1314HttpStatus: 503
1315
1316Value: 1938
1317Name: EXCHANGE_KYC_WEBHOOK_UNAUTHORIZED
1318Description: The request to the webhook lacked proper authorization or authentication data.
1319HttpStatus: 401
1320
1321
1322
1323Value: 1950
1324Name: EXCHANGE_CONTRACTS_UNKNOWN
1325Description: The exchange does not know a contract under the given contract public key.
1326HttpStatus: 404
1327
1328Value: 1951
1329Name: EXCHANGE_CONTRACTS_INVALID_CONTRACT_PUB
1330Description: The URL does not encode a valid exchange public key in its path.
1331HttpStatus: 400
1332
1333Value: 1952
1334Name: EXCHANGE_CONTRACTS_DECRYPTION_FAILED
1335Description: The returned encrypted contract did not decrypt.
1336HttpStatus: 0
1337
1338Value: 1953
1339Name: EXCHANGE_CONTRACTS_SIGNATURE_INVALID
1340Description: The signature on the encrypted contract did not validate.
1341HttpStatus: 0
1342
1343Value: 1954
1344Name: EXCHANGE_CONTRACTS_DECODING_FAILED
1345Description: The decrypted contract was malformed.
1346HttpStatus: 0
1347
1348Value: 1975
1349Name: EXCHANGE_PURSE_DEPOSIT_COIN_SIGNATURE_INVALID
1350Description: A coin signature for a deposit into the purse is invalid.
1351HttpStatus: 403
1352
1353Value: 1976
1354Name: EXCHANGE_PURSE_DEPOSIT_DECIDED_ALREADY
1355Description: It is too late to deposit coins into the purse.
1356HttpStatus: 410
1357
1358
1359
1360Value: 1980
1361Name: EXCHANGE_TOTP_KEY_INVALID
1362Description: TOTP key is not valid.
1363HttpStatus: 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
776HttpStatus: 0 1379HttpStatus: 0
777 1380
778Value: 2002 1381Value: 2002
779Name: MERCHANT_GENERIC_RESERVE_PUB_MALFORMED 1382Name: MERCHANT_GENERIC_EXCHANGE_WIRE_REQUEST_FAILED
780Description: The reserve key of given to a /reserves/ handler was malformed. 1383Description: The merchant was unable to obtain a valid answer to /wire from the exchange.
781HttpStatus: 400 1384HttpStatus: 502
782
783Value: 2003
784Name: MERCHANT_GENERIC_FAILED_TO_LOAD_TEMPLATE
785Description: The backend could not locate a required template to generate an HTML reply.
786HttpStatus: 406
787
788Value: 2004
789Name: MERCHANT_GENERIC_FAILED_TO_EXPAND_TEMPLATE
790Description: The backend could not expand the template to generate an HTML reply.
791HttpStatus: 500
792 1385
793Value: 2005 1386Value: 2005
794Name: MERCHANT_GENERIC_ORDER_UNKNOWN 1387Name: MERCHANT_GENERIC_ORDER_UNKNOWN
@@ -801,8 +1394,8 @@ Description: The order provided to the backend could not be completed, because a
801HttpStatus: 404 1394HttpStatus: 404
802 1395
803Value: 2007 1396Value: 2007
804Name: MERCHANT_GENERIC_TIP_ID_UNKNOWN 1397Name: MERCHANT_GENERIC_REWARD_ID_UNKNOWN
805Description: The tip ID is unknown. This could happen if the tip has expired. 1398Description: The reward ID is unknown. This could happen if the reward has expired.
806HttpStatus: 404 1399HttpStatus: 404
807 1400
808Value: 2008 1401Value: 2008
@@ -855,6 +1448,40 @@ Name: MERCHANT_GENERIC_TRANSFER_UNKNOWN
855Description: The backend could not find the inbound wire transfer specified in the request. 1448Description: The backend could not find the inbound wire transfer specified in the request.
856HttpStatus: 404 1449HttpStatus: 404
857 1450
1451Value: 2018
1452Name: MERCHANT_GENERIC_TEMPLATE_UNKNOWN
1453Description: The backend could not find the template(id) because it is not exist.
1454HttpStatus: 404
1455
1456Value: 2019
1457Name: MERCHANT_GENERIC_WEBHOOK_UNKNOWN
1458Description: The backend could not find the webhook(id) because it is not exist.
1459HttpStatus: 404
1460
1461Value: 2020
1462Name: MERCHANT_GENERIC_PENDING_WEBHOOK_UNKNOWN
1463Description: The backend could not find the webhook(serial) because it is not exist.
1464HttpStatus: 404
1465
1466Value: 2021
1467Name: MERCHANT_GENERIC_OTP_DEVICE_UNKNOWN
1468Description: The backend could not find the OTP device(id) because it is not exist.
1469HttpStatus: 404
1470
1471Value: 2022
1472Name: MERCHANT_GENERIC_ACCOUNT_UNKNOWN
1473Description: The account is not known to the backend.
1474HttpStatus: 404
1475
1476Value: 2023
1477Name: MERCHANT_GENERIC_H_WIRE_MALFORMED
1478Description: The wire hash was malformed.
1479HttpStatus: 400
1480
1481Value: 2024
1482Name: MERCHANT_GENERIC_CURRENCY_MISMATCH
1483Description: The currency specified in the operation does not work with the current state of the given resource.
1484HttpStatus: 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
864Description: The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response. 1491Description: The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response.
865HttpStatus: 200 1492HttpStatus: 200
866 1493
867
868Value: 2103 1494Value: 2103
869Name: MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE 1495Name: MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE
870Description: The merchant backend failed to construct the request for tracking to the exchange, thus tracking details are not in the response. 1496Description: 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
915Value: 2155 1541Value: 2155
916Name: MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES 1542Name: MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES
917Description: 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. 1543Description: 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.
918HttpStatus: 406 1544HttpStatus: 400
919 1545
920Value: 2156 1546Value: 2156
921Name: MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT 1547Name: MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT
922Description: Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. 1548Description: Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract.
923HttpStatus: 406 1549HttpStatus: 400
924 1550
925Value: 2157 1551Value: 2157
926Name: MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID 1552Name: MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID
@@ -937,6 +1563,11 @@ Name: MERCHANT_POST_ORDERS_ID_PAY_REFUND_DEADLINE_PAST_WIRE_TRANSFER_DEADLINE
937Description: The refund deadline in the contract is after the transfer deadline. 1563Description: The refund deadline in the contract is after the transfer deadline.
938HttpStatus: 500 1564HttpStatus: 500
939 1565
1566Value: 2160
1567Name: MERCHANT_POST_ORDERS_ID_PAY_ALREADY_PAID
1568Description: The order was already paid (maybe by another wallet).
1569HttpStatus: 409
1570
940Value: 2161 1571Value: 2161
941Name: MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED 1572Name: MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED
942Description: The payment is too late, the offer has expired. 1573Description: The payment is too late, the offer has expired.
@@ -982,7 +1613,33 @@ Name: MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_FAILED
982Description: The payment failed at the exchange. 1613Description: The payment failed at the exchange.
983HttpStatus: 502 1614HttpStatus: 502
984 1615
985# 2200-2249: post orders ID paid endpoint 1616Value: 2171
1617Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_MISSING
1618Description: 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.
1619HttpStatus: 400
1620
1621Value: 2172
1622Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_SIZE_MISMATCH
1623Description: 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.
1624HttpStatus: 400
1625
1626Value: 2173
1627Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_VERIFICATION_FAILED
1628Description: 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.
1629HttpStatus: 400
1630
1631Value: 2174
1632Name: MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_HASH_MISSING
1633Description: 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.
1634HttpStatus: 400
1635
1636Value: 2175
1637Name: MERCHANT_POST_ORDERS_ID_PAY_WIRE_METHOD_UNSUPPORTED
1638Description: 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.
1639HttpStatus: 409
1640
1641
1642# 2200-2224: post orders ID paid endpoint
986 1643
987Value: 2200 1644Value: 2200
988Name: MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH 1645Name: MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH
@@ -994,9 +1651,21 @@ Name: MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID
994Description: The signature of the merchant is not valid for the given contract hash. 1651Description: The signature of the merchant is not valid for the given contract hash.
995HttpStatus: 403 1652HttpStatus: 403
996 1653
997# 2250-2299: post orders ID abort endpoint 1654# 2225-2249: token families endpoints
1655
1656Value: 2225
1657Name: MERCHANT_POST_TOKEN_FAMILY_CONFLICT
1658Description: A token family with this ID but conflicting data exists.
1659HttpStatus: 409
1660
1661Value: 2226
1662Name: MERCHANT_PATCH_TOKEN_FAMILY_NOT_FOUND
1663Description: The backend is unaware of a token family with the given ID.
1664HttpStatus: 404
998 1665
999 1666
1667# 2250-2256: post orders ID abort endpoint
1668
1000Value: 2251 1669Value: 2251
1001Name: MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED 1670Name: MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED
1002Description: The merchant failed to send the exchange the refund request. 1671Description: The merchant failed to send the exchange the refund request.
@@ -1027,6 +1696,44 @@ Name: MERCHANT_POST_ORDERS_ID_ABORT_COINS_ARRAY_EMPTY
1027Description: The array of coins cannot be empty. 1696Description: The array of coins cannot be empty.
1028HttpStatus: 400 1697HttpStatus: 400
1029 1698
1699Value: 2258
1700Name: MERCHANT_EXCHANGE_TRANSFERS_AWAITING_KEYS
1701Description: We are waiting for the exchange to provide us with key material before checking the wire transfer.
1702HttpStatus: 202
1703
1704Value: 2259
1705Name: MERCHANT_EXCHANGE_TRANSFERS_AWAITING_LIST
1706Description: We are waiting for the exchange to provide us with the list of aggregated transactions.
1707HttpStatus: 202
1708
1709
1710Value: 2260
1711Name: MERCHANT_EXCHANGE_TRANSFERS_FATAL_NO_EXCHANGE
1712Description: The endpoint indicated in the wire transfer does not belong to a GNU Taler exchange.
1713HttpStatus: 200
1714
1715Value: 2261
1716Name: MERCHANT_EXCHANGE_TRANSFERS_FATAL_NOT_FOUND
1717Description: The exchange indicated in the wire transfer claims to know nothing about the wire transfer.
1718HttpStatus: 0
1719
1720Value: 2262
1721Name: MERCHANT_EXCHANGE_TRANSFERS_RATE_LIMITED
1722Description: The interaction with the exchange is delayed due to rate limiting.
1723HttpStatus: 202
1724
1725Value: 2263
1726Name: MERCHANT_EXCHANGE_TRANSFERS_TRANSIENT_FAILURE
1727Description: We experienced a transient failure in our interaction with the exchange.
1728HttpStatus: 202
1729
1730Value: 2264
1731Name: MERCHANT_EXCHANGE_TRANSFERS_HARD_FAILURE
1732Description: The response from the exchange was unacceptable and should be reviewed with an auditor.
1733HttpStatus: 200
1734
1735
1736
1030# 2300-2349: post orders ID claim endpoint 1737# 2300-2349: post orders ID claim endpoint
1031 1738
1032Value: 2300 1739Value: 2300
@@ -1051,38 +1758,38 @@ Name: MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED
1051Description: The backend failed to sign the refund request. 1758Description: The backend failed to sign the refund request.
1052HttpStatus: 0 1759HttpStatus: 0
1053 1760
1054# 2400-2449: tip pickup endpoint 1761# 2400-2449: reward pickup endpoint
1055 1762
1056Value: 2400 1763Value: 2400
1057Name: MERCHANT_TIP_PICKUP_UNBLIND_FAILURE 1764Name: MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE
1058Description: The client failed to unblind the signature returned by the merchant. 1765Description: The client failed to unblind the signature returned by the merchant.
1059HttpStatus: 0 1766HttpStatus: 0
1060 1767
1061 1768
1062 1769
1063Value: 2403 1770Value: 2403
1064Name: MERCHANT_TIP_PICKUP_EXCHANGE_ERROR 1771Name: MERCHANT_REWARD_PICKUP_EXCHANGE_ERROR
1065Description: The exchange returned a failure code for the withdraw operation. 1772Description: The exchange returned a failure code for the withdraw operation.
1066HttpStatus: 502 1773HttpStatus: 502
1067 1774
1068 1775
1069Value: 2404 1776Value: 2404
1070Name: MERCHANT_TIP_PICKUP_SUMMATION_FAILED 1777Name: MERCHANT_REWARD_PICKUP_SUMMATION_FAILED
1071Description: The merchant failed to add up the amounts to compute the pick up value. 1778Description: The merchant failed to add up the amounts to compute the pick up value.
1072HttpStatus: 500 1779HttpStatus: 500
1073 1780
1074Value: 2405 1781Value: 2405
1075Name: MERCHANT_TIP_PICKUP_HAS_EXPIRED 1782Name: MERCHANT_REWARD_PICKUP_HAS_EXPIRED
1076Description: The tip expired. 1783Description: The reward expired.
1077HttpStatus: 410 1784HttpStatus: 410
1078 1785
1079Value: 2406 1786Value: 2406
1080Name: MERCHANT_TIP_PICKUP_AMOUNT_EXCEEDS_TIP_REMAINING 1787Name: MERCHANT_REWARD_PICKUP_AMOUNT_EXCEEDS_REWARD_REMAINING
1081Description: The requested withdraw amount exceeds the amount remaining to be picked up. 1788Description: The requested withdraw amount exceeds the amount remaining to be picked up.
1082HttpStatus: 400 1789HttpStatus: 400
1083 1790
1084Value: 2407 1791Value: 2407
1085Name: MERCHANT_TIP_PICKUP_DENOMINATION_UNKNOWN 1792Name: MERCHANT_REWARD_PICKUP_DENOMINATION_UNKNOWN
1086Description: The merchant did not find the specified denomination key in the exchange's key set. 1793Description: The merchant did not find the specified denomination key in the exchange's key set.
1087HttpStatus: 409 1794HttpStatus: 409
1088 1795
@@ -1093,34 +1800,53 @@ HttpStatus: 409
1093 1800
1094Value: 2500 1801Value: 2500
1095Name: MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE 1802Name: MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE
1096Description: The backend lacks a wire transfer method configuration option for the given instance. Thus, this instance is unavailable (not findable for creating new orders). 1803Description: The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders.
1097HttpStatus: 404 1804HttpStatus: 404
1098 1805
1099Value: 2501 1806Value: 2501
1100Name: MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME 1807Name: MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME
1101Description: The proposal had no timestamp and the backend failed to obtain the local time. Likely to be an internal error. 1808Description: The proposal had no timestamp and the merchant backend failed to obtain the current local time.
1102HttpStatus: 500 1809HttpStatus: 500
1103 1810
1104Value: 2502 1811Value: 2502
1105Name: MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR 1812Name: MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR
1106Description: The order provided to the backend could not be parsed, some required fields were missing or ill-formed. 1813Description: The order provided to the backend could not be parsed; likely some required fields were missing or ill-formed.
1107HttpStatus: 400 1814HttpStatus: 400
1108 1815
1109Value: 2503 1816Value: 2503
1110Name: MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS 1817Name: MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS
1111Description: The backend encountered an error: the proposal already exists. 1818Description: A conflicting order (sharing the same order identifier) already exists at this merchant backend instance.
1112HttpStatus: 409 1819HttpStatus: 409
1113 1820
1114Value: 2504 1821Value: 2504
1115Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE 1822Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE
1116Description: The request is invalid: the wire deadline is before the refund deadline. 1823Description: The order creation request is invalid because the given wire deadline is before the refund deadline.
1117HttpStatus: 400 1824HttpStatus: 400
1118 1825
1119Value: 2505 1826Value: 2505
1120Name: MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST 1827Name: MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST
1121Description: The request is invalid: a delivery date was given, but it is in the past. 1828Description: The order creation request is invalid because the delivery date given is in the past.
1829HttpStatus: 400
1830
1831Value: 2506
1832Name: MERCHANT_PRIVATE_POST_ORDERS_WIRE_DEADLINE_IS_NEVER
1833Description: The order creation request is invalid because a wire deadline of "never" is not allowed.
1122HttpStatus: 400 1834HttpStatus: 400
1123 1835
1836Value: 2507
1837Name: MERCHANT_PRIVATE_POST_ORDERS_PAY_DEADLINE_IN_PAST
1838Description: The order ceration request is invalid because the given payment deadline is in the past.
1839HttpStatus: 400
1840
1841Value: 2508
1842Name: MERCHANT_PRIVATE_POST_ORDERS_REFUND_DEADLINE_IN_PAST
1843Description: The order creation request is invalid because the given refund deadline is in the past.
1844HttpStatus: 400
1845
1846Value: 2509
1847Name: MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGES_FOR_WIRE_METHOD
1848Description: 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.
1849HttpStatus: 409
1124 1850
1125Value: 2510 1851Value: 2510
1126Name: MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT 1852Name: MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT
@@ -1134,22 +1860,27 @@ HttpStatus: 409
1134 1860
1135Value: 2520 1861Value: 2520
1136Name: MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT 1862Name: MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT
1137Description: The order provided to the backend could not be deleted, our offer is still valid and awaiting payment. 1863Description: 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.
1864HttpStatus: 409
1865
1866Value: 2521
1867Name: MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID
1868Description: The order provided to the backend could not be deleted as the order was already paid.
1138HttpStatus: 409 1869HttpStatus: 409
1139 1870
1140Value: 2530 1871Value: 2530
1141Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT 1872Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT
1142Description: 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. 1873Description: 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.
1143HttpStatus: 409 1874HttpStatus: 409
1144 1875
1145Value: 2531 1876Value: 2531
1146Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID 1877Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID
1147Description: The frontend gave an unpaid order id to issue the refund to. 1878Description: Only paid orders can be refunded, and the frontend specified an unpaid order to issue a refund for.
1148HttpStatus: 409 1879HttpStatus: 409
1149 1880
1150Value: 2532 1881Value: 2532
1151Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT 1882Name: MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT
1152Description: The refund delay was set to 0 and thus no refunds are allowed for this order. 1883Description: The refund delay was set to 0 and thus no refunds are ever allowed for this order.
1153HttpStatus: 403 1884HttpStatus: 403
1154 1885
1155 1886
@@ -1196,6 +1927,11 @@ Name: MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_SUBMISSION
1196Description: 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. 1927Description: 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.
1197HttpStatus: 409 1928HttpStatus: 409
1198 1929
1930Value: 2563
1931Name: MERCHANT_EXCHANGE_TRANSFERS_CONFLICTING_TRANSFERS
1932Description: The amount transferred differs between what was submitted and what the exchange claimed.
1933HttpStatus: 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
1224Description: The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first. 1960Description: The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first.
1225HttpStatus: 409 1961HttpStatus: 409
1226 1962
1963Value: 2626
1964Name: MERCHANT_PRIVATE_ACCOUNT_DELETE_UNKNOWN_ACCOUNT
1965Description: The bank account referenced in the requested operation was not found.
1966HttpStatus: 404
1967
1968Value: 2627
1969Name: MERCHANT_PRIVATE_ACCOUNT_EXISTS
1970Description: The bank account specified in the request already exists at the merchant.
1971HttpStatus: 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
1269Description: The requested wire method is not supported by the exchange. 2015Description: The requested wire method is not supported by the exchange.
1270HttpStatus: 409 2016HttpStatus: 409
1271 2017
2018Value: 2701
2019Name: MERCHANT_PRIVATE_POST_RESERVES_REWARDS_NOT_ALLOWED
2020Description: The requested exchange does not allow rewards.
2021HttpStatus: 409
2022
1272Value: 2710 2023Value: 2710
1273Name: MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE 2024Name: MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE
1274Description: The reserve could not be deleted because it is unknown. 2025Description: The reserve could not be deleted because it is unknown.
1275HttpStatus: 404 2026HttpStatus: 404
1276 2027
1277# 2750-2799: tip authorization 2028# 2750-2799: reward authorization
1278 2029
1279Value: 2750 2030Value: 2750
1280Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_EXPIRED 2031Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_EXPIRED
1281Description: The reserve that was used to fund the tips has expired. 2032Description: The reserve that was used to fund the rewards has expired.
1282HttpStatus: 410 2033HttpStatus: 410
1283 2034
1284Value: 2751 2035Value: 2751
1285Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_UNKNOWN 2036Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_UNKNOWN
1286Description: The reserve that was used to fund the tips was not found in the DB. 2037Description: The reserve that was used to fund the rewards was not found in the DB.
1287HttpStatus: 503 2038HttpStatus: 503
1288 2039
1289Value: 2752 2040Value: 2752
1290Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_INSUFFICIENT_FUNDS 2041Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_INSUFFICIENT_FUNDS
1291Description: 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. 2042Description: 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.
1292HttpStatus: 0 2043HttpStatus: 0
1293 2044
1294Value: 2753 2045Value: 2753
1295Name: MERCHANT_PRIVATE_POST_TIP_AUTHORIZE_RESERVE_NOT_FOUND 2046Name: MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_NOT_FOUND
1296Description: The backend failed to find a reserve needed to authorize the tip. 2047Description: The backend failed to find a reserve needed to authorize the reward.
1297HttpStatus: 503 2048HttpStatus: 503
1298 2049
1299Value: 2800 2050Value: 2800
@@ -1301,6 +2052,53 @@ Name: MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE
1301Description: The merchant backend encountered a failure in computing the deposit total. 2052Description: The merchant backend encountered a failure in computing the deposit total.
1302HttpStatus: 200 2053HttpStatus: 200
1303 2054
2055# 2850-2899: template and OTP device operations
2056
2057Value: 2850
2058Name: MERCHANT_PRIVATE_POST_TEMPLATES_CONFLICT_TEMPLATE_EXISTS
2059Description: The template ID already exists.
2060HttpStatus: 409
2061
2062Value: 2851
2063Name: MERCHANT_PRIVATE_POST_OTP_DEVICES_CONFLICT_OTP_DEVICE_EXISTS
2064Description: The OTP device ID already exists.
2065HttpStatus: 409
2066
2067Value: 2860
2068Name: MERCHANT_POST_USING_TEMPLATES_AMOUNT_CONFLICT_TEMPLATES_CONTRACT_AMOUNT
2069Description: Amount given in the using template and in the template contract. There is a conflict.
2070HttpStatus: 409
2071
2072Value: 2861
2073Name: MERCHANT_POST_USING_TEMPLATES_SUMMARY_CONFLICT_TEMPLATES_CONTRACT_SUBJECT
2074Description: Subject given in the using template and in the template contract. There is a conflict.
2075HttpStatus: 409
2076
2077Value: 2862
2078Name: MERCHANT_POST_USING_TEMPLATES_NO_AMOUNT
2079Description: Amount not given in the using template and in the template contract. There is a conflict.
2080HttpStatus: 409
2081
2082Value: 2863
2083Name: MERCHANT_POST_USING_TEMPLATES_NO_SUMMARY
2084Description: Subject not given in the using template and in the template contract. There is a conflict.
2085HttpStatus: 409
2086
2087
2088
2089# 2900-2949: webhook operations
2090
2091Value: 2900
2092Name: MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS
2093Description: The webhook ID elready exists.
2094HttpStatus: 409
2095
2096Value: 2910
2097Name: MERCHANT_PRIVATE_POST_PENDING_WEBHOOKS_CONFLICT_PENDING_WEBHOOK_EXISTS
2098Description: The webhook serial elready exists.
2099HttpStatus: 409
2100
2101
1304 2102
1305 2103
1306 2104
@@ -1324,57 +2122,52 @@ HttpStatus: 410
1324Value: 5101 2122Value: 5101
1325Name: BANK_SAME_ACCOUNT 2123Name: BANK_SAME_ACCOUNT
1326Description: Wire transfer attempted with credit and debit party being the same bank account. 2124Description: Wire transfer attempted with credit and debit party being the same bank account.
1327HttpStatus: 0 2125HttpStatus: 400
1328 2126
1329Value: 5102 2127Value: 5102
1330Name: BANK_UNALLOWED_DEBIT 2128Name: BANK_UNALLOWED_DEBIT
1331Description: Wire transfer impossible, due to financial limitation of the party that attempted the payment. 2129Description: Wire transfer impossible, due to financial limitation of the party that attempted the payment.
1332HttpStatus: 0 2130HttpStatus: 409
1333 2131
1334Value: 5103 2132Value: 5103
1335Name: BANK_NEGATIVE_NUMBER_AMOUNT 2133Name: BANK_NEGATIVE_NUMBER_AMOUNT
1336Description: Negative number was used (as value and/or fraction) to initiate a Amount object. 2134Description: Negative numbers are not allowed (as value and/or fraction) to instantiate an amount object.
1337HttpStatus: 0 2135HttpStatus: 400
1338 2136
1339Value: 5104 2137Value: 5104
1340Name: BANK_NUMBER_TOO_BIG 2138Name: BANK_NUMBER_TOO_BIG
1341Description: A number too big was used (as value and/or fraction) to initiate a amount object. 2139Description: A too big number was used (as value and/or fraction) to instantiate an amount object.
1342HttpStatus: 0 2140HttpStatus: 400
1343
1344Value: 5105
1345Name: BANK_LOGIN_FAILED
1346Description: Could not login for the requested operation.
1347HttpStatus: 0
1348 2141
1349Value: 5106 2142Value: 5106
1350Name: BANK_UNKNOWN_ACCOUNT 2143Name: BANK_UNKNOWN_ACCOUNT
1351Description: The bank account referenced in the requested operation was not found. Returned along "400 Not found". 2144Description: The bank account referenced in the requested operation was not found.
1352HttpStatus: 0 2145HttpStatus: 404
1353 2146
1354Value: 5107 2147Value: 5107
1355Name: BANK_TRANSACTION_NOT_FOUND 2148Name: BANK_TRANSACTION_NOT_FOUND
1356Description: The transaction referenced in the requested operation (typically a reject operation), was not found. 2149Description: The transaction referenced in the requested operation (typically a reject operation), was not found.
1357HttpStatus: 0 2150HttpStatus: 404
1358 2151
1359Value: 5108 2152Value: 5108
1360Name: BANK_BAD_FORMAT_AMOUNT 2153Name: BANK_BAD_FORMAT_AMOUNT
1361Description: Bank received a malformed amount string. 2154Description: Bank received a malformed amount string.
1362HttpStatus: 0 2155HttpStatus: 400
1363 2156
1364Value: 5109 2157Value: 5109
1365Name: BANK_REJECT_NO_RIGHTS 2158Name: BANK_REJECT_NO_RIGHTS
1366Description: 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. 2159Description: The client does not own the account credited by the transaction which is to be rejected, so it has no rights do reject it.
1367HttpStatus: 0 2160HttpStatus: 403
1368 2161
1369Value: 5110 2162Value: 5110
1370Name: BANK_UNMANAGED_EXCEPTION 2163Name: BANK_UNMANAGED_EXCEPTION
1371Description: This error code is returned when no known exception types captured the exception, and comes along with a 500 Internal Server Error. 2164Description: This error code is returned when no known exception types captured the exception.
1372HttpStatus: 0 2165HttpStatus: 500
1373 2166
1374Value: 5111 2167Value: 5111
1375Name: BANK_SOFT_EXCEPTION 2168Name: BANK_SOFT_EXCEPTION
1376Description: 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. 2169Description: 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.
1377HttpStatus: 0 2170HttpStatus: 500
1378 2171
1379Value: 5112 2172Value: 5112
1380Name: BANK_TRANSFER_REQUEST_UID_REUSED 2173Name: BANK_TRANSFER_REQUEST_UID_REUSED
@@ -1391,6 +2184,160 @@ Name: BANK_DUPLICATE_RESERVE_PUB_SUBJECT
1391Description: The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique. 2184Description: The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique.
1392HttpStatus: 409 2185HttpStatus: 409
1393 2186
2187Value: 5115
2188Name: BANK_ANCIENT_TRANSACTION_GONE
2189Description: The client requested a transaction that is so far in the past, that it has been forgotten by the bank.
2190HttpStatus: 410
2191
2192Value: 5116
2193Name: BANK_ABORT_CONFIRM_CONFLICT
2194Description: The client attempted to abort a transaction that was already confirmed.
2195HttpStatus: 409
2196
2197Value: 5117
2198Name: BANK_CONFIRM_ABORT_CONFLICT
2199Description: The client attempted to confirm a transaction that was already aborted.
2200HttpStatus: 409
2201
2202Value: 5118
2203Name: BANK_REGISTER_CONFLICT
2204Description: The client attempted to register an account with the same name.
2205HttpStatus: 409
2206
2207Value: 5119
2208Name: BANK_POST_WITHDRAWAL_OPERATION_REQUIRED
2209Description: The client attempted to confirm a withdrawal operation before the wallet posted the required details.
2210HttpStatus: 400
2211
2212Value: 5120
2213Name: BANK_RESERVED_USERNAME_CONFLICT
2214Description: The client tried to register a new account under a reserved username (like 'admin' for example).
2215HttpStatus: 409
2216
2217Value: 5121
2218Name: BANK_REGISTER_USERNAME_REUSE
2219Description: The client tried to register a new account with an username already in use.
2220HttpStatus: 409
2221
2222Value: 5122
2223Name: BANK_REGISTER_PAYTO_URI_REUSE
2224Description: The client tried to register a new account with a payto:// URI already in use.
2225HttpStatus: 409
2226
2227Value: 5123
2228Name: BANK_ACCOUNT_BALANCE_NOT_ZERO
2229Description: The client tried to delete an account with a non null balance.
2230HttpStatus: 409
2231
2232Value: 5124
2233Name: BANK_UNKNOWN_CREDITOR
2234Description: The client tried to create a transaction or an operation that credit an unknown account.
2235HttpStatus: 409
2236
2237Value: 5125
2238Name: BANK_UNKNOWN_DEBTOR
2239Description: The client tried to create a transaction or an operation that debit an unknown account.
2240HttpStatus: 409
2241
2242Value: 5126
2243Name: BANK_ACCOUNT_IS_EXCHANGE
2244Description: The client tried to perform an action prohibited for exchange accounts.
2245HttpStatus: 409
2246
2247Value: 5127
2248Name: BANK_ACCOUNT_IS_NOT_EXCHANGE
2249Description: The client tried to perform an action reserved for exchange accounts.
2250HttpStatus: 409
2251
2252Value: 5128
2253Name: BANK_BAD_CONVERSION
2254Description: Received currency conversion is wrong.
2255HttpStatus: 409
2256
2257Value: 5129
2258Name: BANK_MISSING_TAN_INFO
2259Description: The account referenced in this operation is missing tan info for the chosen channel.
2260HttpStatus: 409
2261
2262Value: 5130
2263Name: BANK_CONFIRM_INCOMPLETE
2264Description: The client attempted to confirm a transaction with incomplete info.
2265HttpStatus: 409
2266
2267Value: 5131
2268Name: BANK_TAN_RATE_LIMITED
2269Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks.
2270HttpStatus: 429
2271
2272Value: 5132
2273Name: BANK_TAN_CHANNEL_NOT_SUPPORTED
2274Description: This TAN channel is not supported.
2275HttpStatus: 501
2276
2277Value: 5133
2278Name: BANK_TAN_CHANNEL_SCRIPT_FAILED
2279Description: Failed to send TAN using the helper script. Either script is not found, or script timeout, or script terminated with a non-successful result.
2280HttpStatus: 500
2281
2282Value: 5134
2283Name: BANK_TAN_CHALLENGE_FAILED
2284Description: The client's response to the challenge was invalid.
2285HttpStatus: 403
2286
2287Value: 5135
2288Name: BANK_NON_ADMIN_PATCH_LEGAL_NAME
2289Description: A non-admin user has tried to change their legal name.
2290HttpStatus: 409
2291
2292Value: 5136
2293Name: BANK_NON_ADMIN_PATCH_DEBT_LIMIT
2294Description: A non-admin user has tried to change their debt limit.
2295HttpStatus: 409
2296
2297Value: 5137
2298Name: BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD
2299Description: A non-admin user has tried to change their password whihout providing the current one.
2300HttpStatus: 409
2301
2302Value: 5138
2303Name: BANK_PATCH_BAD_OLD_PASSWORD
2304Description: Provided old password does not match current password.
2305HttpStatus: 409
2306
2307Value: 5139
2308Name: BANK_PATCH_ADMIN_EXCHANGE
2309Description: An admin user has tried to become an exchange.
2310HttpStatus: 409
2311
2312Value: 5140
2313Name: BANK_NON_ADMIN_PATCH_CASHOUT
2314Description: A non-admin user has tried to change their cashout account.
2315HttpStatus: 409
2316
2317Value: 5141
2318Name: BANK_NON_ADMIN_PATCH_CONTACT
2319Description: A non-admin user has tried to change their contact info.
2320HttpStatus: 409
2321
2322Value: 5142
2323Name: BANK_ADMIN_CREDITOR
2324Description: The client tried to create a transaction that credit the admin account.
2325HttpStatus: 409
2326
2327Value: 5143
2328Name: BANK_CHALLENGE_NOT_FOUND
2329Description: The referenced challenge was not found.
2330HttpStatus: 404
2331
2332Value: 5144
2333Name: BANK_TAN_CHALLENGE_EXPIRED
2334Description: The referenced challenge has expired.
2335HttpStatus: 409
2336
2337Value: 5145
2338Name: BANK_NON_ADMIN_SET_TAN_CHANNEL
2339Description: A non-admin user has tried to create an account with 2fa.
2340HttpStatus: 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
1460Description: The "Content-length" field for the upload is missing. 2407Description: The "Content-length" field for the upload is missing.
1461HttpStatus: 400 2408HttpStatus: 400
1462 2409
2410Value: 6113
2411Name: SYNC_GENERIC_BACKEND_ERROR
2412Description: Sync had problems communicating with its payment backend.
2413HttpStatus: 502
2414
2415Value: 6114
2416Name: SYNC_GENERIC_BACKEND_TIMEOUT
2417Description: Sync experienced a timeout communicating with its payment backend.
2418HttpStatus: 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
1544HttpStatus: 0 2502HttpStatus: 0
1545 2503
1546Value: 7016 2504Value: 7016
1547Name: WALLET_TIPPING_COIN_SIGNATURE_INVALID 2505Name: WALLET_REWARD_COIN_SIGNATURE_INVALID
1548Description: The signature on a coin by the exchange's denomination key (obtained through the merchant via tipping) is invalid after unblinding it. 2506Description: The signature on a coin by the exchange's denomination key (obtained through the merchant via a reward) is invalid after unblinding it.
1549HttpStatus: 0 2507HttpStatus: 0
1550 2508
1551Value: 7017 2509Value: 7017
@@ -1568,7 +2526,77 @@ Name: WALLET_CONTRACT_TERMS_MALFORMED
1568Description: The contract terms given by the merchant are malformed. 2526Description: The contract terms given by the merchant are malformed.
1569HttpStatus: 0 2527HttpStatus: 0
1570 2528
1571# 8000 - 8999: Reserved for Anastasis 2529Value: 7021
2530Name: WALLET_PENDING_OPERATION_FAILED
2531Description: A pending operation failed, and thus the request can't be completed.
2532HttpStatus: 0
2533
2534Value: 7022
2535Name: WALLET_PAY_MERCHANT_SERVER_ERROR
2536Description: A payment was attempted, but the merchant had an internal server error (5xx).
2537HttpStatus: 0
2538
2539Value: 7023
2540Name: WALLET_CRYPTO_WORKER_ERROR
2541Description: The crypto worker failed.
2542HttpStatus: 0
2543
2544Value: 7024
2545Name: WALLET_CRYPTO_WORKER_BAD_REQUEST
2546Description: The crypto worker received a bad request.
2547HttpStatus: 0
2548
2549Value: 7025
2550Name: WALLET_WITHDRAWAL_KYC_REQUIRED
2551Description: A KYC step is required before withdrawal can proceed.
2552HttpStatus: 0
2553
2554Value: 7026
2555Name: WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE
2556Description: The wallet does not have sufficient balance to create a deposit group.
2557HttpStatus: 0
2558
2559Value: 7027
2560Name: WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE
2561Description: The wallet does not have sufficient balance to create a peer push payment.
2562HttpStatus: 0
2563
2564Value: 7028
2565Name: WALLET_PEER_PULL_PAYMENT_INSUFFICIENT_BALANCE
2566Description: The wallet does not have sufficient balance to pay for an invoice.
2567HttpStatus: 0
2568
2569Value: 7029
2570Name: WALLET_REFRESH_GROUP_INCOMPLETE
2571Description: A group of refresh operations has errors and will be tried again later.
2572HttpStatus: 0
2573
2574Value: 7030
2575Name: WALLET_EXCHANGE_BASE_URL_MISMATCH
2576Description: The exchange's self-reported base URL does not match the one that the wallet is using.
2577HttpStatus: 0
2578
2579Value: 7031
2580Name: WALLET_ORDER_ALREADY_PAID
2581Description: The order has already been paid by another wallet.
2582HttpStatus: 0
2583
2584Value: 7032
2585Name: WALLET_EXCHANGE_UNAVAILABLE
2586Description: An exchange that is required for some request is currently not available.
2587HttpStatus: 0
2588
2589Value: 7033
2590Name: WALLET_EXCHANGE_ENTRY_USED
2591Description: An exchange entry is still used by the exchange, thus it can't be deleted without purging.
2592HttpStatus: 0
2593
2594Value: 7034
2595Name: WALLET_DB_UNAVAILABLE
2596Description: The wallet database is unavailable and the wallet thus is not operational.
2597HttpStatus: 0
2598
2599# 8000 - 8499: Reserved for Anastasis
1572 2600
1573Value: 8000 2601Value: 8000
1574Name: ANASTASIS_GENERIC_BACKEND_TIMEOUT 2602Name: ANASTASIS_GENERIC_BACKEND_TIMEOUT
@@ -1610,15 +2638,25 @@ Name: ANASTASIS_GENERIC_PAYMENT_CHECK_START_FAILED
1610Description: The backend could not check payment status with the payment processor. 2638Description: The backend could not check payment status with the payment processor.
1611HttpStatus: 500 2639HttpStatus: 500
1612 2640
2641Value: 8008
2642Name: ANASTASIS_GENERIC_PROVIDER_UNREACHABLE
2643Description: The Anastasis provider could not be reached.
2644HttpStatus: 0
2645
2646Value: 8009
2647Name: ANASTASIS_PAYMENT_GENERIC_TIMEOUT
2648Description: HTTP server experienced a timeout while awaiting promised payment.
2649HttpStatus: 408
2650
1613 2651
1614Value: 8108 2652Value: 8108
1615Name: ANASTASIS_TRUTH_UNKNOWN 2653Name: ANASTASIS_TRUTH_UNKNOWN
1616Description: The truth public key is unknown to the provider. 2654Description: The key share is unknown to the provider.
1617HttpStatus: 404 2655HttpStatus: 404
1618 2656
1619Value: 8109 2657Value: 8109
1620Name: ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED 2658Name: ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED
1621Description: The authorization method used by the truth is no longer supported by the provider. 2659Description: The authorization method used for the key share is no longer supported by the provider.
1622HttpStatus: 500 2660HttpStatus: 500
1623 2661
1624Value: 8110 2662Value: 8110
@@ -1633,13 +2671,8 @@ HttpStatus: 403
1633 2671
1634Value: 8112 2672Value: 8112
1635Name: ANASTASIS_TRUTH_CHALLENGE_UNKNOWN 2673Name: ANASTASIS_TRUTH_CHALLENGE_UNKNOWN
1636Description: The service is unaware of having issued a challenge. 2674Description: The backend is not aware of having issued the provided challenge code. Either this is the wrong code, or it has expired.
1637HttpStatus: 410 2675HttpStatus: 404
1638
1639Value: 8113
1640Name: ANASTASIS_TRUTH_CHALLENGE_ACTIVE
1641Description: A challenge is already active, the service is thus not issuing a new one.
1642HttpStatus: 208
1643 2676
1644Value: 8114 2677Value: 8114
1645Name: ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED 2678Name: ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED
@@ -1673,28 +2706,27 @@ HttpStatus: 502
1673 2706
1674Value: 8120 2707Value: 8120
1675Name: ANASTASIS_TRUTH_DECRYPTION_FAILED 2708Name: ANASTASIS_TRUTH_DECRYPTION_FAILED
1676Description: The decryption of the truth object failed with the provided key. 2709Description: The decryption of the key share failed with the provided key.
1677HttpStatus: 417 2710HttpStatus: 400
1678 2711
1679Value: 8121 2712Value: 8121
1680Name: ANASTASIS_TRUTH_RATE_LIMITED 2713Name: ANASTASIS_TRUTH_RATE_LIMITED
1681Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks. 2714Description: The request rate is too high. The server is refusing requests to guard against brute-force attacks.
1682HttpStatus: 429 2715HttpStatus: 429
1683 2716
1684Value: 8122 2717Value: 8123
1685Name: ANASTASIS_TRUTH_AUTH_TIMEOUT 2718Name: ANASTASIS_TRUTH_CHALLENGE_WRONG_METHOD
1686Description: The authentication process did not yet complete. The user should try again later. 2719Description: A request to issue a challenge is not valid for this authentication method.
1687HttpStatus: 408 2720HttpStatus: 400
1688
1689 2721
1690Value: 8150 2722Value: 8150
1691Name: ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS 2723Name: ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS
1692Description: The backend failed to store the truth because the UUID is already in use. 2724Description: The backend failed to store the key share because the UUID is already in use.
1693HttpStatus: 409 2725HttpStatus: 409
1694 2726
1695Value: 8151 2727Value: 8151
1696Name: ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED 2728Name: ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED
1697Description: The backend failed to store the truth because the authorization method is not supported. 2729Description: The backend failed to store the key share because the authorization method is not supported.
1698HttpStatus: 400 2730HttpStatus: 400
1699 2731
1700 2732
@@ -1702,7 +2734,7 @@ HttpStatus: 400
1702Value: 8200 2734Value: 8200
1703Name: ANASTASIS_SMS_PHONE_INVALID 2735Name: ANASTASIS_SMS_PHONE_INVALID
1704Description: The provided phone number is not an acceptable number. 2736Description: The provided phone number is not an acceptable number.
1705HttpStatus: 417 2737HttpStatus: 409
1706 2738
1707Value: 8201 2739Value: 8201
1708Name: ANASTASIS_SMS_HELPER_EXEC_FAILED 2740Name: ANASTASIS_SMS_HELPER_EXEC_FAILED
@@ -1718,7 +2750,7 @@ HttpStatus: 500
1718Value: 8210 2750Value: 8210
1719Name: ANASTASIS_EMAIL_INVALID 2751Name: ANASTASIS_EMAIL_INVALID
1720Description: The provided email address is not an acceptable address. 2752Description: The provided email address is not an acceptable address.
1721HttpStatus: 417 2753HttpStatus: 409
1722 2754
1723Value: 8211 2755Value: 8211
1724Name: ANASTASIS_EMAIL_HELPER_EXEC_FAILED 2756Name: ANASTASIS_EMAIL_HELPER_EXEC_FAILED
@@ -1734,7 +2766,7 @@ HttpStatus: 500
1734Value: 8220 2766Value: 8220
1735Name: ANASTASIS_POST_INVALID 2767Name: ANASTASIS_POST_INVALID
1736Description: The provided postal address is not an acceptable address. 2768Description: The provided postal address is not an acceptable address.
1737HttpStatus: 417 2769HttpStatus: 409
1738 2770
1739Value: 8221 2771Value: 8221
1740Name: ANASTASIS_POST_HELPER_EXEC_FAILED 2772Name: ANASTASIS_POST_HELPER_EXEC_FAILED
@@ -1750,18 +2782,23 @@ HttpStatus: 500
1750Value: 8230 2782Value: 8230
1751Name: ANASTASIS_IBAN_INVALID 2783Name: ANASTASIS_IBAN_INVALID
1752Description: The provided IBAN address is not an acceptable IBAN. 2784Description: The provided IBAN address is not an acceptable IBAN.
1753HttpStatus: 417 2785HttpStatus: 409
2786
2787Value: 8231
2788Name: ANASTASIS_IBAN_MISSING_TRANSFER
2789Description: The provider has not yet received the IBAN wire transfer authorizing the disclosure of the key share.
2790HttpStatus: 403
1754 2791
1755 2792
1756Value: 8240 2793Value: 8240
1757Name: ANASTASIS_TOTP_KEY_MISSING 2794Name: ANASTASIS_TOTP_KEY_MISSING
1758Description: The backend did not find a TOTP key in the data provided. 2795Description: The backend did not find a TOTP key in the data provided.
1759HttpStatus: 417 2796HttpStatus: 409
1760 2797
1761Value: 8241 2798Value: 8241
1762Name: ANASTASIS_TOTP_KEY_INVALID 2799Name: ANASTASIS_TOTP_KEY_INVALID
1763Description: The key provided does not satisfy the format restrictions for an Anastasis TOTP key. 2800Description: The key provided does not satisfy the format restrictions for an Anastasis TOTP key.
1764HttpStatus: 417 2801HttpStatus: 409
1765 2802
1766 2803
1767Value: 8301 2804Value: 8301
@@ -1848,7 +2885,7 @@ HttpStatus: 0
1848 2885
1849Value: 8410 2886Value: 8410
1850Name: ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED 2887Name: ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED
1851Description: Our attempts to download the recovery document failed with all providers. 2888Description: 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.
1852HttpStatus: 0 2889HttpStatus: 0
1853 2890
1854Value: 8411 2891Value: 8411
@@ -1896,8 +2933,31 @@ Name: ANASTASIS_REDUCER_INTERNAL_ERROR
1896Description: The reducer encountered an internal error, likely a bug that needs to be reported. 2933Description: The reducer encountered an internal error, likely a bug that needs to be reported.
1897HttpStatus: 0 2934HttpStatus: 0
1898 2935
2936Value: 8420
2937Name: ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED
2938Description: The reducer already synchronized with all providers.
2939HttpStatus: 0
2940
2941# 8500 - 8600: Frosix
1899 2942
1900# 9000 - 9998: LibEuFin. 2943# 8600 - 8700: Donau
2944
2945Value: 8607
2946Name: DONAU_GENERIC_KEYS_MISSING
2947Description: 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.
2948HttpStatus: 503
2949
2950Value: 8608
2951Name: DONAU_CHARITY_SIGNATURE_INVALID
2952Description: The signature of the charity key is not valid.
2953HttpStatus: 403
2954
2955Value: 8609
2956Name: DONAU_CHARITY_NOT_FOUND
2957Description: The charity is unknown.
2958HttpStatus: 404
2959
2960# 9000 - 9599: LibEuFin.
1901 2961
1902Value: 9000 2962Value: 9000
1903Name: LIBEUFIN_NEXUS_GENERIC_ERROR 2963Name: LIBEUFIN_NEXUS_GENERIC_ERROR
@@ -1919,7 +2979,70 @@ Name: LIBEUFIN_SANDBOX_UNCAUGHT_EXCEPTION
1919Description: An uncaught exception happened in the LibEuFin sandbox service. 2979Description: An uncaught exception happened in the LibEuFin sandbox service.
1920HttpStatus: 500 2980HttpStatus: 500
1921 2981
2982# 9600 - 9749: Taldir
2983Value: 9600
2984Name: TALDIR_METHOD_NOT_SUPPORTED
2985Description: This validation method is not supported by the service.
2986HttpStatus: 404
2987
2988Value: 9601
2989Name: TALDIR_REGISTER_RATE_LIMITED
2990Description: Number of allowed attempts for initiating a challenge exceeded.
2991HttpStatus: 429
2992
2993# 9750-9999: Challenger
2994Value: 9750
2995Name: CHALLENGER_GENERIC_CLIENT_UNKNOWN
2996Description: The client is unknown or unauthorized.
2997HttpStatus: 404
2998
2999Value: 9751
3000Name: CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI
3001Description: The client is not authorized to use the given redirect URI.
3002HttpStatus: 403
3003
3004Value: 9752
3005Name: CHALLENGER_HELPER_EXEC_FAILED
3006Description: The service failed to execute its helper process to send the challenge.
3007HttpStatus: 500
3008
3009Value: 9753
3010Name: CHALLENGER_GRANT_UNKNOWN
3011Description: The grant is unknown to the service (it could also have expired).
3012HttpStatus: 404
3013
3014Value: 9754
3015Name: CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE
3016Description: The code given is not even well-formed.
3017HttpStatus: 403
3018
3019Value: 9755
3020Name: CHALLENGER_GENERIC_VALIDATION_UNKNOWN
3021Description: The service is not aware of the referenced validation process.
3022HttpStatus: 404
3023
3024Value: 9756
3025Name: CHALLENGER_CLIENT_FORBIDDEN_INVALID_CODE
3026Description: The code given is not valid.
3027HttpStatus: 403
3028
3029Value: 9757
3030Name: CHALLENGER_TOO_MANY_ATTEMPTS
3031Description: Too many attempts have been made, validation is temporarily disabled for this address.
3032HttpStatus: 429
3033
3034Value: 9758
3035Name: CHALLENGER_INVALID_PIN
3036Description: The PIN code provided is incorrect.
3037HttpStatus: 403
3038
3039Value: 9759
3040Name: CHALLENGER_MISSING_ADDRESS
3041Description: The token cannot be valid as no address was ever provided by the client.
3042HttpStatus: 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.
1923Value: 9999 3046Value: 9999
1924Name: END 3047Name: END
1925Description: End of error code range. 3048Description: 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 @@
1GNU Taler Error Codes
2---------------------
3
4Entries
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 @@
1all: check
2
3check: 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
21Identifier: AGE_RESTRICTIONS
22Description: Restrictions to limit spending of coins on products that are legally sold only to customers below a given age.
23Critical: true
24Contact: oec-taler@kesim.org
25References: Design document 24
26
27Identifier: POLICY_REFUND
28Description: Support for refund in payments.
29Critical: false
30Contact: team@taler.net
31References: Design document 13
32
33Identifier: POLICY_AUCTION
34Description: Auction support via libbrandt
35Critical: false
36Contact: oec-taler@kesim.org
37References: Design document 32
38
39Identifier: POLICY_ESCROW
40Description: 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.
41Critical: false
42Contact: oec-taler@kesim.org
43References: 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 @@
1GNS 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=================== ===========================================================
4Suffix {{Name}}
5------------------- -----------------------------------------------------------
6Zone Key {{Key}}
7Comment {{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 @@
1all: check
2
3check: 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
23Identifier: BUSINESS_NAME
24Description: Full legal name of the business.
25Category: business
26
27Identifier: BUSINESS_TAX_ID
28Description: Tax identifier of the business.
29Category: business
30Comment: Format may depend on the country of residence of the business.
31
32Identifier: FULL_NAME
33Description: Full legal name of an individual.
34Category: individual
35
36Identifier: CONTACT_EMAIL
37Description: E-mail address to contact the individual or business.
38Category: both
39Comment: Can be validated via E-mail with TAN.
40
41Identifier: CONTACT_PHONE
42Description: Phone number to contact the individual or business.
43Category: both
44Comment: Can be validated via SMS-TAN or phone call.
45
46Identifier: CONTACT_DNS_DOMAIN
47Description: DNS domain name owned by the individual or business.
48Category: both
49Comment: Can be validated by having the owner set an appropriate DNS TXT record.
50
51Identifier: CONTACT_WEB_DOMAIN
52Description: Web site owned by the individual or business.
53Category: both
54Comment: Can be validated by having the owner serve an appropriate well-known page.
55
56Identifier: ADDRESS_STREET
57Description: Street address (including house number) of the individual or business.
58Category: both
59
60Identifier: ADDRESS_CITY
61Description: Name of the city where the individual or business resides.
62Category: both
63
64Identifier: ADDRESS_COUNTRY
65Description: Name of the country where the individual or business resides.
66Category: 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 @@
1FILES=gnunet_dht_block_types.h gnunet_dht_block_types.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnunet_dht_block_types.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnunet_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
18gnunet_dht_block_types.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnunet_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 @@
1Policy
2^^^^^^
3
4Developers working on GNUnet or packages based on GNUnet should
5feel free to extend this registry. Entries may be deleted if
6no code using them is still expected to be in production anywhere.
7
8Updating the name of the package or subsystem is allowed provided
9that the code using the signature is being moved, as those fields
10are 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 @@
1R5N DHT Block Types
2-------------------
3
4This registry is for GNUnet DHT Block Types.
5
6DHT Block Types types uniquely identify the different kinds
7of blocks that can be found in the GNUnet DHT.
8
9This registry is used to ensure that the names and numeric values
10used to identify block types are uniquely defined and to
11allow DHT implementors to find out details about the
12respective 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
33extern "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 */
42enum 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
19Number: 0
20Name: ANY
21Comment: Identifier for any block.
22References: None
23
24Number: 1
25Name: FS_DBLOCK
26Comment: Data block (leaf) in the CHK tree.
27References: None
28
29Number: 2
30Name: FS_IBLOCK
31Comment: Inner block in the CHK tree.
32References: None
33
34Number: 6
35Name: FS_ONDEMAND
36Comment: Type of a block representing a block to be encoded on demand from disk. Should never appear on the network directly.
37References: None
38
39Number: 7
40Name: LEGACY_HELLO
41Comment: Legacy type of a block that contains a HELLO for a peer.
42References: None
43
44Number: 8
45Name: TEST
46Comment: Block for testing.
47References: None
48
49Number: 9
50Name: FS_UBLOCK
51Comment: Type of a block representing any type of search result (universal).
52References: None
53
54Number: 10
55Name: DNS
56Comment: Block for storing DNS exit service advertisements.
57References: None
58
59Number: 11
60Name: GNS_NAMERECORD
61Comment: Block for storing GNS record data.
62References: None
63
64Number: 12
65Name: REVOCATION
66Comment: Block type for a revocation message by which a key is revoked.
67References: None
68
69Number: 13
70Name: DHT_HELLO
71Comment: Type of a block that contains a DHT-NG HELLO for a peer.
72References: LSD-0004
73
74Number: 22
75Name: REGEX
76Comment: Block to store a cadet regex state
77References: None
78
79Number: 23
80Name: REGEX_ACCEPT
81Comment: Block to store a cadet regex accepting state
82References: None
83
84Number: 24
85Name: SET_TEST
86Comment: Block for testing set/consensus. If first byte of the block is non-zero, the block is considered invalid.
87References: None
88
89Number: 25
90Name: CONSENSUS_ELEMENT
91Comment: Block type for consensus elements. Contains either special marker elements or a nested block.
92References: None
93
94Number: 26
95Name: SETI_TEST
96Comment: Block for testing set intersection. If first byte of the block is non-zero, the block is considered invalid.
97References: None
98
99Number: 27
100Name: SETU_TEST
101Comment: Block for testing set union. If first byte of the block is non-zero, the block is considered invalid.
102References: 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 @@
1Entries
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 @@
1gnunet_error_codes.c
2gnunet_error_codes.go
3gnunet_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 @@
1FILES=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
7all: check $(FILES)
8
9check: registry.rec
10 recfix --check registry.rec
11
12distclean:
13 rm -f *.tmp
14
15clean:
16 rm -f $(FILES) *.tmp
17
18prep:
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.
25combined.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
29combined-escaped.tmp: combined.tmp
30 sed 's/"/\\"/g' combined.tmp > $@
31
32length.tmp: combined.tmp
33 recsel -p "Count(Description):ECS_LENGTH" combined.tmp > $@
34
35gnunet_error_codes.h.tmp: combined.tmp h.template
36 ../format.sh h.template < combined.tmp > $@
37
38gnunet_error_codes.h: h.header gnunet_error_codes.h.tmp h.footer
39 cat h.header gnunet_error_codes.h.tmp h.footer > $@
40
41gnunet_error_codes.c.tmp: combined-escaped.tmp c.template
42 ../format.sh c.template < combined-escaped.tmp > $@
43
44gnunet_error_codes-length.c.tmp: length.tmp c-length.template
45 ../format.sh c-length.template < length.tmp > $@
46
47gnunet_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
50gnunet_error_codes.ts.tmp: combined.tmp ts.template
51 ../format.sh ts.template < combined.tmp > $@
52
53gnunet_error_codes.ts: ts.header gnunet_error_codes.ts.tmp ts.footer
54 cat ts.header gnunet_error_codes.ts.tmp ts.footer > $@
55
56gnunet_error_codes.go.tmp: combined.tmp go.template
57 ../format.sh go.template < combined.tmp > $@
58
59gnunet_error_codes.go: go.header gnunet_error_codes.go.tmp go.footer
60 cat go.header gnunet_error_codes.go.tmp go.footer > $@
61
62gnunet_error_codes.rst.tmp: combined.tmp rst.template
63 ../format.sh rst.template < combined.tmp > $@
64
65rst.header.tmp:
66 cat README POLICY rst.header.template > $@
67
68gnunet_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 @@
1Policy
2^^^^^^
3
4Developers working on GNUnet or packages based on GNUnet should
5feel free to extend this registry. Entries may be deleted if
6no code using them is still expected to be in production anywhere.
7
8Updating the name of the package or subsystem is allowed provided
9that the code using the signature is being moved, as those fields
10are 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 @@
1GNUnet Error Codes
2------------------
3
4GNUnet 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 */
9static 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
4const char *
5GNUNET_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
30unsigned int
31GNUNET_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
56unsigned int
57GNUNET_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 */
33struct 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 */
55static 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
21package gana
22
23const (
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 */
12const char *
13GNUNET_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 */
22unsigned int
23GNUNET_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 */
34unsigned int
35GNUNET_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
30extern "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 */
42enum 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
22Value: 0
23Name: NONE
24Description: No error (success).
25HttpStatus: 0
26
27Value: 1
28Name: UNKNOWN
29Description: Unknown and unspecified error.
30HttpStatus: 500
31
32Value: 101
33Name: SERVICE_COMMUNICATION_FAILED
34Description: Communication with service failed.
35HttpStatus: 500
36
37# IDENTITY Error Codes
38
39Value: 200
40Name: IDENTITY_NOT_FOUND
41Description: Ego not found.
42HttpStatus: 404
43
44Value: 201
45Name: IDENTITY_NAME_CONFLICT
46Description: Identifier already in use for another ego.
47HttpStatus: 409
48
49Value: 202
50Name: IDENTITY_INVALID
51Description: The given ego is invalid or malformed.
52HttpStatus: 500
53
54# NAMESTORE Error Codes
55
56Value: 5000
57Name: NAMESTORE_UNKNOWN
58Description: Unknown namestore error.
59HttpStatus: 500
60
61Value: 5001
62Name: NAMESTORE_ITERATION_FAILED
63Description: Zone iteration failed.
64HttpStatus: 500
65
66Value: 5002
67Name: NAMESTORE_ZONE_NOT_FOUND
68Description: Zone not found.
69HttpStatus: 404
70
71Value: 5003
72Name: NAMESTORE_RECORD_NOT_FOUND
73Description: Record not found.
74HttpStatus: 404
75
76Value: 5004
77Name: NAMESTORE_RECORD_DELETE_FAILED
78Description: Zone iteration failed.
79HttpStatus: 500
80
81Value: 5005
82Name: NAMESTORE_ZONE_EMPTY
83Description: Zone does not contain any records.
84HttpStatus: 404
85
86Value: 5006
87Name: NAMESTORE_LOOKUP_ERROR
88Description: Failed to lookup record.
89HttpStatus: 500
90
91Value: 5007
92Name: NAMESTORE_NO_RECORDS_GIVEN
93Description: No records given.
94HttpStatus: 400
95
96Value: 5008
97Name: NAMESTORE_RECORD_DATA_INVALID
98Description: Record data invalid.
99HttpStatus: 400
100
101Value: 5009
102Name: NAMESTORE_NO_LABEL_GIVEN
103Description: No label given.
104HttpStatus: 400
105
106Value: 5010
107Name: NAMESTORE_NO_RESULTS
108Description: No results given.
109HttpStatus: 404
110
111Value: 5011
112Name: NAMESTORE_RECORD_EXISTS
113Description: Record already exists.
114HttpStatus: 409
115
116Value: 5012
117Name: NAMESTORE_RECORD_TOO_BIG
118Description: Record size exceeds maximum limit.
119HttpStatus: 500
120
121Value: 5013
122Name: NAMESTORE_BACKEND_FAILED
123Description: There was an error in the database backend.
124HttpStatus: 500
125
126Value: 5014
127Name: NAMESTORE_STORE_FAILED
128Description: Failed to store the given records.
129HttpStatus: 500
130
131Value: 5015
132Name: NAMESTORE_LABEL_INVALID
133Description: Label invalid or malformed.
134HttpStatus: 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 @@
1Entries
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
21export 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 @@
1FILES=gnunet_overlay_protocols.h gnunet_overlay_protocols.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnunet_overlay_protocols.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnunet_overlay_protocols.h: h.header gnunet_overlay_protocols.h.tmp h.footer
16 cat h.header gnunet_overlay_protocols.h.tmp h.footer > $@
17
18gnunet_overlay_protocols.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat rst.header.template README POLICY > $@
23 echo "Entries" >> $@
24 echo "^^^^^^^" >> $@
25
26gnunet_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 @@
1Policy
2^^^^^^
3
4Each registry entry should contain three values: the "Number" of the
5protocol, which must be above 255 (to avoid conflicts with legacy
6Internet protocols), the "Name" of the protocol, and a "Reference" with links
7to further information about the record type.
8
9The "Name" must be unique in the entire registry. The value must be a
10case insensitive ASCII string and is restricted to alphanumeric
11characters.
12
13Adding protocols is possible after expert review, using a
14first-come-first-served policy for unique "Name" allocation.
15Experts are responsible to ensure that the chosen "Name" is
16appropriate for the record type.
17
18The current contact(s) for expert review are reachable at
19gns-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 @@
1This registry is for overlay protocols.
2
3Overlay protocol numbers uniquely identify the different kinds
4of protocols implemented to realize overlay service communication.
5
6This registry is used to ensure that the names and numeric values
7used to identify the protocols are uniquely defined and to
8allow implementors to find out details about the respective semantics and
9specifications.
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
20Number: 256
21Name: CADET
22Comment: CADET protocol.
23References: 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 @@
1GNUnet 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=================== ===========================================================
4Name GNUNET_OVERLAY_PROTOCOL_{{Name}}
5------------------- -----------------------------------------------------------
6Number {{Number}}
7Comment {{Comment}}
8References {{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 @@
1FILES=registry.rec gnunet_signatures.h 1FILES=gnunet_signatures.h gnunet_signatures.rst
2all: check $(FILES) 2all: check $(FILES)
3check: registry.rec 3check:
4 recfix --check registry.rec 4 recfix --check registry.rec
5distclean: 5distclean:
6 rm -f *.tmp 6 rm -f *.tmp
7clean: 7clean:
8 rm -f $(FILES) *.tmp 8 rm -f $(FILES) *.tmp
9gnunet_signatures.h.tmp: registry.rec h.template 9gnunet_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
12gnunet_signatures.h: h.header gnunet_signatures.h.tmp h.footer 12gnunet_signatures.h: h.header gnunet_signatures.h.tmp h.footer
13 cat $^ > $@ 13 cat h.header gnunet_signatures.h.tmp h.footer > $@
14
15gnunet_signatures.rst.tmp: registry.rec rst.template
16 ../format.sh rst.template 'Package = "GNUnet"' < registry.rec > $@
17
18rst.header.tmp:
19 cat README POLICY rst.header.template > $@
20
21gnunet_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 @@
1Policy
2^^^^^^
3
4Developers working on GNUnet or packages based on GNUnet should
5feel free to extend this registry. Entries may be deleted if
6no code using them is still expected to be in production anywhere.
7
8Updating the name of the package or subsystem is allowed provided
9that the code using the signature is being moved, as those fields
10are 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 @@
1GNUnet Signature Purposes
2-------------------------
3
1GNUnet signature purpose registry. 4GNUnet signature purpose registry.
2 5
3Every time a signature is created or verified with libgnunetutil's 6Every time a signature is created or verified with libgnunetutil's
@@ -5,3 +8,4 @@ signature functions, the signer must provide a "purpose" that provides
5the context for the signature. By signing over the "purpose", it is 8the context for the signature. By signing over the "purpose", it is
6not possible for an adversary to use a signature made in one context 9not possible for an adversary to use a signature made in one context
7in another context. 10in 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
24extern "C" { 35extern "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 */
35enum 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
19Number: 0 23Number: 0
20Name: TEST 24Name: TEST
21Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value). 25Comment: Test signature, not valid for anything other than writing a test. (Note that the signature verification code will accept this value).
26Package: GNUnet
22Subsystem: GNUnet 27Subsystem: GNUnet
23 28
24Number: 1 29Number: 1
25Name: TRANSPORT_PONG_OWN 30Name: TRANSPORT_PONG_OWN
26Comment: Signature for confirming that this peer uses a particular address. 31Comment: Signature for confirming that this peer uses a particular address.
32Package: GNUnet
27Subsystem: GNUnet-TRANSPORT 33Subsystem: GNUnet-TRANSPORT
28 34
29Number: 2 35Number: 2
30Name: TRANSPORT_DISCONNECT 36Name: TRANSPORT_DISCONNECT
31Comment: Signature for confirming that this peer intends to disconnect. 37Comment: Signature for confirming that this peer intends to disconnect.
38Package: GNUnet
32Subsystem: GNUnet-TRANSPORT 39Subsystem: GNUnet-TRANSPORT
33 40
34Number: 3 41Number: 3
35Name: REVOCATION 42Name: GNS_REVOCATION
36Comment: Signature for confirming a key revocation. 43Comment: GNS zone key revocation
37Subsystem: GNUnet-Revocation 44Package: GNUnet
45Subsystem: GNS
38 46
39Number: 4 47Number: 4
40Name: NAMESPACE_ADVERTISEMENT 48Name: NAMESPACE_ADVERTISEMENT
41Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner). 49Comment: Signature for a namespace/pseudonym advertisement (by the namespace owner).
50Package: GNUnet
42Subsystem: GNUnet-FS 51Subsystem: GNUnet-FS
43 52
44Number: 5 53Number: 5
45Name: PEER_PLACEMENT 54Name: PEER_PLACEMENT
46Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs. 55Comment: Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation URIs.
56Package: GNUnet
47Subsystem: GNUnet-FS 57Subsystem: GNUnet-FS
48 58
59Number: 6
60Name: DHT_HOP
61Comment: Signature by which a peer affirms that it forwarded a message in the DHT.
62Package: GNUnet
63Subsystem: GNUnet-DHT
64
65Number: 7
66Name: HELLO
67Comment: Signature by which a peer affirms its address.
68Package: GNUnet
69Subsystem: GNUnet-HELLO
70
49Number: 11 71Number: 11
50Name: DNS_RECORD 72Name: DNS_RECORD
51Comment: Signature on a GNUNET_DNS_Advertisement. 73Comment: Signature on a GNUNET_DNS_Advertisement.
74Package: GNUnet
52Subsystem: GNUnet-DNS+Exit 75Subsystem: GNUnet-DNS+Exit
53 76
77Number: 12
78Name: CHAT_MESSAGE
79Comment: Signature of a chat message.
80Package: GNUnet
81Subsystem: GNUnet-MESSENGER
82
83Number: 13
84Name: CHAT_RECEIPT
85Comment: Signature of confirmation receipt for a chat message.
86Package: GNUnet
87Subsystem: GNUnet-MESSENGER
88
54Number: 14 89Number: 14
55Name: NSE_SEND 90Name: NSE_SEND
56Comment: Signature of a network size estimate message. 91Comment: Signature of a network size estimate message.
92Package: GNUnet
57Subsystem: GNUnet-NSE 93Subsystem: GNUnet-NSE
58 94
59Number: 15 95Number: 15
60Name: GNS_RECORD_SIGN 96Name: GNS_RECORD_SIGN
61Comment: Signature of a gnunet naming system record block 97Comment: GNS record set signature
62Subsystem: GNUnet-GNSRECORD 98Package: GNUnet
99Subsystem: GNS
63 100
64Number: 16 101Number: 16
65Name: SET_ECC_KEY 102Name: SET_ECC_KEY
66Comment: Purpose is to set a session key. 103Comment: Purpose is to set a session key.
104Package: GNUnet
67Subsystem: GNUnet-CORE 105Subsystem: GNUnet-CORE
68 106
69Number: 17 107Number: 17
70Name: FS_UBLOCK 108Name: FS_UBLOCK
71Comment: UBlock Signature, done using DSS, not ECC 109Comment: UBlock Signature, done using DSS, not ECC
110Package: GNUnet
72Subsystem: GNUnet-FS 111Subsystem: GNUnet-FS
73 112
74Number: 18 113Number: 18
75Name: REGEX_ACCEPT 114Name: REGEX_ACCEPT
76Comment: Accept state in regex DFA. Peer affirms that it offers the matching service. 115Comment: Accept state in regex DFA. Peer affirms that it offers the matching service.
116Package: GNUnet
77Subsystem: GNUnet-REGEX 117Subsystem: GNUnet-REGEX
78 118
79Number: 20 119Number: 20
80Name: CONVERSATION_RING 120Name: CONVERSATION_RING
81Comment: Signature of a conversation ring. 121Comment: Signature of a conversation ring.
122Package: GNUnet
82Subsystem: GNUnet-CONVERSATION 123Subsystem: GNUnet-CONVERSATION
83 124
84Number: 21 125Number: 21
85Name: SECRETSHARING_DKG1 126Name: SECRETSHARING_DKG1
86Comment: Signature for the first round of distributed key generation. 127Comment: Signature for the first round of distributed key generation.
128Package: GNUnet
87Subsystem: GNUnet-SECRETSHARING 129Subsystem: GNUnet-SECRETSHARING
88 130
89Number: 22 131Number: 22
90Name: SECRETSHARING_DKG2 132Name: SECRETSHARING_DKG2
91Comment: Signature for the second round of distributed key generation. 133Comment: Signature for the second round of distributed key generation.
134Package: GNUnet
92Subsystem: GNUnet-SECRETSHARING 135Subsystem: GNUnet-SECRETSHARING
93 136
94Number: 23 137Number: 23
95Name: SECRETSHARING_DECRYPTION 138Name: SECRETSHARING_DECRYPTION
96Comment: Signature for the cooperative decryption. 139Comment: Signature for the cooperative decryption.
140Package: GNUnet
97Subsystem: GNUnet-SECRETSHARING 141Subsystem: GNUnet-SECRETSHARING
98 142
99Number: 27 143Number: 27
100Name: RECLAIM_CODE_SIGN 144Name: RECLAIM_CODE_SIGN
101Comment: Signature for a GNUid Ticket 145Comment: Signature for a GNUid Ticket
146Package: GNUnet
102Subsystem: Reclaim 147Subsystem: Reclaim
103 148
104Number: 28 149Number: 28
105Name: DELEGATE 150Name: DELEGATE
106Comment: Signature for a GNUnet credential 151Comment: Signature for a GNUnet credential
152Package: GNUnet
107Subsystem: Reclaim 153Subsystem: Reclaim
108 154
109Number: 29 155Number: 29
110Name: TRANSPORT_ADDRESS 156Name: TRANSPORT_ADDRESS
111Comment: Signature by a peer affirming that this is one of its addresses for the given time period. 157Comment: Signature by a peer affirming that this is one of its addresses for the given time period.
158Package: GNUnet
112Subsystem: GNUnet-TRANSPORT 159Subsystem: GNUnet-TRANSPORT
113 160
114Number: 30 161Number: 30
115Name: TRANSPORT_EPHEMERAL 162Name: TRANSPORT_EPHEMERAL
116Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service. 163Comment: Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transport service.
164Package: GNUnet
117Subsystem: GNUnet-TRANSPORT 165Subsystem: GNUnet-TRANSPORT
118 166
119Number: 31 167Number: 31
120Name: COMMUNICATOR_TCP_HANDSHAKE 168Name: COMMUNICATOR_TCP_HANDSHAKE
121Comment: Signature used by TCP communicator handshake. 169Comment: Signature used by TCP communicator handshake.
170Package: GNUnet
122Subsystem: GNUnet-TRANSPORT-TCP 171Subsystem: GNUnet-TRANSPORT-TCP
123 172
124Number: 32 173Number: 32
125Name: COMMUNICATOR_TCP_REKEY 174Name: COMMUNICATOR_TCP_REKEY
126Comment: Signature used by TCP communicator rekey. 175Comment: Signature used by TCP communicator rekey.
176Package: GNUnet
127Subsystem: GNUnet-TRANSPORT-TCP 177Subsystem: GNUnet-TRANSPORT-TCP
128 178
129Number: 33 179Number: 33
130Name: COMMUNICATOR_UDP_HANDSHAKE 180Name: COMMUNICATOR_UDP_HANDSHAKE
131Comment: Signature used by UDP communicator handshake. 181Comment: Signature used by UDP communicator handshake.
182Package: GNUnet
132Subsystem: GNUnet-TRANSPORT-UDP 183Subsystem: GNUnet-TRANSPORT-UDP
133 184
134Number: 34 185Number: 34
135Name: COMMUNICATOR_UDP_BROADCAST 186Name: COMMUNICATOR_UDP_BROADCAST
136Comment: Signature used by UDP broadcasts. 187Comment: Signature used by UDP broadcasts.
188Package: GNUnet
137Subsystem: GNUnet-TRANSPORT-UDP 189Subsystem: GNUnet-TRANSPORT-UDP
138 190
139Number: 35 191Number: 35
140Name: TRANSPORT_CHALLENGE 192Name: TRANSPORT_CHALLENGE
141Comment: 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). 193Comment: 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).
194Package: GNUnet
142Subsystem: GNUnet-TRANSPORT 195Subsystem: GNUnet-TRANSPORT
143 196
144Number: 36 197Number: 36
145Name: TRANSPORT_DV_HOP 198Name: TRANSPORT_DV_HOP
146Comment: Signature by a peer affirming that it is on a DV path. 199Comment: Signature by a peer affirming that it is on a DV path.
200Package: GNUnet
147Subsystem: GNUnet-TRANSPORT 201Subsystem: GNUnet-TRANSPORT
148 202
149Number: 37 203Number: 37
150Name: TRANSPORT_DV_INITIATOR 204Name: TRANSPORT_DV_INITIATOR
151Comment: Signature by a peer affirming that it originated the DV path. 205Comment: Signature by a peer affirming that it originated the DV path.
206Package: GNUnet
152Subsystem: GNUnet-TRANSPORT 207Subsystem: GNUnet-TRANSPORT
153 208
154Number: 38 209Number: 38
155Name: CADET_CONNECTION_INITIATOR 210Name: CADET_CONNECTION_INITIATOR
156Comment: Signature by a peer that like to create a connection. 211Comment: Signature by a peer that like to create a connection.
212Package: GNUnet
157Subsystem: GNUnet-CADET 213Subsystem: GNUnet-CADET
158 214
159Number: 39 215Number: 39
160Name: COMMUNICATOR_TCP_HANDSHAKE_ACK 216Name: COMMUNICATOR_TCP_HANDSHAKE_ACK
161Comment: Signature by a peer sending back the nonce received at initial handshake. 217Comment: Signature by a peer sending back the nonce received at initial handshake.
218Package: GNUnet
162Subsystem: GNUnet-TRANSPORT-TCP 219Subsystem: GNUnet-TRANSPORT-TCP
220
221#-----------------------------------------------------------------------------
222# GNU Taler, >= 1000
223
224#
225# Exchange offline signatures (with master key)
226#
227
228Number: 1017
229Name: MASTER_AML_KEY
230Comment: Initialize or update the status of an AML key for an AML officer
231Package: GNU Taler
232
233Number: 1018
234Name: MASTER_DRAIN_PROFIT
235Comment: Affirm wiring of exchange profits to operator account.
236Package: GNU Taler
237
238Number: 1019
239Name: MASTER_PARTNER_DETAILS
240Comment: Signature affirming a partner configuration for wads.
241Package: GNU Taler
242
243Number: 1020
244Name: MASTER_SIGNING_KEY_REVOKED
245Comment: The given revocation key was revoked and must no longer be used.
246Package: GNU Taler
247
248Number: 1021
249Name: MASTER_ADD_WIRE
250Comment: Add payto URI to the list of our wire methods.
251Package: GNU Taler
252
253Number: 1022
254Name: MASTER_GLOBAL_FEES
255Comment: Signature over global set of fees charged by the exchange.
256Package: GNU Taler
257
258Number: 1023
259Name: MASTER_DEL_WIRE
260Comment: Remove payto URI from the list of our wire methods.
261Package: GNU Taler
262
263Number: 1024
264Name: MASTER_SIGNING_KEY_VALIDITY
265Comment: Purpose for signing public keys signed by the exchange master key.
266Package: GNU Taler
267
268Number: 1025
269Name: MASTER_DENOMINATION_KEY_VALIDITY
270Comment: Purpose for denomination keys signed by the exchange master key.
271Package: GNU Taler
272
273Number: 1026
274Name: MASTER_ADD_AUDITOR
275Comment: Add an auditor to the list of our auditors.
276Package: GNU Taler
277
278Number: 1027
279Name: MASTER_DEL_AUDITOR
280Comment: Remove an auditor from the list of our auditors.
281Package: GNU Taler
282
283Number: 1028
284Name: MASTER_WIRE_FEES
285Comment: Fees charged per (aggregate) wire transfer to the merchant.
286Package: GNU Taler
287
288Number: 1029
289Name: MASTER_DENOMINATION_KEY_REVOKED
290Comment: The given revocation key was revoked and must no longer be used.
291Package: GNU Taler
292
293Number: 1030
294Name: MASTER_WIRE_DETAILS
295Comment: Signature where the Exchange confirms its IBAN details in the /wire response.
296Package: GNU Taler
297
298Number: 1031
299Name: MASTER_EXTENSION
300Comment: Set the configuration of an extension (age-restriction or peer2peer)
301Package: GNU Taler
302
303
304#
305# Exchange online signatures (with signing key)
306#
307
308Number: 1032
309Name: EXCHANGE_RESERVE_STATUS
310Comment: Purpose for the state of a reserve, signed by the exchange's signing key.
311Package: GNU Taler
312
313Number: 1033
314Name: EXCHANGE_CONFIRM_DEPOSIT
315Comment: Signature where the Exchange confirms a deposit request.
316Package: GNU Taler
317
318Number: 1034
319Name: EXCHANGE_CONFIRM_MELT
320Comment: Signature where the exchange (current signing key) confirms the no-reveal index for cut-and-choose and the validity of the melted coins.
321Package: GNU Taler
322
323Number: 1035
324Name: EXCHANGE_KEY_SET
325Comment: Signature where the Exchange confirms the full /keys response set.
326Package: GNU Taler
327
328Number: 1036
329Name: EXCHANGE_CONFIRM_WIRE
330Comment: Signature where the Exchange confirms the /track/transaction response.
331Package: GNU Taler
332
333Number: 1037
334Name: EXCHANGE_CONFIRM_WIRE_DEPOSIT
335Comment: Signature where the Exchange confirms the /wire/deposit response.
336Package: GNU Taler
337
338Number: 1038
339Name: EXCHANGE_CONFIRM_REFUND
340Comment: Signature where the Exchange confirms a refund request.
341Package: GNU Taler
342
343Number: 1039
344Name: EXCHANGE_CONFIRM_RECOUP
345Comment: Signature where the Exchange confirms a recoup.
346Package: GNU Taler
347
348Number: 1040
349Name: EXCHANGE_RESERVE_CLOSED
350Comment: Signature where the Exchange confirms it closed a reserve.
351Package: GNU Taler
352
353Number: 1041
354Name: EXCHANGE_CONFIRM_RECOUP_REFRESH
355Comment: Signature where the Exchange confirms a recoup-refresh operation.
356Package: GNU Taler
357
358Number: 1042
359Name: EXCHANGE_AFFIRM_DENOM_UNKNOWN
360Comment: Signature where the Exchange confirms that it does not know a denomination (hash).
361Package: GNU Taler
362
363Number: 1043
364Name: EXCHANGE_AFFIRM_DENOM_EXPIRED
365Comment: Signature where the Exchange confirms that it does not consider a denomination valid for the given operation at this time.
366Package: GNU Taler
367
368Number: 1044
369Name: EXCHANGE_ACCOUNT_SETUP_SUCCESS
370Comment: Signature by which an exchange affirms that an account successfully passed the KYC checks.
371Package: GNU Taler
372
373Number: 1045
374Name: EXCHANGE_CONFIRM_PURSE_CREATION
375Comment: Signature by which the exchange affirms that a purse was created with a certain amount deposited into it.
376Package: GNU Taler
377
378Number: 1046
379Name: EXCHANGE_CONFIRM_PURSE_MERGED
380Comment: Signature by which the exchange affirms that a purse was merged into a reserve with a certain amount in it.
381Package: GNU Taler
382
383Number: 1047
384Name: EXCHANGE_PURSE_STATUS
385Comment: Purpose for the state of a purse, signed by the exchange's signing key.
386Package: GNU Taler
387
388Number: 1048
389Name: EXCHANGE_RESERVE_ATTEST_DETAILS
390Comment: Signature by which the exchange attests identity attributes of a particular reserve owner.
391Package: GNU Taler
392
393Number: 1049
394Name: EXCHANGE_CONFIRM_PURSE_REFUND
395Comment: Signature by which the exchange confirms that a purse expired and a coin was refunded.
396Package: GNU Taler
397
398Number: 1050
399Name: EXCHANGE_CONFIRM_AGE_WITHDRAW
400Comment: Signature where the Exchange confirms an age-withdraw.
401Package: GNU Taler
402
403#
404# Auditor signatures
405#
406
407Number: 1064
408Name: AUDITOR_EXCHANGE_KEYS
409Comment: Signature where the auditor confirms that he is aware of certain denomination keys from the exchange.
410Package: GNU Taler
411
412#
413# Merchant signatures
414#
415
416Number: 1101
417Name: MERCHANT_CONTRACT
418Comment: Signature where the merchant confirms a contract (to the customer).
419Package: GNU Taler
420
421Number: 1102
422Name: MERCHANT_REFUND
423Comment: Signature where the merchant confirms a refund (of a coin).
424Package: GNU Taler
425
426Number: 1103
427Name: MERCHANT_TRACK_TRANSACTION
428Comment: Signature where the merchant confirms that he needs the wire transfer identifier for a deposit operation.
429Package: GNU Taler
430
431Number: 1104
432Name: MERCHANT_PAYMENT_OK
433Comment: Signature where the merchant confirms that the payment was successful
434Package: GNU Taler
435
436Number: 1107
437Name: MERCHANT_WIRE_DETAILS
438Comment: Signature where the merchant confirms its own (salted) wire details (not yet really used).
439Package: GNU Taler
440
441#
442# Wallet signatures
443#
444
445Number: 1200
446Name: WALLET_RESERVE_WITHDRAW
447Comment: Signature where the reserve key confirms a withdraw request. Signed with the reserve private key.
448Package: GNU Taler
449
450Number: 1201
451Name: WALLET_COIN_DEPOSIT
452Comment: Signature made by the wallet of a user to confirm a deposit of a coin.
453Package: GNU Taler
454
455Number: 1202
456Name: WALLET_COIN_MELT
457Comment: Signature using a coin key confirming the melting of a coin. Signed with the coin's private key.
458Package: GNU Taler
459
460Number: 1203
461Name: WALLET_COIN_RECOUP
462Comment: Signature using a coin key requesting recoup. Signed with the coin's private key.
463Package: GNU Taler
464
465Number: 1204
466Name: WALLET_COIN_LINK
467Comment: Signature using a coin key authenticating link data. Signed with the old coin's private key.
468Package: GNU Taler
469
470Number: 1205
471Name: WALLET_ACCOUNT_SETUP
472Comment: 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.
473Package: GNU Taler
474
475Number: 1206
476Name: WALLET_COIN_RECOUP_REFRESH
477Comment: Signature using a coin key requesting recoup-refresh. Signed with the coin private key.
478Package: GNU Taler
479
480Number: 1207
481Name: WALLET_AGE_ATTESTATION
482Comment: Signature using a age restriction key for attestation of a particular age/age-group.
483Package: GNU Taler
484
485Number: 1208
486Name: WALLET_RESERVE_HISTORY
487Comment: Request full or partial reserve history. Signed with the reserve private key.
488Package: GNU Taler
489
490Number: 1209
491Name: WALLET_COIN_HISTORY
492Comment: Request full or partial coin history. Signed with the coin private key.
493Package: GNU Taler
494
495Number: 1210
496Name: WALLET_PURSE_CREATE
497Comment: Request purse creation (without reserve). Signed by the purse private key.
498Package: GNU Taler
499
500Number: 1211
501Name: WALLET_PURSE_DEPOSIT
502Comment: Request coin to be deposited into a purse. Signed with the coin private key.
503Package: GNU Taler
504
505Number: 1212
506Name: WALLET_PURSE_STATUS
507Comment: Request purse status. Signed with the purse private key.
508Package: GNU Taler
509
510Number: 1213
511Name: WALLET_PURSE_MERGE
512Comment: Request purse to be merged with a reserve. Signed with the purse private key.
513Package: GNU Taler
514
515Number: 1214
516Name: WALLET_ACCOUNT_MERGE
517Comment: Request purse to be merged with a reserve. Signed by the reserve private key.
518Package: GNU Taler
519
520Number: 1215
521Name: WALLET_RESERVE_CLOSE
522Comment: Request account to be closed. Signed with the reserve private key.
523Package: GNU Taler
524
525Number: 1216
526Name: WALLET_PURSE_ECONTRACT
527Comment: Associates encrypted contract with a purse. Signed with the purse private key.
528Package: GNU Taler
529
530Number: 1217
531Name: WALLET_RESERVE_OPEN
532Comment: Request reserve to be kept open. Signed with the reserve private key.
533Package: GNU Taler
534
535Number: 1218
536Name: WALLET_RESERVE_OPEN_DEPOSIT
537Comment: Request coin to be used to pay for reserve to be kept open. Signed with the coin private key.
538Package: GNU Taler
539
540Number: 1219
541Name: WALLET_RESERVE_ATTEST_DETAILS
542Comment: Request attestation about reserve owner. Signed by the reserve private key.
543Package: GNU Taler
544
545Number: 1220
546Name: WALLET_PURSE_DELETE
547Comment: Signature by which a wallet requests a purse to be deleted.
548Package: GNU Taler
549
550Number: 1221
551Name: WALLET_RESERVE_AGE_WITHDRAW
552Comment: Signature where the reserve key confirms an age-withdraw request. Signed with the reserve private key.
553Package: GNU Taler
554
555#
556# Security module signatures
557#
558
559Number: 1250
560Name: SM_RSA_DENOMINATION_KEY
561Comment: Signature on a denomination key announcement.
562Package: GNU Taler
563
564Number: 1251
565Name: SM_SIGNING_KEY
566Comment: Signature on an exchange message signing key announcement.
567Package: GNU Taler
568
569Number: 1252
570Name: SM_CS_DENOMINATION_KEY
571Comment: Signature on a denomination key announcement.
572Package: GNU Taler
573
574#
575# Test signatures
576#
577
578Number: 1302
579Name: CLIENT_TEST_EDDSA
580Comment: EdDSA test signature.
581Package: GNU Taler
582
583Number: 1303
584Name: EXCHANGE_TEST_EDDSA
585Comment: EdDSA test signature.
586Package: GNU Taler
587
588#
589# AML officer signatures
590#
591
592Number: 1350
593Name: AML_DECISION
594Comment: Signature by which an AML officer signs an AML decision.
595Package: GNU Taler
596
597Number: 1351
598Name: AML_QUERY
599Comment: Signature by which an AML officer requests AML data.
600Package: GNU Taler
601
602
603#
604# GNU Anastasis signatures, >= 1400
605#
606
607Number: 1400
608Name: ANASTASIS_POLICY_UPLOAD
609Comment: EdDSA signature for a policy upload.
610Package: GNU Taler
611
612#
613# Sync signatures, >= 1450
614#
615
616Number: 1450
617Name: SYNC_BACKUP_UPLOAD
618Comment: EdDSA signature for a backup upload.
619Package: GNU Taler
620
621
622#
623# Donau signatures, >= 1500
624#
625
626Number: 1500
627Name: DONAU_DONATION_STATEMENT
628Comment: 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.
629Package: Donau
630
631Number: 1501
632Name: CHARITY_DONATION_CONFIRMATION
633Comment: 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.
634Package: 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 @@
1Entries
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!
7iana.tmp: http-status-codes-1.csv 7iana.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
11iana-extended.tmp: iana.tmp 11iana-extended.tmp: iana.tmp
12 ./extend.sh $@ $^ 12 ./extend.sh $@ iana.tmp
13 13
14registry.rec: types.rec iana-extended.tmp extras.rec 14registry.rec: types.rec iana-extended.tmp extras.rec
15 cat $^ > $@ 15 cat types.rec iana-extended.tmp extras.rec > $@
16 16
17distclean: 17distclean:
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
27http-status-codes.h: h.header http-status-codes.h.tmp h.footer 27http-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 @@
1The main registry is populated from the IANA registry.
2
3The 'extras.rec' may be populated with additional status
4codes that have significant usage and do not conflict with
5IANA 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}
12TMPDIR=`pwd` 12TMPDIR=`pwd`
13export TMPDIR 13export TMPDIR
14 14
15for n in `seq 100 599` 15n=100
16while [ "$n" -le 599 ]
16do 17do
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`
20done 22done
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
39410,Gone,"[RFC7231, Section 6.5.9]" 39410,Gone,"[RFC7231, Section 6.5.9]"
40411,Length Required,"[RFC7231, Section 6.5.10]" 40411,Length Required,"[RFC7231, Section 6.5.10]"
41412,Precondition Failed,"[RFC7232, Section 4.2][RFC8144, Section 3.2]" 41412,Precondition Failed,"[RFC7232, Section 4.2][RFC8144, Section 3.2]"
42413,Payload Too Large,"[RFC7231, Section 6.5.11]" 42413,Content Too Large,"[RFC9110, Section 15.5.14]"
43414,URI Too Long,"[RFC7231, Section 6.5.12]" 43414,URI Too Long,"[RFC7231, Section 6.5.12]"
44415,Unsupported Media Type,"[RFC7231, Section 6.5.13][RFC7694, Section 3]" 44415,Unsupported Media Type,"[RFC7231, Section 6.5.13][RFC7694, Section 3]"
45416,Range Not Satisfiable,"[RFC7233, Section 4.4]" 45416,Range Not Satisfiable,"[RFC7233, Section 4.4]"
46417,Expectation Failed,"[RFC7231, Section 6.5.14]" 46417,Expectation Failed,"[RFC7231, Section 6.5.14]"
47418-420,Unassigned, 47418-420,Unassigned,
48421,Misdirected Request,"[RFC7540, Section 9.1.2]" 48421,Misdirected Request,"[RFC7540, Section 9.1.2]"
49422,Unprocessable Entity,[RFC4918] 49422,Unprocessable Content,"[RFC9110, Sectio 15.5.21]"
50423,Locked,[RFC4918] 50423,Locked,[RFC4918]
51424,Failed Dependency,[RFC4918] 51424,Failed Dependency,[RFC4918]
52425,Too Early,[RFC8470] 52425,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############################################
2The 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 @@
1FILES=payto_payment_target_types.rst
2all: check $(FILES)
3
4
1check: 5check:
2 recfix --check registry.rec 6 recfix --check registry.rec
7
8distclean:
9 rm -f *.tmp
10
11clean:
12 rm -f $(FILES) *.tmp
13
14payto_payment_target_types.rst.tmp: registry.rec rst.template
15 ../format.sh rst.template < registry.rec > $@
16
17payto_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
5Name: eth
6
7Description: 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
36Syntax:
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
52Examples:
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
75Motivation - not normative
76
77This syntax is modeled after the ERC-681 URL format
78for transaction requests, commonly used in Ethereum
79wallets and DApps. The function and function parameters
80are not included in this URI type, since they are not
81needed for payment requests.
82
83The chain ID is included in the URI, to prevent replay
84attacks between different chains. The checksum address
85is included in the URI, to prevent typos and other
86errors in the address. The checksum address is also
87included in the URI, to prevent phishing attacks by
88displaying the address in a different case than the
89one used to create the address.
90
91The currency is included in the URI, to allow payments
92to be made in any ERC-20 token. Three-letter currency
93codes are not included, since they are not valid ERC-20
94token addresses. Should sending traditional currencies
95be desired, Stablecoins are often ERC-20 tokens, and are
96therefore valid currencies for this URI type.
97
98
99Contact: <gavinnjohn@gmail.com>
100
101
102Normative 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
116Informative 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
37Name: ldap 37Name: ldap
38Reference: ldap.txt 38Reference: ldap.txt
39Contact: ietf@pep.security 39Contact: ietf@pep.security
40
41Name: eth
42Reference: eth.txt
43Contact: gavinnjohn@gmail.com
44
45Name: interac-etransfer
46Reference: TBD
47Contact: singpolyma@singpolyma.net
48
49Name: wallee-transaction
50Reference: wallee-transaction.txt
51Contact: 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 @@
1GNU Taler Payment Target Types
2------------------------------
3
4Entries
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
5Name: wallee-transaction
6
7Description: 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
18Syntax:
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
26Examples:
27
28 payto://wallee-transaction/18446744073709551616
29 payto://wallee-transaction/13434452243525552616
30
31
32Contact: <mailto:habej2@bfh.ch>
33
34
35Normative References
36
37* [RFC 8905] The 'payto' URI Scheme for Payments
38 <https://tools.ietf.org/html/rfc8905>
39
40Informative 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 @@
1Registries
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