Skip to content

Commit

Permalink
pinned noble curves version
Browse files Browse the repository at this point in the history
added some awaits before return
  • Loading branch information
CluEleSsUK committed Mar 18, 2024
1 parent b82159d commit 4599e22
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"typescript": "^5.1.6"
},
"dependencies": {
"@noble/curves": "^1.4.0",
"@noble/hashes": "^1.4.0",
"@stablelib/chacha20poly1305": "^1.0.1",
"buffer": "^6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/drand/timelock-decrypter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export function createTimelockDecrypter(network: ChainClient) {
}
case "bls-unchained-on-g1": {
const ciphertext = parseCiphertext(body, bls12_381.G2.ProjectivePoint.BASE)
return ibe.decryptOnG2(Buffer.from(beacon.signature, "hex"), ciphertext)
return await ibe.decryptOnG2(Buffer.from(beacon.signature, "hex"), ciphertext)
}
case "bls-unchained-g1-rfc9380": {
const ciphertext = parseCiphertext(body, bls12_381.G2.ProjectivePoint.BASE)
return ibe.decryptOnG2(Buffer.from(beacon.signature, "hex"), ciphertext)
return await ibe.decryptOnG2(Buffer.from(beacon.signature, "hex"), ciphertext)
}
default:
throw Error(`Unsupported scheme: ${chainInfo.schemeID} - you must use a drand network with an unchained scheme for timelock decryption!`)
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const LIB_VERSION = "0.7.0";
export const LIB_VERSION = "0.9.0";

0 comments on commit 4599e22

Please sign in to comment.