feat: add fromRegistryPublicKey helper
This commit is contained in:
parent
07893b1538
commit
e25087890f
|
@ -42,6 +42,10 @@ export default class CID extends Multibase {
|
|||
return CID._init(bytes);
|
||||
}
|
||||
|
||||
static fromRegistryPublicKey(pubkey: string | Uint8Array): CID {
|
||||
return CID.fromHash(pubkey, 0, CID_TYPES.RESOLVER);
|
||||
}
|
||||
|
||||
static fromHash(
|
||||
bytes: string | Uint8Array,
|
||||
size: number,
|
||||
|
|
Loading…
Reference in New Issue