[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: proper handling of coin with
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: proper handling of coin with age restriction |
Date: |
Thu, 21 Jul 2022 11:38:29 +0200 |
This is an automated email from the git hooks/post-receive script.
oec pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new aff3100d proper handling of coin with age restriction
aff3100d is described below
commit aff3100d8901fe16a7e635945edfdad6f08fdf37
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Thu Jul 21 11:35:31 2022 +0200
proper handling of coin with age restriction
When a coin with age restriction is used for payment, the contract might
or might not require an attestation of minimum age.
When it does, we sent the signed minimum age along with the whole age
commitment (array of pubkeys).
Added: When the contract doesn't require a minimum age, we still sent
the hash of the age commitment, as this is needed for the deposit of the
coin.
---
packages/taler-wallet-core/src/crypto/cryptoImplementation.ts | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index c177a51d..968abbfd 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -1042,9 +1042,15 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
cipher: DenomKeyType.Rsa,
rsa_signature: depositInfo.denomSig.rsa_signature,
},
- age_commitment: depositInfo.ageCommitmentProof?.commitment.publicKeys,
- minimum_age_sig: minimumAgeSig,
};
+
+ if (depositInfo.requiredMinimumAge != null) {
+ s.minimum_age_sig = minimumAgeSig;
+ s.age_commitment =
depositInfo.ageCommitmentProof?.commitment.publicKeys;
+ } else if (depositInfo.ageCommitmentProof) {
+ s.h_age_commitment = hAgeCommitment;
+ }
+
return s;
} else {
throw Error(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: proper handling of coin with age restriction,
gnunet <=