Skip to content

Commit

Permalink
generate edek on dek encoded into hex
Browse files Browse the repository at this point in the history
  • Loading branch information
upalinski committed Jan 12, 2025
1 parent d602e92 commit 65de747
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/wallet-engine/src/engine/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,10 @@ export const createPolkadotEngine = ({ getPrivateKey, polkadotRpc }: PolkadotEng

const secretKey = getSecretKey();
const dek = blake2AsU8a(secretKey);
console.log('DEK: ', dek)

const secretKeyCurve25519 = convertSecretKey(secretKey);

res.result = u8aToHex(nacl.box(dek, new Uint8Array(24), theirPublicKeyCurve25519, secretKeyCurve25519));
res.result = u8aToHex(nacl.box(new TextEncoder().encode(u8aToHex(dek)), new Uint8Array(24), theirPublicKeyCurve25519, secretKeyCurve25519));
}),

ed25519_getBalance: createAsyncMiddleware(async (req, res) => {
Expand Down

0 comments on commit 65de747

Please sign in to comment.