aboutsummaryrefslogtreecommitdiffstats
path: root/test/unified-seed.test.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
committerAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
commit56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch)
treed6bc2557c56b93177bb14aa376847c6e123a4862 /test/unified-seed.test.ts
parent13466248004327e9a026cb89f94926f9b060d1c1 (diff)
downloadcoinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz
coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip
format
Diffstat (limited to 'test/unified-seed.test.ts')
-rw-r--r--test/unified-seed.test.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/unified-seed.test.ts b/test/unified-seed.test.ts
index e3c4dd31..4410dbea 100644
--- a/test/unified-seed.test.ts
+++ b/test/unified-seed.test.ts
@@ -95,9 +95,7 @@ describe("unified master seed", () => {
const btcChild = master.derive("m/84'/0'/0'");
const arkChild = master.derive("m/86'/0'/0'/0/0");
- expect(bytesToHex(btcChild.privateKey!)).not.toBe(
- bytesToHex(arkChild.privateKey!),
- );
+ expect(bytesToHex(btcChild.privateKey!)).not.toBe(bytesToHex(arkChild.privateKey!));
});
});
@@ -127,9 +125,7 @@ describe("full encrypt-derive-sign flow", () => {
const recoveredChild = recoveredMaster.derive("m/84'/0'/0'");
expect(recoveredChild.publicExtendedKey).toBe(pubkey);
- expect(bytesToHex(recoveredChild.privateKey!)).toBe(
- bytesToHex(btcChild.privateKey!),
- );
+ expect(bytesToHex(recoveredChild.privateKey!)).toBe(bytesToHex(btcChild.privateKey!));
});
it("simulates Ark unlock from user.seed", async () => {
@@ -187,9 +183,7 @@ describe("full encrypt-derive-sign flow", () => {
describe("backward compatibility", () => {
it("legacy per-account seed (raw hex) decrypts differently than mnemonic entropy", async () => {
// Legacy: encrypt raw 32-byte hex key
- const rawKey = hexToBytes(
- "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
- );
+ const rawKey = hexToBytes("deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef");
const legacySeed = await encrypt(rawKey, password);
// Decrypt legacy seed — get raw bytes back