Skip to content

Commit 3690a86

Browse files
committed
Add interface-datastore dependency and import
Add interface-datastore@^10.0.1 to package.json and adjust P2PManager.ts imports to bring Datastore in as a runtime import instead of a type-only import. This ensures the Datastore symbol is available where needed at runtime and avoids type-only import issues.
1 parent 25b46ff commit 3690a86

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"typescript-eslint": {
4141
"typescript": "$typescript"
4242
},
43-
"jsonpath-plus": "^10.4.0"
43+
"jsonpath-plus": "^10.4.0",
44+
"interface-datastore": "^10.0.1"
4445
},
4546
"dependencies": {
4647
"@asyncapi/generator": "^3.2.1",

src/src/poc/networking/P2PManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { tcp } from '@libp2p/tcp';
2323
import { uPnPNAT } from '@libp2p/upnp-nat';
2424
import { multiaddr, Multiaddr } from '@multiformats/multiaddr';
2525
import figlet, { FontName } from 'figlet';
26-
import type { Datastore } from 'interface-datastore';
2726
import { createLibp2p, ServiceFactoryMap } from 'libp2p';
2827
import { BtcIndexerConfig } from '../../config/BtcIndexerConfig.js';
2928
import { DBManagerInstance } from '../../db/DBManager.js';
@@ -87,6 +86,7 @@ import {
8786
isPrivateOrLoopbackAddress,
8887
} from './AddressExtractor.js';
8988
import { Components } from 'libp2p/src/components.js';
89+
import { Datastore } from 'interface-datastore';
9090

9191
if (Config.P2P.ENABLE_P2P_LOGGING) {
9292
enable('libp2p:*');

0 commit comments

Comments
 (0)