taler-docs

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

commit e47cb8b07c1087ecf0d6e5948d68d8cded451d10
parent 4f21c967f1d167ed1f22d49602a04973d3f6f874
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 20 Jun 2025 15:44:47 +0200

adjust spec to better fit implementation for #9975 (coin history)

Diffstat:
Mcore/api-exchange.rst | 106+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
1 file changed, 69 insertions(+), 37 deletions(-)

diff --git a/core/api-exchange.rst b/core/api-exchange.rst @@ -2542,9 +2542,9 @@ Coin History // exchange, possibly zero if refunds are not allowed. refund_deadline?: Timestamp; - // Signature over `TALER_DepositRequestPS`, made by the customer with the - // `coin's private key <coin-priv>`. - coin_sig: EddsaSignature; + // Hash over the proposal data of the contract that + // is being paid. + h_contract_terms: HashCode; // Hash of the bank account from where we received the funds. h_wire: HashCode; @@ -2554,9 +2554,19 @@ Coin History // that is important to fix the coin's denomination. h_denom_pub: HashCode; - // Hash over the proposal data of the contract that - // is being paid. - h_contract_terms: HashCode; + // Hash over the deposit policy extension. Optional. + h_policy?: HashCode; + + // Hash over auxiliary wallet data provided by the wallet + // to complete the contract. Optional. + wallet_data_hash?: HashCode; + + // Hash over the age commitment of the coin. Optional. + h_age_commitment?: HashCode; + + // Signature over `TALER_DepositRequestPS`, made by the customer with the + // `coin's private key <coin-priv>`. + coin_sig: EddsaSignature; } @@ -2576,11 +2586,6 @@ Coin History // subtracting the amounts. amount: Amount; - // Signature by the coin over a - // `TALER_RefreshMeltCoinAffirmationPS` of - // purpose ``TALER_SIGNATURE_WALLET_COIN_MELT``. - coin_sig: EddsaSignature; - // Melt fee. melt_fee: Amount; @@ -2592,8 +2597,22 @@ Coin History // that is important to fix the coin's denomination. h_denom_pub: HashCode; - // Date when the operation was made. - timestamp: Timestamp; + // Seed from which the nonces for the n*κ coin candidates are derived + // from. + refresh_seed: HashCode; + + // Master seed for the Clause-Schnorr R-value + // Present if one of the fresh coin's + // denominations is of type Clause-Schnorr. + blinding_seed?: BlindingMasterSeed; + + // Hash over the age commitment of the coin. Optional. + h_age_commitment?: HashCode; + + // Signature by the coin over a + // `TALER_RefreshMeltCoinAffirmationPS` of + // purpose ``TALER_SIGNATURE_WALLET_COIN_MELT``. + coin_sig: EddsaSignature; } @@ -2621,6 +2640,9 @@ Coin History // is being refunded. h_contract_terms: HashCode; + // Public key of the merchant. + merchant_pub: EddsaPublicKey; + // Refund transaction ID. rtransaction_id: Integer; @@ -2649,8 +2671,13 @@ Coin History // the coin's denomination value. amount: Amount; - // Date when the operation was made. - timestamp: Timestamp; + // Signature by the exchange over a + // `TALER_RecoupConfirmationPS`, must be + // of purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP``. + exchange_sig: EddsaSignature; + + // Public key of the private key used to create 'exchange_sig'. + exchange_pub: EddsaPublicKey; // Signature by the coin over a // `TALER_RecoupRequestPS` with purpose @@ -2675,13 +2702,8 @@ Coin History // Reserve receiving the recoup. reserve_pub: EddsaPublicKey; - // Signature by the exchange over a - // `TALER_RecoupConfirmationPS`, must be - // of purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP``. - exchange_sig: EddsaSignature; - - // Public key of the private key used to create 'exchange_sig'. - exchange_pub: EddsaPublicKey; + // Date when the operation was made. + timestamp: Timestamp; } @@ -2731,8 +2753,15 @@ Coin History // the coin's denomination value. amount: Amount; - // Date when the operation was made. - timestamp: Timestamp; + // Signature by the exchange over a + // `TALER_RecoupRefreshConfirmationPS` + // of purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP_REFRESH``. + exchange_sig: EddsaSignature; + + // Public key used to sign 'exchange_sig'. + exchange_pub: EddsaPublicKey; + + // FIXME-#9828: implementation returns old_coin_pub here // Signature by the coin over a `TALER_RecoupRequestPS` // with purpose ``TALER_SIGNATURE_WALLET_COIN_RECOUP``. @@ -2753,19 +2782,15 @@ Coin History // Coin's index in the original withdraw request, starting at 0 coin_index: Integer; - // Signature by the exchange over a - // `TALER_RecoupRefreshConfirmationPS` - // of purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_RECOUP_REFRESH``. - exchange_sig: EddsaSignature; - - // Public key used to sign 'exchange_sig'. - exchange_pub: EddsaPublicKey; - // Blinding factor of the revoked new coin. new_coin_blinding_secret: DenominationBlindingKeySecret; // Blinded public key of the revoked new coin. new_coin_ev: DenominationBlindingKeySecret; + + // Date when the operation was made. + timestamp: Timestamp; + } .. ts:def:: CoinPurseDepositTransaction @@ -2786,14 +2811,21 @@ Coin History // the coin's denomination value. amount: Amount; + // Base URL of the exchange the purse lives at. + exchange_base_url: string; + + // The hash of the age-commitment for the coin. Only present + // if the denomination has support for age restriction. + h_age_commitment?: AgeCommitmentHash; + // Deposit fee. deposit_fee: Amount; // Public key of the purse. purse_pub: EddsaPublicKey; - // Date when the purse was set to expire. - purse_expiration: Timestamp; + // True if the deposit was refunded for any reason. + refunded: boolean; // Signature by the coin over a // `TALER_PurseDepositSignaturePS` of @@ -2828,9 +2860,6 @@ Coin History // fee will be waived. refund_fee: Amount; - // Public key of the purse that expired. - purse_pub: EddsaPublicKey; - // Signature by the exchange over a // ``TALER_CoinPurseRefundConfirmationPS`` // of purpose ``TALER_SIGNATURE_EXCHANGE_CONFIRM_PURSE_REFUND``. @@ -2839,6 +2868,9 @@ Coin History // Public key used to sign 'exchange_sig'. exchange_pub: EddsaPublicKey; + // Public key of the purse that expired. + purse_pub: EddsaPublicKey; + } .. ts:def:: CoinReserveOpenDepositTransaction