Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
ebbe00c0
Unverified
Commit
ebbe00c0
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
interface doc improvements
parent
1eeeb082
No related branches found
No related tags found
1 merge request
!135
Consistent voucher-redemption ZKAP count
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/interface.rst
+18
-7
18 additions, 7 deletions
docs/source/interface.rst
with
18 additions
and
7 deletions
docs/source/interface.rst
+
18
−
7
View file @
ebbe00c0
...
@@ -42,15 +42,20 @@ If the voucher is not known then the response is **NOT FOUND**.
...
@@ -42,15 +42,20 @@ If the voucher is not known then the response is **NOT FOUND**.
For any voucher which has previously been submitted,
For any voucher which has previously been submitted,
the response is **OK** with an ``application/json`` content-type response body like::
the response is **OK** with an ``application/json`` content-type response body like::
{ "number": <string>
{ "version": 1
, "number": <string>
, "expected-tokens": <integer>
, "expected-tokens": <integer>
, "created": <iso8601 timestamp>
, "created": <iso8601 timestamp>
, "state": <state object>
, "state": <state object>
, "version": 1
}
}
The ``version`` property indicates the semantic version of the data being returned.
When properties are removed or the meaning of a property is changed,
the value of the ``version`` property will be incremented.
The addition of new properties is **not** accompanied by a bumped version number.
The ``number`` property merely indicates the voucher which was requested.
The ``number`` property merely indicates the voucher which was requested.
The ``expected-tokens`` property indicates the total number of ZKAPs
the client
for which the client intends to redeem the voucher.
The ``expected-tokens`` property indicates the total number of ZKAPs for which the client intends to redeem the voucher.
Vouchers created using old versions of ZKAPAuthorizer will have a best-guess value here because the real value was not recorded.
Vouchers created using old versions of ZKAPAuthorizer will have a best-guess value here because the real value was not recorded.
The ``created`` property indicates when the voucher was first added to the node.
The ``created`` property indicates when the voucher was first added to the node.
The ``state`` property is an object that gives more details about the current state of the voucher.
The ``state`` property is an object that gives more details about the current state of the voucher.
...
@@ -69,6 +74,7 @@ The integer *counter* value indicates how many successful sub-redemptions have c
...
@@ -69,6 +74,7 @@ The integer *counter* value indicates how many successful sub-redemptions have c
, "counter": <integer>
, "counter": <integer>
}
}
The *started* timestamp gives the time when the most recent redemption attempt began.
The integer *counter* value has the same meaning as it does for the *pending* state.
The integer *counter* value has the same meaning as it does for the *pending* state.
::
::
...
@@ -78,18 +84,25 @@ The integer *counter* value has the same meaning as it does for the *pending* st
...
@@ -78,18 +84,25 @@ The integer *counter* value has the same meaning as it does for the *pending* st
, "token-count": <number>
, "token-count": <number>
}
}
The *finished* timestamp gives the time when redemption completed successfully.
The integer *token-count* gives the number tokens for which the voucher was redeemed.
::
::
{ "name": "double-spend"
{ "name": "double-spend"
, "finished": <iso8601 timestamp>
, "finished": <iso8601 timestamp>
}
}
The *finished* timestamp gives the time when the double-spend error was encountered.
::
::
{ "name": "unpaid"
{ "name": "unpaid"
, "finished": <iso8601 timestamp>
, "finished": <iso8601 timestamp>
}
}
The *finished* timestamp gives the time when the unpaid error was encountered.
::
::
{ "name": "error"
{ "name": "error"
...
@@ -97,10 +110,8 @@ The integer *counter* value has the same meaning as it does for the *pending* st
...
@@ -97,10 +110,8 @@ The integer *counter* value has the same meaning as it does for the *pending* st
, "details": <text>
, "details": <text>
}
}
The ``version`` property indicates the semantic version of the data being returned.
The *finished* timestamp gives the time when this other error condition was encountered.
When properties are removed or the meaning of a property is changed,
The *details* string may give additional details about what the error was.
the value of the ``version`` property will be incremented.
The addition of new properties is **not** accompanied by a bumped version number.
``GET /storage-plugins/privatestorageio-zkapauthz-v1/voucher``
``GET /storage-plugins/privatestorageio-zkapauthz-v1/voucher``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment