Skip to content

Commit 6990871

Browse files
committed
feat: add getResult command to retrieve command results async
1 parent dc3ed13 commit 6990871

File tree

3 files changed

+102
-221
lines changed

3 files changed

+102
-221
lines changed

src/deserialize.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const deserializeDkgRound1 = (data: Buffer) => {
1+
export const deserializeDkgRound1 = (data?: Buffer) => {
2+
if (!data) return {}
3+
24
let pos = 0
35
const secretPackageLen = data.readUint16BE(pos)
46
pos += 2
@@ -15,7 +17,9 @@ export const deserializeDkgRound1 = (data: Buffer) => {
1517
}
1618
}
1719

18-
export const deserializeDkgRound2 = (data: Buffer) => {
20+
export const deserializeDkgRound2 = (data?: Buffer) => {
21+
if (!data) return {}
22+
1923
let pos = 0
2024
const secretPackageLen = data.readUint16BE(pos)
2125
pos += 2

0 commit comments

Comments
 (0)