Commit 3378128
committed
fix: add runtime validation for algorithm and conditionally pass to deriveKeypair
- Validate opts.algorithm in constructor: throw if not a known ECDSA value
- Only pass algorithm to deriveKeypair when explicitly provided (don't force DEFAULT_ALGORITHM)
- Preserves fallback to seed-encoded algorithm when algorithm isn't specified
- Addresses CodeRabbit review feedback on potential issue (line 122-126) and optimization (line 324-331)1 parent 3251f5c commit 3378128
2 files changed
Lines changed: 10351 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
321 | 331 | | |
322 | 332 | | |
323 | 333 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
328 | 342 | | |
329 | 343 | | |
330 | 344 | | |
331 | | - | |
| 345 | + | |
332 | 346 | | |
333 | 347 | | |
334 | 348 | | |
| |||
0 commit comments