Skip to content

Latest commit

 

History

History
2193 lines (1556 loc) · 70.7 KB

api-reference.md

File metadata and controls

2193 lines (1556 loc) · 70.7 KB

Classes

AuthenticationRequest
AuthenticationResponse
Client
Config
CredentialIssuance
CredentialOptionRequest
CredentialOptionResponse
CredentialRevocation
CredentialSelection
DID
DidRequest
DidResponse
DiffChainHistory
Document
DocumentDiff

Defines the difference between two DID [Document]s' JSON representations.

DocumentHistory

A DID Document's history and current state.

FeaturesRequest
FeaturesResponse
IntegrationChainHistory
Introduction
IntroductionProposal
IntroductionResponse
KeyCollection
KeyPair
Network
NewDocument
PresentationRequest
PresentationResponse
ResolutionRequest
ResolutionResponse
Service
Timestamp
Timing
TrustPing
TrustedIssuer
VerifiableCredential
VerifiablePresentation
VerificationMethod

Members

Digest
KeyType

Functions

start()

Initializes the console error panic hook for better error messages

AuthenticationRequest

Kind: global class

authenticationRequest.toJSON() ⇒ any

Kind: instance method of AuthenticationRequest

AuthenticationRequest.fromJSON(value) ⇒ AuthenticationRequest

Kind: static method of AuthenticationRequest

Param Type
value any

AuthenticationResponse

Kind: global class

authenticationResponse.toJSON() ⇒ any

Kind: instance method of AuthenticationResponse

AuthenticationResponse.fromJSON(value) ⇒ AuthenticationResponse

Kind: static method of AuthenticationResponse

Param Type
value any

Client

Kind: global class

new Client()

Creates a new Client with default settings.

client.network() ⇒ Network

Returns the Client Tangle network.

Kind: instance method of Client

client.publishDocument(document) ⇒ Promise.<any>

Publishes an IotaDocument to the Tangle.

Kind: instance method of Client

Param Type
document any

client.publishDiff(message_id, diff) ⇒ Promise.<any>

Publishes a DocumentDiff to the Tangle.

Kind: instance method of Client

Param Type
message_id string
diff DocumentDiff

client.publishJSON(index, data) ⇒ Promise.<any>

Publishes arbitrary JSON data to the specified index on the Tangle.

Kind: instance method of Client

Param Type
index string
data any

client.resolve(did) ⇒ Promise.<any>

Kind: instance method of Client

Param Type
did string

client.resolveHistory(did) ⇒ Promise.<any>

Returns the message history of the given DID.

Kind: instance method of Client

Param Type
did string

client.resolveDiffHistory(document) ⇒ Promise.<any>

Returns the [DiffChainHistory] of a diff chain starting from a document on the integration chain.

NOTE: the document must have been published to the tangle and have a valid message id and authentication method.

Kind: instance method of Client

Param Type
document Document

client.checkCredential(data) ⇒ Promise.<any>

Validates a credential with the DID Document from the Tangle.

Kind: instance method of Client

Param Type
data string

client.checkPresentation(data) ⇒ Promise.<any>

Validates a presentation with the DID Document from the Tangle.

Kind: instance method of Client

Param Type
data string

Client.fromConfig(config) ⇒ Client

Creates a new Client with settings from the given Config.

Kind: static method of Client

Param Type
config Config

Client.fromNetwork(network) ⇒ Client

Creates a new Client with default settings for the given Network.

Kind: static method of Client

Param Type
network Network

Config

Kind: global class

config.setNetwork(network)

Kind: instance method of Config

Param Type
network Network

config.setNode(url)

Kind: instance method of Config

Param Type
url string

config.setPrimaryNode(url, jwt, username, password)

Kind: instance method of Config

Param Type
url string
jwt string | undefined
username string | undefined
password string | undefined

config.setPrimaryPoWNode(url, jwt, username, password)

Kind: instance method of Config

Param Type
url string
jwt string | undefined
username string | undefined
password string | undefined

config.setPermanode(url, jwt, username, password)

Kind: instance method of Config

Param Type
url string
jwt string | undefined
username string | undefined
password string | undefined

config.setNodeAuth(url, jwt, username, password)

Kind: instance method of Config

Param Type
url string
jwt string | undefined
username string | undefined
password string | undefined

config.setNodeSyncInterval(value)

Kind: instance method of Config

Param Type
value number

config.setNodeSyncDisabled()

Kind: instance method of Config

config.setQuorum(value)

Kind: instance method of Config

