| … | … | @@ -0,0 +1,56 @@ |
| 1 | # hyper-wallet-lib |
| 2 | |
| 3 | Shared library for [hyper-wallet](../hyper-wallet) — identity management and secure storage. |
| 4 | |
| 5 | Consumed as a local file dependency, not from a registry: |
| 6 | |
| 7 | ```json |
| 8 | "hyper-wallet-lib": "file:lib/hyper-wallet-lib" |
| 9 | ``` |
| 10 | |
| 11 | ## What `index.js` exports |
| 12 | |
| 13 | Two things: |
| 14 | |
| 15 | ```js |
| 16 | import { IdentityKey, storeMnemonic, loadMnemonic, deleteMnemonic, isInitialized } |
| 17 | from 'hyper-wallet-lib' |
| 18 | ``` |
| 19 | |
| 20 | - **`IdentityKey`** (`identity.js`) — keet-identity-key derivation for the wallet. |
| 21 | - **secure storage** (`secure-storage.js`) — `storeMnemonic`, `loadMnemonic`, `deleteMnemonic`, |
| 22 | `isInitialized`, over `keytar` (the OS keychain). |
| 23 | |
| 24 | Consumers import by subpath — `hyper-wallet-lib/identity`, `hyper-wallet-lib/secure-storage` — |
| 25 | as well as from the index. |
| 26 | |
| 27 | ## The rest of the tree |
| 28 | |
| 29 | Eighteen further `.cjs` modules ship here and are **not** re-exported from `index.js`. They are |
| 30 | reachable only by direct path, and several are substantial: |
| 31 | |
| 32 | | | lines | |
| 33 | |---|---:| |
| 34 | | `wallet-storage.cjs` | 2270 | |
| 35 | | `blockchain-providers.cjs` | 502 | |
| 36 | | `address-validator.cjs` | 269 | |
| 37 | | `rate-limiter.cjs` | 265 | |
| 38 | | `config.cjs` | 237 | |
| 39 | | `input-sanitizer.cjs` · `wdk-integration.cjs` · `pairing-protocol.cjs` | 210–227 | |
| 40 | | `blockchain-api.cjs` · `encryption.cjs` · `amount-validator.cjs` · `utxo-manager.cjs` | 157–167 | |
| 41 | | `auth.cjs` · `config-loader.cjs` · `address-manager.cjs` · `secure-storage.cjs` · `create-wallet-server.cjs` · `qr-svg.cjs` | 32–144 | |
| 42 | |
| 43 | ⚠ Note the split: the package is ESM at the index (`identity.js`, `secure-storage.js`) and CJS |
| 44 | everywhere else. `secure-storage` exists in **both** forms — `secure-storage.js` is the one the |
| 45 | index exports. |
| 46 | |
| 47 | ## Dependencies |
| 48 | |
| 49 | `keet-identity-key`, `keytar`. |
| 50 | |
| 51 | `keytar` is a native module and binds to the OS keychain, so this package does not run under |
| 52 | Bare and does not run headless without a keyring. |
| 53 | |
| 54 | ## License |
| 55 | |
| 56 | Not yet declared. |