
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@holochain/hc-seed-bundle
Advanced tools
TypeScript SeedBundle parsing and generation library.
b"SeedBndl"
and focusing on the subkey_id
and can declare a chain of subsequent derivations of a 32 byte seed in the form m/68/1/65/8
where we apply subkey_id
s 68, 1, 65, then 8 in turn.import { UnlockedSeedBundle, seedBundleReady } from "@holochain/hc-seed-bundle";
// await library functions ready to call
await seedBundleReady;
// generate a new pure entropy master seed
const master = UnlockedSeedBundle.newRandom({
bundleType: "master",
});
// derive a device root seed from the master
const deviceRoot = master.derive(68, {
bundleType: "deviceRoot",
});
// clear our secrets
master.zero();
deviceRoot.zero();
import { UnlockedSeedBundle, SeedCipherPwHash, seedBundleReady, parseSecret } from "@holochain/hc-seed-bundle";
// await library functions ready to call
await seedBundleReady;
// generate a new pure entropy master seed
const master = UnlockedSeedBundle.newRandom({
bundleType: "master",
});
// we need the passphrase as a Uint8Array
const pw = new TextEncoder().encode("test-passphrase");
const encodedBytes = master.lock([new SeedCipherPwHash(parseSecret(pw), "minimum")]);
// -- if you want to regenerate for (decrypting) below:
// console.log(Buffer.from(encodedBytes).toString('base64'))
// clear our secrets
master.zero();
import {
UnlockedSeedBundle,
SeedCipherSecurityQuestions,
seedBundleReady,
parseSecret,
} from "@holochain/hc-seed-bundle";
// await library functions ready to call
await seedBundleReady;
// generate a new pure entropy master seed
const master = UnlockedSeedBundle.newRandom({
bundleType: "master",
});
// we need the answers as a Uint8Arrays
const pw = (pw: string) => parseSecret(new TextEncoder().encode(pw));
const encodedBytes = master.lock([
new SeedCipherSecurityQuestions(
["Favorite Color?", "Favorite Hair?", "Favorite Food?"],
[pw("blue"), pw("big"), pw("begal")],
"minimum",
),
]);
// clear our secrets
master.zero();
// await library functions ready to call
import { UnlockedSeedBundle, LockedSeedCipherPwHash, seedBundleReady, parseSecret } from "@holochain/hc-seed-bundle";
await seedBundleReady;
const encodedBytes = Buffer.from(
"k6VoY3NiMJGWonB3xBD5Ov1Vas4XnV1XPsf8ddCqzSAAAcQYkO36tg8NHoec02I7KtxfX+ZnmBzIz+SoxDFDNfr4/9811ugf18FiRSywOyVagFHIRTyrfV3jZLRt6W0r7WuepaQLjlFu4jgVMrd2xBOBqmJ1bmRsZVR5cGWmbWFzdGVy",
"base64",
);
// decode the SeedCiphers that will let us unlock this bundle
const cipherList = UnlockedSeedBundle.fromLocked(encodedBytes);
// the demo is encrypted with PwHash
if (!(cipherList[0] instanceof LockedSeedCipherPwHash)) {
throw new Error("Expecting PwHash");
}
// unlock with the passphrase
const pw = new TextEncoder().encode("test-passphrase");
const master = cipherList[0].unlock(parseSecret(pw));
// clear our secrets
master.zero();
bun install
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.8. Bun is a fast all-in-one JavaScript runtime.
FAQs
Typescript SeedBundle parsing and generation library.
The npm package @holochain/hc-seed-bundle receives a total of 7 weekly downloads. As such, @holochain/hc-seed-bundle popularity was classified as not popular.
We found that @holochain/hc-seed-bundle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.