Skip to content

Latest commit

 

History

History
65 lines (36 loc) · 1.05 KB

CnsRecord.md

File metadata and controls

65 lines (36 loc) · 1.05 KB

@cere-ddc-sdk/ddc / CnsRecord

Class: CnsRecord

The CnsRecord class represents a CNS record.

Example

const cid = '...';
const name = 'example';
const record = new CnsRecord(cid, name);

console.log(CnsRecord.isCnsRecord(record)); // true

Hierarchy

Implements

  • Omit<cns.Record, "cid" | "signature">

Methods

isCnsRecord

isCnsRecord(object): object is CnsRecord

Checks if an object is an instance of CnsRecord.

Parameters

Name Type Description
object unknown The object to check.

Returns

object is CnsRecord

true if the object is an instance of CnsRecord or has the same properties as a CnsRecord, false otherwise.

Properties

cid

Readonly cid: string

The content identifier (CID) of the CNS record.


name

Readonly name: string

The name of the CNS record.

Implementation of

Omit.name