@cere-ddc-sdk/ddc / 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
-
CnsRecord
Omit
<cns.Record
,"cid"
|"signature"
>
▸ isCnsRecord(object
): object is CnsRecord
Checks if an object is an instance of CnsRecord
.
Name | Type | Description |
---|---|---|
object |
unknown |
The object to check. |
object is CnsRecord
true
if the object is an instance of CnsRecord
or has the same properties as a CnsRecord
, false
otherwise.
• Readonly
cid: string
The content identifier (CID) of the CNS record.
• Readonly
name: string
The name of the CNS record.
Omit.name