Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit 1197484

Browse files
authored
feat: expose supported peer id types (#318)
To reduce duplication elsewhere, expose supported PeerId types
1 parent 913ddb5 commit 1197484

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/interface-peer-id/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import type { CID } from 'multiformats/cid'
22
import type { MultihashDigest } from 'multiformats/hashes/interface'
33

4+
export type PeerIdType = 'RSA' | 'Ed25519' | 'secp256k1'
5+
46
interface BasePeerId {
5-
readonly type: 'RSA' | 'Ed25519' | 'secp256k1'
7+
readonly type: PeerIdType
68
readonly multihash: MultihashDigest
79
readonly privateKey?: Uint8Array
810
readonly publicKey?: Uint8Array

0 commit comments

Comments
 (0)