Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DocID

Index

Constructors

constructor

  • new DocID(doctype: string | number, cid: CID | string, commit?: CID | string | number, multibaseName?: string): DocID
  • Parameters

    • doctype: string | number
    • cid: CID | string
    • Default value commit: CID | string | number = null
    • Default value multibaseName: string = DEFAULT_BASE

    Returns DocID

Accessors

baseID

bytes

  • get bytes(): Uint8Array

cid

  • get cid(): CID

codec

  • get codec(): string

commit

  • get commit(): CID | undefined

multibaseName

  • get multibaseName(): string

multihash

  • get multihash(): Uint8Array

type

  • get type(): number

typeName

  • get typeName(): string

Methods

[Symbol.for('nodejs.util.inspect.custom')]

  • [Symbol.for('nodejs.util.inspect.custom')](): string

[Symbol.toPrimitive]

  • [Symbol.toPrimitive](): string | Uint8Array

equals

  • equals(other: DocID | Uint8Array | string): boolean

toBaseEncodedString

  • toBaseEncodedString(base?: string): string

toString

  • toString(base?: string): string

toUrl

  • toUrl(): string

Static _genesisCIDLength

  • _genesisCIDLength(bytes: Uint8Array): number

Static fromBytes

  • fromBytes(bytes: Uint8Array, commit?: CID | string, multibaseName?: string): DocID

Static fromOther

  • fromOther(other: DocID, commit?: CID | string): DocID
  • Copies the given DocID and returns a copy of it, optionally changing the commit to the one provided

    Parameters

    • other: DocID
    • Optional commit: CID | string

    Returns DocID

Static fromString

  • fromString(docId: string, commit?: CID | string): DocID

Static isDocID

  • isDocID(other: any): boolean