Skip to content

Commit c02e1bd

Browse files
authored
fix: use @libp2p/keychain module instead of bundling source code (#1569)
The @libp2p/keychain module has the keychain code split out from this module so use that instead of bundling the code here. It's also dropped it's dependency on `node-forge` so it's now only in `@libp2p/crypto`.
1 parent deaa148 commit c02e1bd

File tree

12 files changed

+17
-1719
lines changed

12 files changed

+17
-1719
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"@libp2p/interface-connection-manager": "^1.1.1",
103103
"@libp2p/interface-content-routing": "^2.0.0",
104104
"@libp2p/interface-dht": "^2.0.0",
105+
"@libp2p/interface-keychain": "^2.0.4",
105106
"@libp2p/interface-libp2p": "^1.0.0",
106107
"@libp2p/interface-metrics": "^4.0.0",
107108
"@libp2p/interface-peer-discovery": "^1.0.1",
@@ -114,6 +115,7 @@
114115
"@libp2p/interface-stream-muxer": "^3.0.0",
115116
"@libp2p/interface-transport": "^2.1.0",
116117
"@libp2p/interfaces": "^3.0.3",
118+
"@libp2p/keychain": "^1.0.0",
117119
"@libp2p/logger": "^2.0.1",
118120
"@libp2p/multistream-select": "^3.0.0",
119121
"@libp2p/peer-collections": "^3.0.0",
@@ -136,7 +138,6 @@
136138
"it-drain": "^2.0.0",
137139
"it-filter": "^2.0.0",
138140
"it-first": "^2.0.0",
139-
"it-foreach": "^1.0.0",
140141
"it-handshake": "^4.1.2",
141142
"it-length-prefixed": "^8.0.2",
142143
"it-map": "^2.0.0",
@@ -147,15 +148,13 @@
147148
"it-stream-types": "^1.0.4",
148149
"merge-options": "^3.0.4",
149150
"multiformats": "^11.0.0",
150-
"node-forge": "^1.3.1",
151151
"p-fifo": "^1.0.0",
152152
"p-retry": "^5.0.0",
153153
"p-settle": "^5.0.0",
154154
"private-ip": "^3.0.0",
155155
"protons-runtime": "^4.0.1",
156156
"rate-limiter-flexible": "^2.3.11",
157157
"retimer": "^3.0.0",
158-
"sanitize-filename": "^1.6.3",
159158
"set-delayed-interval": "^1.0.0",
160159
"timeout-abort-controller": "^3.0.0",
161160
"uint8arraylist": "^2.3.2",
@@ -183,7 +182,6 @@
183182
"@libp2p/topology": "^4.0.0",
184183
"@libp2p/webrtc-star": "^6.0.0",
185184
"@libp2p/websockets": "^5.0.0",
186-
"@types/node-forge": "^1.0.0",
187185
"@types/p-fifo": "^1.0.0",
188186
"@types/varint": "^6.0.0",
189187
"@types/xsalsa20": "^1.1.0",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import type { PingServiceInit } from './ping/index.js'
3737
import type { FetchServiceInit } from './fetch/index.js'
3838
import type { Components } from './components.js'
3939
import type { Libp2p } from '@libp2p/interface-libp2p'
40-
import type { KeyChainInit } from './keychain/index.js'
40+
import type { KeyChainInit } from '@libp2p/keychain'
4141
import type { NatManagerInit } from './nat-manager.js'
4242
import type { AddressManagerInit } from './address-manager/index.js'
4343
import type { PeerRoutingInit } from './peer-routing.js'

src/keychain/README.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/keychain/cms.ts

Lines changed: 0 additions & 150 deletions
This file was deleted.

src/keychain/doc/private-key.png

-24.9 KB
Binary file not shown.

src/keychain/doc/private-key.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)