From voltaire-effect
This skill should be used when the user asks about "voltaire-effect crypto", "KeccakService", "Secp256k1", "BLS12-381", "AES-GCM", "HDWallet", "BIP-39", "CryptoLive", "CryptoTest", "keccak256 Effect", "ECDSA Effect", "voltaire hashing", "voltaire signing", or needs to understand the cryptographic services in voltaire-effect.
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin voltaire-effectThis skill uses the workspace's default tool permissions.
voltaire-effect wraps cryptographic operations as Effect services, enabling dependency injection and test substitution. Use `CryptoLive` for production (WASM-compiled, high performance) or `CryptoTest` for testing (deterministic, zero crypto overhead).
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
Share bugs, ideas, or general feedback.
voltaire-effect wraps cryptographic operations as Effect services, enabling dependency injection and test substitution. Use CryptoLive for production (WASM-compiled, high performance) or CryptoTest for testing (deterministic, zero crypto overhead).
┌─────────────────────────────────────────────────────────────────────────────┐
│ CRYPTO SERVICE ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ CryptoLive (all production services) │ │
│ │ CryptoTest (all deterministic test services) │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
│ Or import individually for tree-shaking: │
│ │
│ Hashing Signatures Encryption Key Derivation │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Keccak256│ │ Secp256k1│ │ AES-GCM │ │ HDWallet │ │
│ │ SHA256 │ │ Ed25519 │ │ ChaCha20 │ │ BIP-39 │ │
│ │ Blake2 │ │ P256 │ │ Poly1305 │ │ Keystore │ │
│ │ RIPEMD160│ │ BLS12-381│ │ X25519 │ │ HMAC │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ Zero Knowledge │
│ ┌──────────┐ │
│ │ BN254 │ │
│ │ KZG │ │
│ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Bundles all production crypto services:
import { CryptoLive } from 'voltaire-effect/crypto'
const program = Effect.gen(function* () {
const keccak = yield* KeccakService
const hash = yield* keccak.hash(data)
return hash
})
await Effect.runPromise(program.pipe(Effect.provide(CryptoLive)))
Deterministic outputs for testing without crypto overhead:
import { CryptoTest } from 'voltaire-effect/crypto'
// Same code, different layer - no code changes needed
await Effect.runPromise(program.pipe(Effect.provide(CryptoTest)))
// Returns predictable, deterministic values
WASM-compiled, 9.2x faster than viem's JavaScript implementation for 32-byte inputs:
import { KeccakService, KeccakLive } from 'voltaire-effect/crypto/Keccak256'
const program = Effect.gen(function* () {
const keccak = yield* KeccakService
return yield* keccak.hash(data) // Uint8Array → HashType
})
Effect.runPromise(program.pipe(Effect.provide(KeccakLive)))
For Ethereum signatures and key recovery:
import { Secp256k1Service, Secp256k1Live } from 'voltaire-effect/crypto/Secp256k1'
const program = Effect.gen(function* () {
const secp = yield* Secp256k1Service
const signature = yield* secp.sign(messageHash, privateKey)
const publicKey = yield* secp.recover(messageHash, signature)
return publicKey
})
For beacon chain / validator operations:
import { BLS12381Service, BLS12381Live } from 'voltaire-effect/crypto/BLS12381'
import { AesGcmService, AesGcmLive } from 'voltaire-effect/crypto/AesGcm'
const program = Effect.gen(function* () {
const aes = yield* AesGcmService
const encrypted = yield* aes.encrypt(key, plaintext, nonce)
const decrypted = yield* aes.decrypt(key, encrypted, nonce)
return decrypted
})
Hierarchical deterministic wallets:
import { HDWalletService, HDWalletLive } from 'voltaire-effect/crypto/HDWallet'
const program = Effect.gen(function* () {
const hd = yield* HDWalletService
const seed = yield* hd.fromMnemonic(mnemonic)
const key = yield* hd.derivePath(seed, "m/44'/60'/0'/0/0")
return key
})
Note: HDWallet requires native FFI, available in Node/Bun only (not browser).
import { BIP39Service, BIP39Live } from 'voltaire-effect/crypto/BIP39'
const program = Effect.gen(function* () {
const bip39 = yield* BIP39Service
const mnemonic = yield* bip39.generate(128) // 12 words
const seed = yield* bip39.toSeed(mnemonic)
return { mnemonic, seed }
})
Structured data signing per EIP-712:
import { EIP712 } from 'voltaire-effect/crypto/EIP712'
Unified signing interface supporting EIP-191, EIP-712, EIP-1559, EIP-4844, and EIP-7702:
import { Signers } from 'voltaire-effect/crypto/Signers'
Import only what you need:
// Just hashing + signatures
const MinimalCrypto = Layer.mergeAll(KeccakLive, Secp256k1Live)
// Full crypto stack
const FullLayer = Layer.mergeAll(
ProviderLayer,
KeccakLive,
Secp256k1Live,
SignerLayer
)
| Service | Browser/WASM | Node/Bun |
|---|---|---|
| Keccak256 | WASM | WASM |
| Secp256k1 | WASM | WASM |
| HDWallet | Not available | Native FFI |
| BIP-39 | Available | Available |
| AES-GCM | WebCrypto | Native |
| BLS12-381 | WASM | WASM |