diff --git a/vendor/hypercore/index.d.ts b/vendor/hypercore/index.d.ts index befe012..eca8c73 100644 --- a/vendor/hypercore/index.d.ts +++ b/vendor/hypercore/index.d.ts @@ -4,6 +4,7 @@ import { type Duplex, type Readable } from 'streamx' import { type Duplex as NodeDuplex } from 'stream' import type Protomux from 'protomux' import type NoiseStream from '@hyperswarm/secret-stream' +import RandomAccessFile, { RAFOptions } from '../random-access-file' interface RemoteBitfield { get(index: number): boolean @@ -149,6 +150,14 @@ declare class Hypercore< readonly fork: number readonly padding: number static createProtocolStream(stream: boolean | Duplex | NodeDuplex | NoiseStream | ProtocolStream | ReplicationStream | Protomux, opts: CreateProtocolStreamOpts): ReplicationStream + static defaultStorage RandomAccessStorage>(storage: S): S; + static defaultStorage( + storage: string, + opts?: Pick & { + poolSize?: number; + rmdir?: boolean; + unlocked?: boolean; + }): (name: HypercoreStorageName) => RandomAccessFile; constructor(storage: Hypercore.HypercoreStorage) constructor(