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.
This commit is contained in:
parent
b8a61eb98c
commit
aff3100d89
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user