Param Type
value boolean

config.setQuorumSize(value)

Kind: instance method of Config

Param Type
value number

config.setQuorumThreshold(value)

Kind: instance method of Config

Param Type
value number

config.setLocalPoW(value)

Kind: instance method of Config

Param Type
value boolean

config.setTipsInterval(value)

Kind: instance method of Config

Param Type
value number

config.setRequestTimeout(value)

Kind: instance method of Config

Param Type
value number

Config.fromNetwork(network) ⇒ Config

Kind: static method of Config

Param Type
network Network

CredentialIssuance

Kind: global class

credentialIssuance.toJSON() ⇒ any

Kind: instance method of CredentialIssuance

CredentialIssuance.fromJSON(value) ⇒ CredentialIssuance

Kind: static method of CredentialIssuance

Param Type
value any

CredentialOptionRequest

Kind: global class

credentialOptionRequest.toJSON() ⇒ any

Kind: instance method of CredentialOptionRequest

CredentialOptionRequest.fromJSON(value) ⇒ CredentialOptionRequest

Kind: static method of CredentialOptionRequest

Param Type
value any

CredentialOptionResponse

Kind: global class

credentialOptionResponse.toJSON() ⇒ any

Kind: instance method of CredentialOptionResponse

CredentialOptionResponse.fromJSON(value) ⇒ CredentialOptionResponse

Kind: static method of CredentialOptionResponse

Param Type
value any

CredentialRevocation

Kind: global class

credentialRevocation.toJSON() ⇒ any

Kind: instance method of CredentialRevocation

CredentialRevocation.fromJSON(value) ⇒ CredentialRevocation

Kind: static method of CredentialRevocation

Param Type
value any

CredentialSelection

Kind: global class

credentialSelection.toJSON() ⇒ any

Kind: instance method of CredentialSelection

CredentialSelection.fromJSON(value) ⇒ CredentialSelection

Kind: static method of CredentialSelection

Param Type
value any

DID

Kind: global class

new DID(key, network)

Creates a new DID from a KeyPair object.

Param Type
key KeyPair
network string | undefined

did.network ⇒ Network

Returns the IOTA tangle network of the DID.

Kind: instance property of DID

did.networkName ⇒ string

Returns the IOTA tangle network of the DID.

Kind: instance property of DID

did.tag ⇒ string

Returns the unique tag of the DID.

Kind: instance property of DID

did.toString() ⇒ string

Returns the DID object as a string.

Kind: instance method of DID

DID.fromBase58(key, network) ⇒ DID

Creates a new DID from a base58-encoded public key.

Kind: static method of DID

Param Type
key string
network string | undefined

DID.parse(input) ⇒ DID

Parses a DID from the input string.

Kind: static method of DID

Param Type
input string

DidRequest

Kind: global class

didRequest.toJSON() ⇒ any

Kind: instance method of DidRequest

DidRequest.fromJSON(value) ⇒ DidRequest

Kind: static method of DidRequest

Param Type
value any

DidResponse

Kind: global class

didResponse.toJSON() ⇒ any

Kind: instance method of DidResponse

DidResponse.fromJSON(value) ⇒ DidResponse

Kind: static method of DidResponse

Param Type
value any

DiffChainHistory

Kind: global class

diffChainHistory.chainData() ⇒ Array.<any>

Returns a [js_sys::Array] of $wasm_ty as strings.

NOTE: this clones the field.

Kind: instance method of DiffChainHistory

diffChainHistory.spam() ⇒ Array.<any>

Returns a [js_sys::Array] of [MessageIds][MessageId] as strings.

NOTE: this clones the field.

Kind: instance method of DiffChainHistory

diffChainHistory.toJSON() ⇒ any

Serializes a $ident object as a JSON object.

Kind: instance method of DiffChainHistory

DiffChainHistory.fromJSON(json) ⇒ DiffChainHistory

Deserializes a $ident object from a JSON object.

Kind: static method of DiffChainHistory

Param Type
json any

Document

Kind: global class

new Document(type_, network, tag)

Creates a new DID Document from the given KeyPair.

Param Type
type_ number
network string | undefined
tag string | undefined

document.id ⇒ DID

Returns the DID Document id.

Kind: instance property of Document

document.created ⇒ Timestamp

Returns the timestamp of when the DID document was created.

Kind: instance property of Document

document.created

Sets the timestamp of when the DID document was created.

Kind: instance property of Document

Param Type
timestamp Timestamp

document.updated ⇒ Timestamp

Returns the timestamp of the last DID document update.

