diff options
author | Florian Dold <florian@dold.me> | 2020-12-14 16:44:42 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-14 16:44:42 +0100 |
commit | 12234083ecfe83de79eb2caf29808a0f17188e84 (patch) | |
tree | 2e369412845b51173ed0329bb08ee4dcaf48a3c6 /packages/taler-wallet-core/src/types/dbTypes.ts | |
parent | 80a0fab1261fc06f79db4c32fd7a1a6d0cb0db0f (diff) | |
download | wallet-core-12234083ecfe83de79eb2caf29808a0f17188e84.tar.xz |
derive refresh info from secret seed
Diffstat (limited to 'packages/taler-wallet-core/src/types/dbTypes.ts')
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 76 |
1 files changed, 16 insertions, 60 deletions
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index a4f14ff0c..18a1102b4 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -557,7 +557,7 @@ export interface ExchangeRecord { /** * Terms of service text or undefined if not downloaded yet. - * + * * This is just used as a cache of the last downloaded ToS. */ termsOfServiceText: string | undefined; @@ -664,14 +664,17 @@ export interface RefreshPlanchet { * Public key for the coin. */ publicKey: string; + /** * Private key for the coin. */ privateKey: string; + /** * Blinded public key. */ coinEv: string; + /** * Blinding key used. */ @@ -991,18 +994,14 @@ export interface RefreshGroupRecord { * Ongoing refresh */ export interface RefreshSessionRecord { - lastError: TalerErrorDetails | undefined; - /** - * Public key that's being melted in this session. - */ - meltCoinPub: string; - - /** - * How much of the coin's value is melted away - * with this refresh session? + * 512-bit secret that can be used to derive + * the other cryptographic material for the refresh session. + * + * FIXME: We currently store the derived material, but + * should always derive it. */ - amountRefreshInput: AmountJson; + sessionSecretSeed: string; /** * Sum of the value of denominations we want @@ -1011,59 +1010,17 @@ export interface RefreshSessionRecord { amountRefreshOutput: AmountJson; /** - * Signature to confirm the melting. + * Hashed denominations of the newly requested coins. */ - confirmSig: string; - - /** - * Hased denominations of the newly requested coins. - */ - newDenomHashes: string[]; - - /** - * Denominations of the newly requested coins. - */ - newDenoms: string[]; - - /** - * Planchets for each cut-and-choose instance. - */ - planchetsForGammas: RefreshPlanchet[][]; - - /** - * The transfer keys, kappa of them. - */ - transferPubs: string[]; - - /** - * Private keys for the transfer public keys. - */ - transferPrivs: string[]; + newDenoms: { + denomPubHash: string; + count: number; + }[]; /** * The no-reveal-index after we've done the melting. */ norevealIndex?: number; - - /** - * Hash of the session. - */ - hash: string; - - /** - * Timestamp when the refresh session finished. - */ - finishedTimestamp: Timestamp | undefined; - - /** - * When has this refresh session been created? - */ - timestampCreated: Timestamp; - - /** - * Base URL for the exchange we're doing the refresh with. - */ - exchangeBaseUrl: string; } /** @@ -1602,7 +1559,7 @@ class PurchasesStore extends Store<"purchases", PurchaseRecord> { string, PurchaseRecord >(this, "fulfillmentUrlIndex", "contractData.fulfillmentUrl"); - + orderIdIndex = new Index<"purchases", "orderIdIndex", string, PurchaseRecord>( this, "orderIdIndex", @@ -1712,7 +1669,6 @@ class BankWithdrawUrisStore extends Store< } } - /** */ class BackupProvidersStore extends Store< |