Initial Commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Capability Spec Delta: crypto (restore-crypto-fold-keys-vault)
|
||||
|
||||
**Package:** `@suaveplan/crypto`
|
||||
**Status:** PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Keypair, Keychain storage, BIP39, and legacy Vault live inside `@suaveplan/crypto`
|
||||
|
||||
`@suaveplan/crypto` SHALL own the keypair generation/validation surface, the in-memory and serialized keychain storage adapters, the BIP39 mnemonic generation/restoration helpers, and the existing pre-Authority `Vault` class. The packages `@suaveplan/crypto-keys` and `@suaveplan/crypto-vault` MUST be deleted; their content is folded under `crypto/src/keychain/` and `crypto/src/vault/` respectively.
|
||||
|
||||
The misleadingly-named `ChainSigner` from `crypto-vault` MUST be dropped (it does not actually sign under a hierarchy); slice 3 introduces `Authority` to take its place.
|
||||
|
||||
#### Scenario: keypair generation surface available
|
||||
|
||||
- **WHEN** a consumer imports `Keypair`, `generateKeypair`, `validateKeypair` from `@suaveplan/crypto`
|
||||
- **THEN** all three resolve and behave identically to their pre-fold equivalents in `@suaveplan/crypto-keys`
|
||||
|
||||
#### Scenario: BIP39 surface available
|
||||
|
||||
- **WHEN** a consumer imports `generateMnemonic`, `validateMnemonic`, `mnemonicToSeed` from `@suaveplan/crypto`
|
||||
- **THEN** all three resolve and behave identically to their pre-fold equivalents in `@suaveplan/crypto-vault`
|
||||
|
||||
#### Scenario: legacy Vault surface available transitionally
|
||||
|
||||
- **WHEN** a consumer imports the legacy `Vault` class from `@suaveplan/crypto/vault/legacy-vault`
|
||||
- **THEN** it resolves and behaves identically to the pre-fold `crypto-vault` `Vault` class
|
||||
|
||||
#### Scenario: ChainSigner is gone
|
||||
|
||||
- **WHEN** a consumer attempts to import `ChainSigner` from any `@suaveplan/crypto*` package
|
||||
- **THEN** the import fails (the symbol does not exist anywhere in genesis)
|
||||
|
||||
#### Scenario: deleted packages no longer referenced
|
||||
|
||||
- **WHEN** the test runs `grep -rln "@suaveplan/crypto-keys\|@suaveplan/crypto-vault" packages/`
|
||||
- **THEN** zero matches are found (excluding `openspec/archive/`)
|
||||
|
||||
**Verified by:** `tests/folded-keypair.test.ts::"keypair surface resolves under @suaveplan/crypto"` AND `tests/folded-mnemonic.test.ts::"BIP39 surface resolves under @suaveplan/crypto"` AND `tests/legacy-vault.test.ts::"legacy Vault resolves under @suaveplan/crypto/vault/legacy-vault"` AND `tests/chain-signer-removed.test.ts::"ChainSigner is no longer importable"` AND `tests/no-deleted-package-imports.test.ts::"no consumer imports the deleted packages"`
|
||||
Reference in New Issue
Block a user