Kind: instance property of Document

document.updated

Sets the timestamp of the last DID document update.

Kind: instance property of Document

Param Type
timestamp Timestamp

document.proof ⇒ any

Returns the DID Document proof object.

Kind: instance property of Document

document.messageId ⇒ string

Get the message_id of the DID Document.

Kind: instance property of Document

document.messageId

Set the message_id of the DID Document.

Kind: instance property of Document

Param Type
message_id string

document.previousMessageId ⇒ string

Kind: instance property of Document

document.previousMessageId

Kind: instance property of Document

Param Type
value string

document.authentication() ⇒ VerificationMethod

Returns the default Verification Method of the DID Document.

Kind: instance method of Document

document.insertMethod(method, scope) ⇒ boolean

Kind: instance method of Document

Param Type
method VerificationMethod
scope string | undefined

document.removeMethod(did)

Kind: instance method of Document

Param Type
did DID

document.insertService(service) ⇒ boolean

Kind: instance method of Document

Param Type
service Service

document.removeService(did)

Kind: instance method of Document

Param Type
did DID

document.sign(key)

Signs the DID Document with the default authentication method.

Kind: instance method of Document

Param Type
key KeyPair

document.verify() ⇒ boolean

Verify the signature with the authentication_key

Kind: instance method of Document

document.signCredential(data, args) ⇒ VerifiableCredential

Kind: instance method of Document

Param Type
data any
args any

document.signPresentation(data, args) ⇒ VerifiablePresentation

Kind: instance method of Document

Param Type
data any
args any

document.signData(data, args) ⇒ any

Creates a signature for the given data with the specified DID Document Verification Method.

An additional proof property is required if using a Merkle Key Collection verification Method.

Kind: instance method of Document

Param Type
data any
args any

document.verifyData(data) ⇒ boolean

Verifies the authenticity of data using the target verification method.

Kind: instance method of Document

Param Type
data any

document.resolveKey(query) ⇒ VerificationMethod

Kind: instance method of Document

Param Type
query string

document.revokeMerkleKey(query, index) ⇒ boolean

Kind: instance method of Document

Param Type
query string
index number

document.diff(other, message, key) ⇒ DocumentDiff

Generate the difference between two DID Documents and sign it

Kind: instance method of Document

Param Type
other Document
message string
key KeyPair

document.merge(diff)

Verifies a DocumentDiff signature and merges the changes into self.

Kind: instance method of Document

Param Type
diff DocumentDiff

document.integrationIndex() ⇒ string

Returns the Tangle index of the integration chain for this DID.

This is simply the tag segment of the [IotaDID]. E.g. For an [IotaDocument] doc with DID: did:iota:1234567890abcdefghijklmnopqrstuvxyzABCDEFGHI, doc.integration_index() == "1234567890abcdefghijklmnopqrstuvxyzABCDEFGHI"

Kind: instance method of Document

document.toJSON() ⇒ any

Serializes a Document object as a JSON object.

Kind: instance method of Document

Document.fromKeyPair(key, network) ⇒ Document

Creates a new DID Document from the given KeyPair and optional network.

If unspecified, network defaults to the mainnet.

Kind: static method of Document

Param Type
key KeyPair
network string | undefined

Document.fromAuthentication(method) ⇒ Document

Creates a new DID Document from the given verification [method][Method].

Kind: static method of Document

Param Type
method VerificationMethod

Document.diffIndex(message_id) ⇒ string

Returns the Tangle index of the DID diff chain. This should only be called on documents published on the integration chain.

This is the Base58-btc encoded SHA-256 digest of the hex-encoded message id.

Kind: static method of Document

Param Type
message_id string

Document.fromJSON(json) ⇒ Document

Deserializes a Document object from a JSON object.

Kind: static method of Document

Param Type
json any

DocumentDiff

Defines the difference between two DID [Document]s' JSON representations.

Kind: global class

documentDiff.did ⇒ DID

Returns the DID of the associated DID Document.

Kind: instance property of DocumentDiff

documentDiff.diff ⇒ string

Returns the raw contents of the DID Document diff.

NOTE: clones the data.

Kind: instance property of DocumentDiff

documentDiff.messageId ⇒ string

Returns the message_id of the DID Document diff.

Kind: instance property of DocumentDiff

documentDiff.messageId

Sets the message_id of the DID Document diff.

Kind: instance property of DocumentDiff

Param Type
message_id string

documentDiff.previousMessageId ⇒ string

Returns the Tangle message id of the previous DID Document diff.

