diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-14 09:51:10 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-14 09:51:10 +0200 |
commit | 94ad7c8d89b8e0fcda8924ecf13deda53c4e0e3b (patch) | |
tree | 9731f109cf1f9c5f7569dfb05a887a71e81ece20 /api-common.rst | |
parent | 90133fced04faeee80ff696e5c4216e5d2d6fa0f (diff) | |
download | docs-94ad7c8d89b8e0fcda8924ecf13deda53c4e0e3b.tar.gz docs-94ad7c8d89b8e0fcda8924ecf13deda53c4e0e3b.tar.bz2 docs-94ad7c8d89b8e0fcda8924ecf13deda53c4e0e3b.zip |
improve API documentation
Diffstat (limited to 'api-common.rst')
-rw-r--r-- | api-common.rst | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/api-common.rst b/api-common.rst index 98320de5..97ba3dc9 100644 --- a/api-common.rst +++ b/api-common.rst @@ -68,7 +68,11 @@ handle the error as if an internal error (500) had been returned. .. code-block:: tsref interface ErrorDetail { - // Description of the error, i.e. "missing parameter", "commitment violation", ... + + // Numeric error code. See "taler_error_codes.h". + error_code: number; + + // Human-readable description of the error, i.e. "missing parameter", "commitment violation", ... // The other arguments are specific to the error value reported here. error: string; @@ -227,9 +231,14 @@ value and the denomination of the currency: .. sourcecode:: c - struct TALER_AmountNBO { + struct TALER_Amount { uint64_t value; uint32_t fraction; + uint8_t currency_code[12]; // i.e. "EUR" or "USD" + }; + struct TALER_AmountNBO { + uint64_t value; // in network byte order + uint32_t fraction; // in network byte order uint8_t currency_code[12]; }; @@ -243,9 +252,12 @@ denoting microseconds since the UNIX Epoch. `UINT64_MAX` represents "never" .. sourcecode:: c - struct GNUNET_TIME_AbsoluteNBO { + struct GNUNET_TIME_Absolute { uint64_t timestamp_us; }; + struct GNUNET_TIME_AbsoluteNBO { + uint64_t abs_value_us__; // in network byte order + }; Cryptographic primitives ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -257,7 +269,7 @@ uses 512-bit hash codes (64 bytes). .. sourcecode:: c struct GNUNET_HashCode { - uint8_t hash[64]; + uint8_t hash[64]; // usually SHA-512 }; struct TALER_ReservePublicKeyP { |