mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
docs and cleanup
This commit is contained in:
parent
f51e631536
commit
10575af718
@ -47,9 +47,9 @@ interface IDIDParse {
|
|||||||
* The function didParse will parse all types of DID's including Ocean DID
|
* The function didParse will parse all types of DID's including Ocean DID
|
||||||
* If this is a Ocean DID the function will return record with the value
|
* If this is a Ocean DID the function will return record with the value
|
||||||
* `idHex` set to a hex string ( without the leading 0x ).
|
* `idHex` set to a hex string ( without the leading 0x ).
|
||||||
*
|
*
|
||||||
* :param did: did string to parse
|
* :param did: did string to parse
|
||||||
*
|
*
|
||||||
* :return ParseRecord
|
* :return ParseRecord
|
||||||
* method - method of DID
|
* method - method of DID
|
||||||
* id - id of the DID
|
* id - id of the DID
|
||||||
@ -83,7 +83,7 @@ export function didParse(did: string): IDIDParse {
|
|||||||
* Validate a Ocean DID, return true if valid, else false
|
* Validate a Ocean DID, return true if valid, else false
|
||||||
*
|
*
|
||||||
* :param did: string to validate as an Ocean DID
|
* :param did: string to validate as an Ocean DID
|
||||||
*
|
*
|
||||||
* :return true if the DID is valid
|
* :return true if the DID is valid
|
||||||
*/
|
*/
|
||||||
export function isDIDValid(did: string): boolean {
|
export function isDIDValid(did: string): boolean {
|
||||||
@ -96,7 +96,7 @@ export function isDIDValid(did: string): boolean {
|
|||||||
*
|
*
|
||||||
* :param id: can be a hex string with or without the leading '0x'
|
* :param id: can be a hex string with or without the leading '0x'
|
||||||
* :param method: if empty, default to 'op'
|
* :param method: if empty, default to 'op'
|
||||||
*
|
*
|
||||||
* :return a valid DID
|
* :return a valid DID
|
||||||
* :return '0' for a 0 DID
|
* :return '0' for a 0 DID
|
||||||
*/
|
*/
|
||||||
@ -132,9 +132,9 @@ export function didToId(did: string): string {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert an Ocean DID string to 32 bytes
|
* Convert an Ocean DID string to 32 bytes
|
||||||
*
|
*
|
||||||
* :param did: string starting with "did:op:"
|
* :param did: string starting with "did:op:"
|
||||||
*
|
*
|
||||||
* :return 32 byte array of the Id in the DID
|
* :return 32 byte array of the Id in the DID
|
||||||
* :return null if the DID is a invalid Ocean DID
|
* :return null if the DID is a invalid Ocean DID
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user