Skip to content

Commit 7e25872

Browse files
feat: add @types/keccak to packages that use it
This prepares for the Typescript 5.7 upgrade Issue: BTC-1450
1 parent c72c330 commit 7e25872

File tree

10 files changed

+16
-4
lines changed

10 files changed

+16
-4
lines changed

modules/abstract-eth/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"superagent": "^9.0.1"
5959
},
6060
"devDependencies": {
61+
"@types/keccak": "^3.0.5",
6162
"@bitgo/sdk-api": "^1.56.7",
6263
"@bitgo/sdk-test": "^8.0.54"
6364
}

modules/account-lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"devDependencies": {
7676
"@solana/web3.js": "1.92.1",
7777
"@types/bs58": "^4.0.1",
78+
"@types/keccak": "^3.0.5",
7879
"keccak": "3.0.3",
7980
"paillier-bigint": "3.3.0",
8081
"shx": "^0.3.4"

modules/account-lib/test/unit/mpc/tss/ecdsa/ecdsa.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ describe('TSS ECDSA TESTS', function () {
340340
// and delta share received from the other signer
341341

342342
const hashGenerator = (hashType?: string): Hash | undefined => {
343-
return hashType === 'keccak256' ? createKeccakHash('keccak256') : undefined;
343+
return hashType === 'keccak256' ? (createKeccakHash('keccak256') as Hash) : undefined;
344344
};
345345
const [signA, signB] = [
346346
MPC.sign(

modules/account-lib/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"esModuleInterop": true,
88
"typeRoots": ["../../types", "./node_modules/@types", "../../node_modules/@types"]
99
},
10-
"include": ["src/**/*", "resources/**/*"],
10+
"include": ["src/**/*", "test/**/*", "resources/**/*"],
1111
"exclude": ["node_modules"],
1212
"references": [
1313
{

modules/sdk-coin-avaxc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"devDependencies": {
5959
"@bitgo/sdk-api": "^1.56.7",
6060
"@bitgo/sdk-test": "^8.0.54",
61+
"@types/keccak": "^3.0.5",
6162
"ethers": "^5.1.3"
6263
}
6364
}

modules/sdk-coin-islm/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"protobufjs": "7.2.5"
5555
},
5656
"devDependencies": {
57+
"@types/keccak": "^3.0.5",
5758
"@bitgo/sdk-api": "^1.56.7",
5859
"@bitgo/sdk-test": "^8.0.54"
5960
}

modules/sdk-coin-islm/src/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class IslmUtils extends CosmosUtils {
9595

9696
/** @inheritdoc */
9797
getHashFunction(): Hash {
98-
return Keccak('keccak256');
98+
return Keccak('keccak256') as Hash;
9999
}
100100
}
101101

modules/sdk-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"uuid": "^8.3.2"
7777
},
7878
"devDependencies": {
79+
"@types/keccak": "^3.0.5",
7980
"@bitgo/sdk-opensslbytes": "^2.0.0",
8081
"@openpgp/web-stream-tools": "0.0.14",
8182
"@types/lodash": "^4.14.151",

modules/sdk-core/src/bitgo/tss/ecdsa/ecdsa.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export async function createUserSignatureShare(
173173
oShare: OShare,
174174
dShare: DShare,
175175
message: Buffer,
176-
hash: Hash = createKeccakHash('keccak256')
176+
hash: Hash = createKeccakHash('keccak256') as Hash
177177
): Promise<SignatureShare> {
178178
if (oShare.i !== ShareKeyPosition.USER) {
179179
throw new Error(`Invalid OShare, doesn't belong to the User`);

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5258,6 +5258,13 @@
52585258
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
52595259
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
52605260

5261+
"@types/keccak@^3.0.5":
5262+
version "3.0.5"
5263+
resolved "https://registry.npmjs.org/@types/keccak/-/keccak-3.0.5.tgz#76db7c4fa73f1706cc396754cc890bb5d71398a7"
5264+
integrity sha512-Mvu4StIJ9KyfPXDVRv3h0fWNBAjHPBQZ8EPcxhqA8FG6pLzxtytVXU5owB6J2/8xZ+ZspWTXJEUjAHt0pk0I1Q==
5265+
dependencies:
5266+
"@types/node" "*"
5267+
52615268
"@types/[email protected]", "@types/keyv@^3.1.4":
52625269
version "3.1.4"
52635270
resolved "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6"

0 commit comments

Comments
 (0)