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 parse provided DID as an 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) fromString(did) → {DockDid|DidMethodKey}

Instantiates `DockDid` or `DidMethodKey` from a fully qualified did string or a raw hex did.
Parameters:
Name Type Description
did string fully qualified `dock:did:` or `dock:key:` or a raw hex DID
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

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:

toJSON()

Converts underlying object to the `JSON` representation suitable for substrate JSON-RPC.
Source:

toQualifiedEncodedString()

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