aboutsummaryrefslogtreecommitdiff
path: root/extension/background/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'extension/background/wallet.ts')
-rw-r--r--extension/background/wallet.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/background/wallet.ts b/extension/background/wallet.ts
index b04babb68..040b7b6a9 100644
--- a/extension/background/wallet.ts
+++ b/extension/background/wallet.ts
@@ -128,9 +128,13 @@ function withdraw(denom, reserve, mint) {
denom_pub: denom.denom_pub,
reserve_pub: reserve.reserve_pub,
};
- let coinPub = EddsaPrivateKey.create();
- // create RSA blinding key
- // blind coin
+ let denomPub = RsaPublicKey.decode(denom.denom_pub);
+ let coinPriv = EddsaPrivateKey.create();
+ let coinPub = coinPriv.getPublicKey();
+ let blindingFactor = RsaBlindingKey.create(1024);
+ let pubHash = coinPub.hash();
+ let ev = rsaBlind(pubHash, blindingFactor, denomPub);
+
// generate signature
}