Skip to content
Closed
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
9 changes: 9 additions & 0 deletions vendor/hypercore/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<S extends (name: HypercoreStorageName) => RandomAccessStorage>(storage: S): S;
static defaultStorage(
storage: string,
opts?: Pick<RAFOptions, "lock" | "pool" | "writable"> & {
poolSize?: number;
rmdir?: boolean;
unlocked?: boolean;
}): (name: HypercoreStorageName) => RandomAccessFile;

constructor(storage: Hypercore.HypercoreStorage)
constructor(
Expand Down