refactor: declare used wormhole-crypto types
This commit is contained in:
parent
9477fb2306
commit
7d73a5ca7f
15
src/react-app-env.d.ts
vendored
15
src/react-app-env.d.ts
vendored
@ -1 +1,16 @@
|
||||
/// <reference types="react-scripts" />
|
||||
|
||||
// TODO: Type the rest of the API and contribute it to the wormhole-crypto project
|
||||
declare module 'wormhole-crypto' {
|
||||
export class Keychain {
|
||||
constructor(key: Uint8Array, salt: Uint8Array)
|
||||
|
||||
encryptStream(ReadableStream): Promise<ReadableStream>
|
||||
|
||||
decryptStream(ReadableStream): Promise<ReadableStream>
|
||||
}
|
||||
|
||||
export const plaintextSize = number => number
|
||||
|
||||
export const encryptedSize = number => number
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import WebTorrent, { Torrent, TorrentFile } from 'webtorrent'
|
||||
import streamSaver from 'streamsaver'
|
||||
// @ts-ignore
|
||||
import { Keychain, plaintextSize, encryptedSize } from 'wormhole-crypto'
|
||||
// @ts-ignore
|
||||
import idbChunkStore from 'idb-chunk-store'
|
||||
|
Loading…
Reference in New Issue
Block a user