Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 49c44cb

Browse files
committed
refactor: Move encryption and key exchange files under stream/encryption.
1 parent 378ef96 commit 49c44cb

File tree

16 files changed

+302
-290
lines changed

16 files changed

+302
-290
lines changed

src/StreamrClient.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ import { DataUnion, DataUnionDeployOptions } from './dataunion/DataUnion'
2222
import { BigNumber } from '@ethersproject/bignumber'
2323
import { getAddress } from '@ethersproject/address'
2424
import { Contract } from '@ethersproject/contracts'
25-
import { StreamPartDefinition } from './stream'
26-
import type { GroupKey } from './stream/Encryption'
25+
import { StreamPartDefinition, GroupKey } from './stream'
2726

2827
// TODO get metadata type from streamr-protocol-js project (it doesn't export the type definitions yet)
2928
export type OnMessageCallback = MaybeAsync<(message: any, metadata: any) => void>

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { StreamrClient } from './StreamrClient'
1010
export * from './StreamrClient'
1111
export * from './Config'
1212
export * from './stream'
13-
export * from './stream/Encryption'
13+
export * from './stream/encryption/Encryption'
1414
export * from './stream/StreamPart'
1515
export * from './stream/StorageNode'
1616
export * from './subscribe'

src/publish/Encrypt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { MessageLayer } from 'streamr-client-protocol'
22

3-
import EncryptionUtil from '../stream/Encryption'
3+
import EncryptionUtil from '../stream/encryption/Encryption'
44
import { Stream } from '../stream'
55
import { StreamrClient } from '../StreamrClient'
6-
import { PublisherKeyExhange } from '../stream/KeyExchange'
6+
import { PublisherKeyExhange } from '../stream/encryption/KeyExchange'
77

88
const { StreamMessage } = MessageLayer
99

src/rest/StreamEndpoints.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getEndpointUrl } from '../utils'
88
import { validateOptions } from '../stream/utils'
99
import { Stream, StreamOperation, StreamProperties } from '../stream'
1010
import { StreamPart } from '../stream/StreamPart'
11-
import { isKeyExchangeStream } from '../stream/KeyExchange'
11+
import { isKeyExchangeStream } from '../stream/encryption/KeyExchange'
1212

1313
import authFetch, { ErrorCode, NotFoundError } from './authFetch'
1414
import { EthereumAddress } from '../types'

src/stream/PersistentStore.ts

Lines changed: 0 additions & 139 deletions
This file was deleted.
File renamed without changes.

src/stream/Encryption.ts renamed to src/stream/encryption/Encryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Crypto } from 'node-webcrypto-ossl'
77
import { arrayify, hexlify } from '@ethersproject/bytes'
88
import { MessageLayer } from 'streamr-client-protocol'
99

10-
import { uuid } from '../utils'
10+
import { uuid } from '../../utils'
1111

1212
const { StreamMessage, EncryptedGroupKey } = MessageLayer
1313

0 commit comments

Comments
 (0)