From 00025c40a85bfa2d940b61f97595c61dd054394f Mon Sep 17 00:00:00 2001 From: julienmalard Date: Mon, 28 Oct 2024 12:49:16 +0530 Subject: [PATCH] =?UTF-8?q?Mises=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.d.ts | 8 +++++--- package.json | 3 ++- pnpm-lock.yaml | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2d5a8b8..b389210 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,7 @@ declare module "@orbitdb/core" { import EventEmitter from "events"; import type { HeliaLibp2p } from "helia"; + import type { PeerId } from "@libp2p/interface"; export function Database(args: { ipfs: HeliaLibp2p; @@ -62,10 +63,11 @@ declare module "@orbitdb/core" { }; export function createOrbitDB(args: { ipfs: HeliaLibp2p; - directory: string; - id?: string; + id?: PeerId; + identity?: Identity; + identities?: typeof Identities; + directory?: string; }): Promise; - export function useAccessController(accessController: { type: string }): void; export function isValidAddress(address: unknown): boolean; diff --git a/package.json b/package.json index 310c677..f2c917b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@constl/orbit-db-types", "private": false, - "version": "2.0.2", + "version": "2.0.3", "description": "Unofficial typings for orbit-db", "types": "index.d.ts", "type": "module", @@ -24,6 +24,7 @@ "publishNPM": "pnpm publish --access public" }, "devDependencies": { + "@libp2p/interface": "^2.1.3", "@orbitdb/core": "^2.3.0", "@types/elliptic": "^6.4.18", "@types/events": "^3.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2de2ccb..0c8a0c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@libp2p/interface': + specifier: ^2.1.3 + version: 2.1.3 '@orbitdb/core': specifier: ^2.3.0 version: 2.3.0