DID
@nevermined-io/sdk - v3.0.44 / DID
Class: DID
Decentralized ID.
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new DID(id
): DID
Parameters
Name | Type |
---|---|
id | string |
Returns
Defined in
Properties
id
• Private
id: string
Short ID.
Defined in
Methods
getDid
▸ getDid(): string
Returns the DID (i.e did:nv:...)
Returns
string
A string with the prefixed id.
Defined in
getEncoded
▸ getEncoded(): string
Generates an encoded string in base 36 from a DID.
Returns
string
A base36 encoded string.
Defined in
getId
▸ getId(): string
Returns the Short ID.
Returns
string
A string of the id without the prefix.
Defined in
fromEncoded
▸ fromEncoded(encoded
): DID
Returns a new DID from a base36 encoded string.
Parameters
Name | Type | Description |
---|---|---|
encoded | string | Base36 encoded string. |
Returns
Defined in
generate
▸ generate(): DID
Returns a new DID.
Returns
Defined in
parse
▸ parse(didString
): DID
Parses a DID from a string.
Parameters
Name | Type | Description |
---|---|---|
didString | string | DID | DID in string format or DID instance. The didString can be in did:nv: format or 0x: format. |
Returns
Defined in
parseBigInt
▸ parseBigInt(value
, radix?
): any
Parameters
Name | Type | Default value |
---|---|---|
value | any | undefined |
radix | number | 36 |
Returns
any