Class: DockDidOrDidMethodKey

DockDidOrDidMethodKey()

Either `did:dock:*` or `did:key:*`.

Constructor

new DockDidOrDidMethodKey()

Source:

Members

asDid

Extracts raw underlying value if it's `did:dock:*`, throws an error otherwise.
Source:

asDidMethodKey

Extracts raw underlying value if it's `did:key:*`, throws an error otherwise.
Source:

DidMethodKey :Class.<this>

Type:
  • Class.<this>
Source:

DockDid :Class.<this>

Type:
  • Class.<this>
Source:

isDid

Returns `true` if the underlying value is a `did:dock:*`.
Source:

isDidMethodKey

Returns `true` if the underlying value is a `did:key:* `.
Source:

Qualifier :string

Prefix to form the fully qualified string.
Type:
  • string
Source:

Methods

(static) from(did) → {DockDid|DidMethodKey}

Attempts to instantiate `DockDid` or `DidMethodKey` from the provided object or string.
Parameters:
Name Type Description
did string | DockDid | DidMethodKey | object
Source:
Returns:
Type
DockDid | DidMethodKey

(static) fromQualifiedString(did) → {DockDid|DidMethodKey}

Instantiates `DockDid` or `DidMethodKey` from a fully qualified did string.
Parameters:
Name Type Description
did string fully qualified `dock:did:` or `dock:key:` string
Source:
Returns:
Type
DockDid | DidMethodKey

(static) fromSubstrateValue(did) → {DockDid|DidMethodKey}

Instantiates `DockDid` or `DidMethodKey` from a did or did method key object received from the substrate side.
Parameters:
Name Type Description
did object substrate did or did method key
Source:
Returns:
Type
DockDid | DidMethodKey

(static) isQualifiedString(did) → {boolean}

Checks whether provided string is qualified according to the caller class.
Parameters:
Name Type Description
did string
Source:
Returns:
Type
boolean

changeState(api, method, name, payload, keyRef)

Creates a transaction that will modify the chain state.
Parameters:
Name Type Description
api
method
name
payload
keyRef
Source:

signStateChange(api, name, payload, keyRef) → {object}

Creates signature for the state change with supplied arguments.
Parameters:
Name Type Description
api
name
payload
keyRef
Source:
Returns:
Type
object

toEncodedString()

Returns underlying value encoded according to the specification.
Source:

toQualifiedEncodedString()

Returns fully qualified `did:dock:*` encoded in SS58 or `did:key:*` encoded in BS58.
Source:

toString()

Returns fully qualified `did:dock:*` encoded in SS58 or `did:key:*` encoded in BS58.
Source: