gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: include age commitment proof


From: gnunet
Subject: [taler-wallet-core] branch master updated: include age commitment proof in refreshed coins
Date: Thu, 08 Sep 2022 14:02:18 +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 9b2d6d76 include age commitment proof in refreshed coins
9b2d6d76 is described below

commit 9b2d6d766f0192923d337ab8c69a332ebdc20bf1
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Sep 8 14:02:09 2022 +0200

    include age commitment proof in refreshed coins
---
 packages/taler-util/src/walletTypes.ts             |  2 ++
 .../test-age-restrictions-merchant.ts              | 22 ++++++++++++++++++++++
 .../src/crypto/cryptoImplementation.ts             |  1 +
 .../taler-wallet-core/src/operations/pending.ts    |  2 --
 .../taler-wallet-core/src/operations/refresh.ts    |  1 +
 5 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/walletTypes.ts 
b/packages/taler-util/src/walletTypes.ts
index 7ca56b4f..95772a58 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -1154,6 +1154,8 @@ export interface RefreshPlanchetInfo {
    * Blinding key used.
    */
   blindingKey: string;
+
+  ageCommitmentProof?: AgeCommitmentProof;
 }
 
 /**
diff --git 
a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts
 
b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts
index 27c36ae4..01ddac4d 100644
--- 
a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts
+++ 
b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts
@@ -43,6 +43,28 @@ export async function runAgeRestrictionsMerchantTest(t: 
GlobalTestState) {
   const walletTwo = new WalletCli(t, "walletTwo");
   const walletThree = new WalletCli(t, "walletThree");
 
+  {
+    const walletZero = new WalletCli(t, "walletZero");
+
+    await withdrawViaBank(t, {
+      wallet: walletZero,
+      bank,
+      exchange,
+      amount: "TESTKUDOS:20",
+      restrictAge: 13,
+    });
+
+    const order = {
+      summary: "Buy me!",
+      amount: "TESTKUDOS:5",
+      fulfillment_url: "taler://fulfillment-success/thx",
+      minimum_age: 9,
+    };
+
+    await makeTestPayment(t, { wallet: walletZero, merchant, order });
+    await walletZero.runUntilDone();
+  }
+
   {
     const wallet = walletOne;
 
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts 
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index c6be1d46..4ec24a98 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -1208,6 +1208,7 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
             coinPriv: encodeCrock(coinPriv),
             coinPub: encodeCrock(coinPub),
             coinEvHash: encodeCrock(coinEvHash),
+            ageCommitmentProof: newAc,
           };
           planchets.push(planchet);
           hashCoinEvInner(coinEv, sessionHc);
diff --git a/packages/taler-wallet-core/src/operations/pending.ts 
b/packages/taler-wallet-core/src/operations/pending.ts
index 38146f72..5cf3afd4 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -23,7 +23,6 @@
  */
 import {
   ProposalStatus,
-  ReserveRecordStatus,
   AbortStatus,
   WalletStoresV1,
   BackupProviderStateTag,
@@ -33,7 +32,6 @@ import {
 import {
   PendingOperationsResponse,
   PendingTaskType,
-  ReserveType,
 } from "../pending-types.js";
 import { AbsoluteTime } from "@gnu-taler/taler-util";
 import { InternalWalletState } from "../internal-wallet-state.js";
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts 
b/packages/taler-wallet-core/src/operations/refresh.ts
index fc90b608..64a734bb 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -695,6 +695,7 @@ async function refreshReveal(
         },
         suspended: false,
         coinEvHash: pc.coinEvHash,
+        ageCommitmentProof: pc.ageCommitmentProof,
       };
 
       coins.push(coin);

-- 
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]