diff options
author | Florian Dold <florian@dold.me> | 2022-04-19 17:12:43 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-04-27 00:50:17 +0200 |
commit | a165afa6824980c409d7c2e22e24171e536800e0 (patch) | |
tree | 0e8491f092aba2280655ee4728fef0ca02bb8387 /packages/taler-wallet-core/src/db.ts | |
parent | 9b85d139bf7bdc360ea0894e09f6115cd9d472d8 (diff) | |
download | wallet-core-a165afa6824980c409d7c2e22e24171e536800e0.tar.xz |
wallet-core: implement age restriction support
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index e3da35975..0a1b40d2a 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -40,6 +40,7 @@ import { CoinEnvelope, TalerProtocolTimestamp, TalerProtocolDuration, + AgeCommitmentProof, } from "@gnu-taler/taler-util"; import { RetryInfo } from "./util/retries.js"; import { PayCoinSelection } from "./util/coinSelection.js"; @@ -188,6 +189,15 @@ export interface ReserveRecord { */ bankInfo?: ReserveBankInfo; + /** + * Restrict withdrawals from this reserve to this age. + */ + restrictAge?: number; + + /** + * Pre-allocated ID of the withdrawal group for the first withdrawal + * on this reserve. + */ initialWithdrawalGroupId: string; /** @@ -600,6 +610,8 @@ export interface PlanchetRecord { coinEv: CoinEnvelope; coinEvHash: string; + + ageCommitmentProof?: AgeCommitmentProof; } /** @@ -724,6 +736,8 @@ export interface CoinRecord { * Used to prevent allocation of the same coin for two different payments. */ allocation?: CoinAllocation; + + ageCommitmentProof?: AgeCommitmentProof; } export interface CoinAllocation { @@ -1148,6 +1162,7 @@ export interface WalletContractData { wireMethod: string; wireInfoHash: string; maxDepositFee: AmountJson; + minimumAge?: number; } export enum AbortStatus { |