Kind: instance property of DocumentDiff

documentDiff.previousMessageId

Sets the Tangle message id of the previous DID Document diff.

Kind: instance property of DocumentDiff

Param Type
message_id string

documentDiff.id() ⇒ DID

Returns the DID of the associated DID Document.

NOTE: clones the data.

Kind: instance method of DocumentDiff

documentDiff.merge(document) ⇒ Document

Returns a new DID Document which is the result of merging self with the given Document.

Kind: instance method of DocumentDiff

Param Type
document Document

DocumentHistory

A DID Document's history and current state.

Kind: global class

documentHistory.integrationChainData() ⇒ Array.<any>

Returns a [js_sys::Array] of integration chain WasmDocuments.

NOTE: clones the data.

Kind: instance method of DocumentHistory

documentHistory.integrationChainSpam() ⇒ Array.<any>

Returns a [js_sys::Array] of message id strings for "spam" messages on the same index as the integration chain.

NOTE: clones the data.

Kind: instance method of DocumentHistory

documentHistory.diffChainData() ⇒ Array.<any>

Returns a [js_sys::Array] of diff chain WasmDocumentDiffs.

NOTE: clones the data.

Kind: instance method of DocumentHistory

documentHistory.diffChainSpam() ⇒ Array.<any>

Returns a [js_sys::Array] of message id strings for "spam" messages on the same index as the diff chain.

NOTE: clones the data.

Kind: instance method of DocumentHistory

documentHistory.toJSON() ⇒ any

Serializes a [WasmDocumentHistory] object as a JSON object.

Kind: instance method of DocumentHistory

DocumentHistory.fromJSON(json) ⇒ DocumentHistory

Deserializes a [WasmDocumentHistory] object from a JSON object.

Kind: static method of DocumentHistory

Param Type
json any

FeaturesRequest

Kind: global class

featuresRequest.toJSON() ⇒ any

Kind: instance method of FeaturesRequest

FeaturesRequest.fromJSON(value) ⇒ FeaturesRequest

Kind: static method of FeaturesRequest

Param Type
value any

FeaturesResponse

Kind: global class

featuresResponse.toJSON() ⇒ any

Kind: instance method of FeaturesResponse

FeaturesResponse.fromJSON(value) ⇒ FeaturesResponse

Kind: static method of FeaturesResponse

Param Type
value any

IntegrationChainHistory

Kind: global class

integrationChainHistory.chainData() ⇒ Array.<any>

Returns a [js_sys::Array] of $wasm_ty as strings.

NOTE: this clones the field.

Kind: instance method of IntegrationChainHistory

integrationChainHistory.spam() ⇒ Array.<any>

Returns a [js_sys::Array] of [MessageIds][MessageId] as strings.

NOTE: this clones the field.

Kind: instance method of IntegrationChainHistory

integrationChainHistory.toJSON() ⇒ any

Serializes a $ident object as a JSON object.

Kind: instance method of IntegrationChainHistory

IntegrationChainHistory.fromJSON(json) ⇒ IntegrationChainHistory

Deserializes a $ident object from a JSON object.

Kind: static method of IntegrationChainHistory

Param Type
json any

Introduction

Kind: global class

introduction.toJSON() ⇒ any

Kind: instance method of Introduction

Introduction.fromJSON(value) ⇒ Introduction

Kind: static method of Introduction

Param Type
value any

IntroductionProposal

Kind: global class

introductionProposal.toJSON() ⇒ any

Kind: instance method of IntroductionProposal

IntroductionProposal.fromJSON(value) ⇒ IntroductionProposal

Kind: static method of IntroductionProposal

Param Type
value any

IntroductionResponse

Kind: global class

introductionResponse.toJSON() ⇒ any

Kind: instance method of IntroductionResponse

IntroductionResponse.fromJSON(value) ⇒ IntroductionResponse

Kind: static method of IntroductionResponse

Param Type
value any

KeyCollection

Kind: global class

new KeyCollection(type_, count)

Creates a new KeyCollection with the specified key type.

Param Type
type_ number
count number

keyCollection.length ⇒ number

Returns the number of keys in the collection.

Kind: instance property of KeyCollection

keyCollection.isEmpty() ⇒ boolean

Returns true if the collection contains no keys.

Kind: instance method of KeyCollection

keyCollection.keypair(index) ⇒ KeyPair | undefined

Returns the keypair at the specified index.

Kind: instance method of KeyCollection

Param Type
index number

keyCollection.public(index) ⇒ string | undefined

