taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 5804dc623d51f887728f94325bd4322355b8a6ef
parent 9916b7fc1235581bc303396bb83423c3151df687
Author: Antoine A <>
Date:   Tue, 30 Jun 2026 11:58:57 +0200

prepared: add new signatures

Diffstat:
Mcore/api-common.rst | 37+++++++++++++++++++++++++++++++++++++
Mcore/bank-transfer/post-registration.rst | 7+++++--
Mcore/bank-transfer/post-unregistration.rst | 15++++++++-------
3 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/core/api-common.rst b/core/api-common.rst @@ -2406,3 +2406,39 @@ within the struct GNUNET_HashCode h_body; struct GNUNET_HashCode h_customer_payto; }; + +.. _TALER_PreparedTransferRegisterPS: +.. sourcecode:: c + + struct TALER_PreparedTransferRegisterPS { + /** + * Purpose is #TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_REGISTER + */ + struct GNUNET_CRYPTO_SignaturePurpose purpose; + struct TALER_NormalizedPayto credit_account; + struct TALER_AmountNBO credit_amount; + /** + * 1: reserve, 2: kyc + */ + uint32_t type; + /** + * 1: one-time, 2: recurrent + */ + uint16_t recurrent; + /** + * 1: EdDSA + */ + uint16_t alg; + union TALER_AccountPublicKeyP account_pub; + }; + +.. _TALER_PreparedTransferUnregisterPS: +.. sourcecode:: c + + struct TALER_PreparedTransferUnregisterPS { + /** + * Purpose is #TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_UNREGISTER + */ + struct GNUNET_CRYPTO_SignaturePurpose purpose; + struct GNUNET_TIME_TimestampNBO timestamp; + }; +\ No newline at end of file diff --git a/core/bank-transfer/post-registration.rst b/core/bank-transfer/post-registration.rst @@ -48,7 +48,9 @@ // Public key encoded inside the subject authorization_pub: EddsaPublicKey; - // Signature of the account_pub key using the authorization_pub private key + // This is a signature over + // a struct `TALER_PreparedTransferRegisterPS` with purpose + // ``TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_REGISTER``. authorization_sig: EddsaSignature; } @@ -58,11 +60,12 @@ Response is a `RegistrationResponse`. :http:statuscode:`400 Bad request`: Input data was invalid. + :http:statuscode:`403 Forbidden`: + * ``TALER_EC_BANK_BAD_SIGNATURE``: signature is invalid. :http:statuscode:`409 Conflict`: * ``TALER_EC_BANK_UNKNOWN_CREDITOR``: credit_account is unknown or not supported. * ``TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT``: the same reserve public key is already registered, you should retry using another key. * ``TALER_EC_BANK_DERIVATION_REUSE``: derived subject is already used, you should retry using another key. - * ``TALER_EC_BANK_BAD_SIGNATURE``: signature is invalid. **Details:** diff --git a/core/bank-transfer/post-unregistration.rst b/core/bank-transfer/post-unregistration.rst @@ -10,14 +10,14 @@ .. ts:def:: Unregistration interface Unregistration { - // Current timestamp in the ISO 8601 - timestamp: string; + timestamp: Timestamp; // Public key used for registration authorization_pub: EddsaPublicKey; - // Signature of the timestamp using the authorization_pub private key - // Prevent replay attack + // This is a signature over + // a struct `TALER_PreparedTransferUnregisterPS` with purpose + // ``TALER_SIGNATURE_WALLET_PREPARED_TRANSFER_UNREGISTER``. authorization_sig: EddsaSignature; } @@ -27,8 +27,9 @@ The registration have been deleted. :http:statuscode:`400 Bad request`: Input data was invalid. + :http:statuscode:`403 Forbidden`: + * ``TALER_EC_BANK_BAD_SIGNATURE``: signature is invalid. :http:statuscode:`404 Not found`: Unknown registration. :http:statuscode:`409 Conflict`: - * ``TALER_EC_BANK_OLD_TIMESTAMP``: the timestamp is too old. - * ``TALER_EC_BANK_BAD_SIGNATURE``: signature is invalid. -\ No newline at end of file + * ``TALER_EC_BANK_OLD_TIMESTAMP``: the timestamp is too old. +\ No newline at end of file