Commit 045559a
feat(sdk-lib-mpc): EddsaRetrofitData type + DKG retrofit constructor + getFirstMessage routing
Add optional `retrofitData` parameter to the `DKG` constructor so parties
can seed a retrofit DKG ceremony from their existing MPCv1 scalar instead
of generating fresh key material.
- Import and store `EddsaRetrofitData` on the `DKG` class instance.
- Constructor gains a 4th optional param: `retrofitData?: EddsaRetrofitData`.
- `getFirstMessage` branches on `this.retrofitData`: when set it calls
`wasm.ed25519_dkg_round0_import` (ships in WCI-1217) passing the
party's clamped scalar, aggregate public key, and chain code; otherwise
it falls through to the existing `ed25519_dkg_round0_process` path.
- Export `EddsaRetrofitData` as a named type from `eddsa-mps/index.ts`
so callers can import it directly without going through `MPSTypes`.
The `as any` cast on the wasm call-site is intentional and temporary:
`ed25519_dkg_round0_import` will be typed once WCI-1217 lands.
Ticket: WCI-1261
Session-Id: ac4bfdd3-68f2-464c-bb89-a871628f8093
Task-Id: bf6d94d3-a6fd-40c3-9c4a-efc7ffd08fdf1 parent 9957029 commit 045559a
3 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | | - | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
128 | 142 | | |
129 | 143 | | |
130 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
0 commit comments