Returns the public key at the specified index as a base58-encoded string.

Kind: instance method of KeyCollection

Param Type
index number

keyCollection.secret(index) ⇒ string | undefined

Returns the secret key at the specified index as a base58-encoded string.

Kind: instance method of KeyCollection

Param Type
index number

keyCollection.merkleRoot(digest) ⇒ string

Kind: instance method of KeyCollection

Param Type
digest number

keyCollection.merkleProof(digest, index) ⇒ string | undefined

Kind: instance method of KeyCollection

Param Type
digest number
index number

keyCollection.toJSON() ⇒ any

Serializes a KeyCollection object as a JSON object.

Kind: instance method of KeyCollection

KeyCollection.fromJSON(json) ⇒ KeyCollection

Deserializes a KeyCollection object from a JSON object.

Kind: static method of KeyCollection

Param Type
json any

KeyPair

Kind: global class

new KeyPair(type_)

Generates a new KeyPair object.

Param Type
type_ number

keyPair.public ⇒ string

Returns the public key as a base58-encoded string.

Kind: instance property of KeyPair

keyPair.secret ⇒ string

Returns the secret key as a base58-encoded string.

Kind: instance property of KeyPair

keyPair.toJSON() ⇒ any

Serializes a KeyPair object as a JSON object.

Kind: instance method of KeyPair

KeyPair.fromBase58(type_, public_key, secret_key) ⇒ KeyPair

Parses a KeyPair object from base58-encoded public/secret keys.

Kind: static method of KeyPair

Param Type
type_ number
public_key string
secret_key string

KeyPair.fromJSON(json) ⇒ KeyPair

Deserializes a KeyPair object from a JSON object.

Kind: static method of KeyPair

Param Type
json any

Network

Kind: global class

network.defaultNodeURL ⇒ string | undefined

Returns the node URL of the Tangle network.

Kind: instance property of Network

network.explorerURL ⇒ string | undefined

Returns the web explorer URL of the Tangle network.

Kind: instance property of Network

network.messageURL(message_id) ⇒ string

Returns the web explorer URL of the given message.

Kind: instance method of Network

Param Type
message_id string

network.toString() ⇒ string

Kind: instance method of Network

Network.try_from_name(name) ⇒ Network

Parses the provided string to a [WasmNetwork].

Kind: static method of Network

Param Type
name string

Network.mainnet() ⇒ Network

Kind: static method of Network

Network.testnet() ⇒ Network

Kind: static method of Network

NewDocument

Kind: global class

newDocument.key ⇒ KeyPair

Kind: instance property of NewDocument

newDocument.doc ⇒ Document

Kind: instance property of NewDocument

PresentationRequest

Kind: global class

presentationRequest.toJSON() ⇒ any

Kind: instance method of PresentationRequest

PresentationRequest.fromJSON(value) ⇒ PresentationRequest

Kind: static method of PresentationRequest

Param Type
value any

PresentationResponse

Kind: global class

presentationResponse.toJSON() ⇒ any

Kind: instance method of PresentationResponse

PresentationResponse.fromJSON(value) ⇒ PresentationResponse

Kind: static method of PresentationResponse

Param Type
value any

ResolutionRequest

Kind: global class

resolutionRequest.toJSON() ⇒ any

Kind: instance method of ResolutionRequest

ResolutionRequest.fromJSON(value) ⇒ ResolutionRequest

Kind: static method of ResolutionRequest

Param Type
value any

ResolutionResponse

Kind: global class

resolutionResponse.toJSON() ⇒ any

Kind: instance method of ResolutionResponse

ResolutionResponse.fromJSON(value) ⇒ ResolutionResponse

Kind: static method of ResolutionResponse

Param Type
value any

Service

Kind: global class

service.toJSON() ⇒ any

Serializes a Service object as a JSON object.

Kind: instance method of Service

Service.fromJSON(value) ⇒ Service

Deserializes a Service object from a JSON object.

Kind: static method of Service

Param Type
value any

Timestamp

Kind: global class

timestamp.toRFC3339() ⇒ string

Returns the Timestamp as an RFC 3339 String.

Kind: instance method of Timestamp

Timestamp.parse(input) ⇒ Timestamp

Parses a Timestamp from the provided input string.

Kind: static method of Timestamp

Param Type
input string

Timestamp.nowUTC() ⇒ Timestamp

Creates a new Timestamp with the current date and time.

Kind: static method of Timestamp

Timing

Kind: global class

timing.outTime ⇒ string | undefined

Kind: instance property of Timing

