Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/sdk/src/encryption/RSAKeyPair.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @todo This file contains code for both browser and Node.js environments. Consider
* making it environment-specific (using separate files or conditional exports), and
* remove the following "dom" lib reference when done.
*/
/// <reference lib="dom" />

import crypto from 'crypto'
import { promisify } from 'util'
import { KeyExchangeKeyPair } from './KeyExchangeKeyPair'
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk/src/identity/ECDSAKeyPairIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { hexToBinary, EcdsaSecp256r1 } from '@streamr/utils'
import { KeyPairIdentity } from './KeyPairIdentity'
import { SignatureType } from '@streamr/trackerless-network'
import { StrictStreamrClientConfig } from '../Config'
import type { webcrypto } from 'crypto'

const signingUtil = new EcdsaSecp256r1()

Expand All @@ -10,7 +11,7 @@ const signingUtil = new EcdsaSecp256r1()
*/
export class ECDSAKeyPairIdentity extends KeyPairIdentity {

private cachedJWK: JsonWebKey | undefined
private cachedJWK: webcrypto.JsonWebKey | undefined

assertValidKeyPair(): void {
signingUtil.assertValidKeyPair(this.publicKey, this.privateKey)
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/tsconfig.jest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.jest.json",
"compilerOptions": {
"lib": ["es2021", "dom"],
"lib": ["es2021"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitOverride": false
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "dist",
"declarationDir": "dist/types",
"lib": ["es2021", "dom"],
"lib": ["es2021"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitOverride": false
Expand Down