gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: wallet-core: fix format of pu


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: fix format of purse deposits
Date: Mon, 05 Sep 2022 13:26:12 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 27fb2d29 wallet-core: fix format of purse deposits
27fb2d29 is described below

commit 27fb2d297002d7440278933c15a894bfe1820629
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Sep 5 13:26:09 2022 +0200

    wallet-core: fix format of purse deposits
---
 packages/taler-util/src/talerTypes.ts                         | 9 ++++++---
 packages/taler-wallet-core/src/crypto/cryptoImplementation.ts | 7 ++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/packages/taler-util/src/talerTypes.ts 
b/packages/taler-util/src/talerTypes.ts
index 014631ad..471c7e92 100644
--- a/packages/taler-util/src/talerTypes.ts
+++ b/packages/taler-util/src/talerTypes.ts
@@ -1813,11 +1813,14 @@ export interface PurseDeposit {
   ub_sig: UnblindedSignature;
 
   /**
-   * Age commitment hash for the coin, if the denomination is age-restricted.
+   * Age commitment for the coin, if the denomination is age-restricted.
    */
-  h_age_commitment?: HashCodeString;
+  age_commitment?: string[];
 
-  // FIXME-Oec: proof of age is missing.
+  /**
+   * Attestation for the minimum age, if the denomination is age-restricted.
+   */
+  attest?: string;
 
   /**
    * Signature over TALER_PurseDepositSignaturePS
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts 
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index 6336539f..c6be1d46 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -1362,12 +1362,15 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
     const hExchangeBaseUrl = hash(stringToBytes(req.exchangeBaseUrl + "\0"));
     const deposits: PurseDeposit[] = [];
     for (const c of req.coins) {
+      let haveAch: boolean;
       let maybeAch: Uint8Array;
       if (c.ageCommitmentProof) {
+        haveAch = true;
         maybeAch = decodeCrock(
           AgeRestriction.hashCommitment(c.ageCommitmentProof.commitment),
         );
       } else {
+        haveAch = false;
         maybeAch = new Uint8Array(32);
       }
       const sigBlob = buildSigPS(TalerSignaturePurpose.WALLET_PURSE_DEPOSIT)
@@ -1387,7 +1390,9 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
         coin_sig: sigResp.sig,
         denom_pub_hash: c.denomPubHash,
         ub_sig: c.denomSig,
-        h_age_commitment: undefined,
+        age_commitment: c.ageCommitmentProof
+          ? c.ageCommitmentProof.commitment.publicKeys
+          : undefined,
       });
     }
     return {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]