timing.outTime

Kind: instance property of Timing

Param Type
value string

timing.inTime ⇒ string | undefined

Kind: instance property of Timing

timing.inTime

Kind: instance property of Timing

Param Type
value string

timing.staleTime ⇒ string | undefined

Kind: instance property of Timing

timing.staleTime

Kind: instance property of Timing

Param Type
value string

timing.expiresTime ⇒ string | undefined

Kind: instance property of Timing

timing.expiresTime

Kind: instance property of Timing

Param Type
value string

timing.waitUntilTime ⇒ string | undefined

Kind: instance property of Timing

timing.waitUntilTime

Kind: instance property of Timing

Param Type
value string

timing.delayMilli ⇒ number | undefined

Kind: instance property of Timing

timing.delayMilli

Kind: instance property of Timing

Param Type
value number

timing.toJSON() ⇒ any

Kind: instance method of Timing

Timing.fromJSON(value) ⇒ Timing

Kind: static method of Timing

Param Type
value any

TrustPing

Kind: global class

trustPing.toJSON() ⇒ any

Kind: instance method of TrustPing

TrustPing.fromJSON(value) ⇒ TrustPing

Kind: static method of TrustPing

Param Type
value any

TrustedIssuer

Kind: global class

trustedIssuer.toJSON() ⇒ any

Kind: instance method of TrustedIssuer

TrustedIssuer.fromJSON(value) ⇒ TrustedIssuer

Kind: static method of TrustedIssuer

Param Type
value any

VerifiableCredential

Kind: global class

verifiableCredential.toJSON() ⇒ any

Serializes a VerifiableCredential object as a JSON object.

Kind: instance method of VerifiableCredential

VerifiableCredential.extend(value) ⇒ VerifiableCredential

Kind: static method of VerifiableCredential

Param Type
value any

VerifiableCredential.issue(issuer_doc, subject_data, credential_type, credential_id) ⇒ VerifiableCredential

Kind: static method of VerifiableCredential

Param Type
issuer_doc Document
subject_data any
credential_type string | undefined
credential_id string | undefined

VerifiableCredential.fromJSON(json) ⇒ VerifiableCredential

Deserializes a VerifiableCredential object from a JSON object.

Kind: static method of VerifiableCredential

Param Type
json any

VerifiablePresentation

Kind: global class

new VerifiablePresentation(holder_doc, credential_data, presentation_type, presentation_id)

Param Type
holder_doc Document
credential_data any
presentation_type string | undefined
presentation_id string | undefined

verifiablePresentation.toJSON() ⇒ any

Serializes a VerifiablePresentation object as a JSON object.

Kind: instance method of VerifiablePresentation

VerifiablePresentation.fromJSON(json) ⇒ VerifiablePresentation

Deserializes a VerifiablePresentation object from a JSON object.

Kind: static method of VerifiablePresentation

Param Type
json any

VerificationMethod

Kind: global class

new VerificationMethod(key, tag)

Creates a new VerificationMethod object from the given key.

Param Type
key KeyPair
tag string | undefined

verificationMethod.id ⇒ DID

Returns the id DID of the VerificationMethod object.

Kind: instance property of VerificationMethod

verificationMethod.controller ⇒ DID

Returns the controller DID of the VerificationMethod object.

Kind: instance property of VerificationMethod

verificationMethod.type ⇒ string

Returns the VerificationMethod type.

Kind: instance property of VerificationMethod

verificationMethod.data ⇒ any

Returns the VerificationMethod public key data.

Kind: instance property of VerificationMethod

verificationMethod.toJSON() ⇒ any

Serializes a VerificationMethod object as a JSON object.

Kind: instance method of VerificationMethod

VerificationMethod.fromDID(did, key, tag) ⇒ VerificationMethod

Creates a new VerificationMethod object from the given did and key.

Kind: static method of VerificationMethod

Param Type
did DID
key KeyPair
tag string | undefined

VerificationMethod.createMerkleKey(digest, did, keys, tag) ⇒ VerificationMethod

Creates a new Merkle Key Collection Method from the given key collection.

Kind: static method of VerificationMethod

Param Type
digest number
did DID
keys KeyCollection
tag string | undefined

VerificationMethod.fromJSON(value) ⇒ VerificationMethod

Deserializes a VerificationMethod object from a JSON object.

Kind: static method of VerificationMethod

Param Type
value any

Digest

Kind: global variable

KeyType

Kind: global variable

start()

Initializes the console error panic hook for better error messages

Kind: global function