Skip to content

Commit 0105670

Browse files
bitgo-keenanislamaminBitGo
authored andcommitted
feat(sdk-lib-mpc): switch to better DKLs variant
Ticket: HSM-739
1 parent f1757da commit 0105670

File tree

1 file changed

+5
-5
lines changed
  • modules/sdk-lib-mpc/src/tss/ecdsa-dkls

1 file changed

+5
-5
lines changed

modules/sdk-lib-mpc/src/tss/ecdsa-dkls/dsg.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message, SignSession } from '@silencelaboratories/dkls-wasm-ll-node';
1+
import { Message, SignSessionOTVariant } from '@silencelaboratories/dkls-wasm-ll-node';
22
import { DeserializedBroadcastMessage, DeserializedDklsSignature, DeserializedMessages, DsgState } from './types';
33
import { decode } from 'cbor-x';
44

@@ -9,7 +9,7 @@ type BundlerWasmer = typeof import('@silencelaboratories/dkls-wasm-ll-bundler');
99
type DklsWasm = NodeWasmer | WebWasmer | BundlerWasmer;
1010

1111
export class Dsg {
12-
protected dsgSession: SignSession | undefined;
12+
protected dsgSession: SignSessionOTVariant | undefined;
1313
protected dsgSessionBytes: Uint8Array;
1414
private _signature: DeserializedDklsSignature | undefined;
1515
protected keyShareBytes: Buffer;
@@ -35,7 +35,7 @@ export class Dsg {
3535

3636
private _restoreSession() {
3737
if (!this.dsgSession) {
38-
this.dsgSession = this.getDklsWasm().SignSession.fromBytes(this.dsgSessionBytes);
38+
this.dsgSession = this.getDklsWasm().SignSessionOTVariant.fromBytes(this.dsgSessionBytes);
3939
}
4040
}
4141

@@ -132,12 +132,12 @@ export class Dsg {
132132
const initDkls = await import('@silencelaboratories/dkls-wasm-ll-web');
133133
await initDkls.default();
134134
}
135-
const { Keyshare, SignSession } = this.getDklsWasm();
135+
const { Keyshare, SignSessionOTVariant } = this.getDklsWasm();
136136
const keyShare = Keyshare.fromBytes(this.keyShareBytes);
137137
if (keyShare.partyId !== this.partyIdx) {
138138
throw Error(`Party index: ${this.partyIdx} does not match key share partyId: ${keyShare.partyId} `);
139139
}
140-
this.dsgSession = new SignSession(keyShare, this.derivationPath);
140+
this.dsgSession = new SignSessionOTVariant(keyShare, this.derivationPath);
141141
try {
142142
const payload = this.dsgSession.createFirstMessage().payload;
143143
this._deserializeState();

0 commit comments

Comments
 (0)