fix recoup protocol breakage

This commit is contained in:
Florian Dold 2022-03-07 21:49:11 +01:00
parent 0323868e10
commit 6df9202935
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 35 additions and 1 deletions

View File

@ -147,9 +147,31 @@ export class ExchangeAuditor {
denomination_keys: AuditorDenomSig[]; denomination_keys: AuditorDenomSig[];
} }
export type ExchangeWithdrawValue =
| ExchangeRsaWithdrawValue
| ExchangeCsWithdrawValue;
export interface ExchangeRsaWithdrawValue {
cipher: "RSA";
}
export interface ExchangeCsWithdrawValue {
cipher: "CS";
/**
* CSR R0 value
*/
r_pub_0: string;
/**
* CSR R1 value
*/
r_pub_1: string;
}
export interface RecoupRequest { export interface RecoupRequest {
/** /**
* Hashed enomination public key of the coin we want to get * Hashed denomination public key of the coin we want to get
* paid back. * paid back.
*/ */
denom_pub_hash: string; denom_pub_hash: string;
@ -171,6 +193,8 @@ export interface RecoupRequest {
* Signature of TALER_RecoupRequestPS created with the coin's private key. * Signature of TALER_RecoupRequestPS created with the coin's private key.
*/ */
coin_sig: string; coin_sig: string;
ewv: ExchangeWithdrawValue;
} }
export interface RecoupRefreshRequest { export interface RecoupRefreshRequest {
@ -197,6 +221,8 @@ export interface RecoupRefreshRequest {
* the coin's private key. * the coin's private key.
*/ */
coin_sig: string; coin_sig: string;
ewv: ExchangeWithdrawValue;
} }
/** /**

View File

@ -272,6 +272,10 @@ export class CryptoImplementation {
coin_sig: encodeCrock(coinSig), coin_sig: encodeCrock(coinSig),
denom_pub_hash: req.denomPubHash, denom_pub_hash: req.denomPubHash,
denom_sig: req.denomSig, denom_sig: req.denomSig,
// FIXME!
ewv: {
cipher: "RSA",
},
}; };
return paybackRequest; return paybackRequest;
} else { } else {
@ -298,6 +302,10 @@ export class CryptoImplementation {
coin_sig: encodeCrock(coinSig), coin_sig: encodeCrock(coinSig),
denom_pub_hash: req.denomPubHash, denom_pub_hash: req.denomPubHash,
denom_sig: req.denomSig, denom_sig: req.denomSig,
// FIXME!
ewv: {
cipher: "RSA",
},
}; };
return recoupRequest; return recoupRequest;
} else { } else {