From 40b5472961617a2ce934370b75cbc91454145258 Mon Sep 17 00:00:00 2001 From: Mauve Signweaver Date: Mon, 24 Nov 2025 16:34:05 -0500 Subject: [PATCH 1/2] feat: Add hypercore11 constructor changes --- vendor/hypercore/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vendor/hypercore/index.d.ts b/vendor/hypercore/index.d.ts index 9eb0a05..019fe57 100644 --- a/vendor/hypercore/index.d.ts +++ b/vendor/hypercore/index.d.ts @@ -91,6 +91,11 @@ declare namespace Hypercore { type ValueEncoding = 'json' | 'utf-8' | 'binary' + interface EncryptionOptions { + key?: Buffer + block?: boolean + } + interface HypercoreOptions< TValueEncoding extends Hypercore.ValueEncoding = 'binary', TKey extends Buffer | string | undefined = undefined @@ -101,11 +106,14 @@ declare namespace Hypercore { encodeBatch?(batch: any[]): void // optionally apply an encoding to complete batches key: TKey keyPair?: KeyPair // optionally pass the public key and secret key as a key pair + /** + * @deprecated Replaced with `encryption` field + */ encryptionKey?: Buffer // optionally pass an encryption key to enable block encryption + encryption?: EncryptionOptions onwait?: () => {} // hook that is called if gets are waiting for download timeout?: number // wait at max some milliseconds (0 means no timeout) writable?: boolean // disable appends and truncates - preload?: () => PromiseLike>> } interface HypercoreGetOptions< From 3a2c92469ef6858f25dc918d6989bbea2a843fdf Mon Sep 17 00:00:00 2001 From: Mauve Signweaver Date: Tue, 25 Nov 2025 16:22:43 -0500 Subject: [PATCH 2/2] feat: Update core.has to return Promise --- vendor/hypercore/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/hypercore/index.d.ts b/vendor/hypercore/index.d.ts index 019fe57..bf0b791 100644 --- a/vendor/hypercore/index.d.ts +++ b/vendor/hypercore/index.d.ts @@ -204,8 +204,8 @@ declare class Hypercore< : unknown) > /** Check if the core has all blocks between start and end. */ - has(index: number): boolean - has(start: number, end: number): boolean + has(index: number): Promise + has(start: number, end: number): Promise update(opts?: { wait?: boolean }): Promise seek( byteOffset: number,