include age commitment proof in refreshed coins
This commit is contained in:
parent
2119daba17
commit
9b2d6d766f
@ -1154,6 +1154,8 @@ export interface RefreshPlanchetInfo {
|
|||||||
* Blinding key used.
|
* Blinding key used.
|
||||||
*/
|
*/
|
||||||
blindingKey: string;
|
blindingKey: string;
|
||||||
|
|
||||||
|
ageCommitmentProof?: AgeCommitmentProof;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,6 +43,28 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {
|
|||||||
const walletTwo = new WalletCli(t, "walletTwo");
|
const walletTwo = new WalletCli(t, "walletTwo");
|
||||||
const walletThree = new WalletCli(t, "walletThree");
|
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;
|
const wallet = walletOne;
|
||||||
|
|
||||||
|
@ -1208,6 +1208,7 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
|
|||||||
coinPriv: encodeCrock(coinPriv),
|
coinPriv: encodeCrock(coinPriv),
|
||||||
coinPub: encodeCrock(coinPub),
|
coinPub: encodeCrock(coinPub),
|
||||||
coinEvHash: encodeCrock(coinEvHash),
|
coinEvHash: encodeCrock(coinEvHash),
|
||||||
|
ageCommitmentProof: newAc,
|
||||||
};
|
};
|
||||||
planchets.push(planchet);
|
planchets.push(planchet);
|
||||||
hashCoinEvInner(coinEv, sessionHc);
|
hashCoinEvInner(coinEv, sessionHc);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ProposalStatus,
|
ProposalStatus,
|
||||||
ReserveRecordStatus,
|
|
||||||
AbortStatus,
|
AbortStatus,
|
||||||
WalletStoresV1,
|
WalletStoresV1,
|
||||||
BackupProviderStateTag,
|
BackupProviderStateTag,
|
||||||
@ -33,7 +32,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
PendingOperationsResponse,
|
PendingOperationsResponse,
|
||||||
PendingTaskType,
|
PendingTaskType,
|
||||||
ReserveType,
|
|
||||||
} from "../pending-types.js";
|
} from "../pending-types.js";
|
||||||
import { AbsoluteTime } from "@gnu-taler/taler-util";
|
import { AbsoluteTime } from "@gnu-taler/taler-util";
|
||||||
import { InternalWalletState } from "../internal-wallet-state.js";
|
import { InternalWalletState } from "../internal-wallet-state.js";
|
||||||
|
@ -695,6 +695,7 @@ async function refreshReveal(
|
|||||||
},
|
},
|
||||||
suspended: false,
|
suspended: false,
|
||||||
coinEvHash: pc.coinEvHash,
|
coinEvHash: pc.coinEvHash,
|
||||||
|
ageCommitmentProof: pc.ageCommitmentProof,
|
||||||
};
|
};
|
||||||
|
|
||||||
coins.push(coin);
|
coins.push(coin);
|
||||||
|
Loading…
Reference in New Issue
Block a user