Skip to main content

Class: DidMethod

Hierarchy

  • BaseMethod

    DidMethod

Implements

Constructors

constructor

new DidMethod(stores, events)

Parameters

NameType
storesNamedRegistry
eventsNamedRegistry

Inherited from

BaseMethod.constructor

Defined in

node_modules/klayr-framework/dist-node/modules/base_method.d.ts:5

Properties

config

config: DidModuleConfig

Defined in

packages/klayr-did-module/dist/method.d.ts:5


events

Protected events: NamedRegistry

Inherited from

BaseMethod.events

Defined in

node_modules/klayr-framework/dist-node/modules/base_method.d.ts:4


stores

Protected stores: NamedRegistry

Inherited from

BaseMethod.stores

Defined in

node_modules/klayr-framework/dist-node/modules/base_method.d.ts:3

Methods

addControllers

addControllers(methodContext, senderPublicKey, target, controllers, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
controllersstring[]
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.addControllers

Defined in

packages/klayr-did-module/dist/method.d.ts:15


addKeys

addKeys(methodContext, senderPublicKey, target, keys, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
keysKeysCommand[]
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.addKeys

Defined in

packages/klayr-did-module/dist/method.d.ts:13


addServiceEndpoint

addServiceEndpoint(methodContext, senderPublicKey, target, endpoint, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
endpointObject
endpoint.idstring
endpoint.serviceEndpointstring
endpoint.typestring
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.addServiceEndpoint

Defined in

packages/klayr-did-module/dist/method.d.ts:17


authorize

authorize(methodContext, did, factors): Promise<AuthorizationResult[]>

Parameters

NameType
methodContextMethodContext
didstring
factorsAuthorizationFactors

Returns

Promise<AuthorizationResult[]>

Implementation of

DidMethod.authorize

Defined in

packages/klayr-did-module/dist/method.d.ts:11


create

create(methodContext, senderPublicKey, did, controllers, keys): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
didstring
controllersstring[]
keysKeysCommand[]

Returns

Promise<void>

Implementation of

DidMethod.create

Defined in

packages/klayr-did-module/dist/method.d.ts:12


deactivate

deactivate(methodContext, senderPublicKey, target, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.deactivate

Defined in

packages/klayr-did-module/dist/method.d.ts:23


getConfig

getConfig(): DidModuleConfig

Returns

DidModuleConfig

Implementation of

DidMethod.getConfig

Defined in

packages/klayr-did-module/dist/method.d.ts:7


getNonce

getNonce(methodContext, did): Promise<{ nonce: string }>

Parameters

NameType
methodContextMethodContext
didstring

Returns

Promise<{ nonce: string }>

Implementation of

DidMethod.getNonce

Defined in

packages/klayr-did-module/dist/method.d.ts:9


incrementNonce

incrementNonce(methodContext, did): Promise<void>

Parameters

NameType
methodContextMethodContext
didstring

Returns

Promise<void>

Implementation of

DidMethod.incrementNonce

Defined in

packages/klayr-did-module/dist/method.d.ts:10


init

init(config): void

Parameters

NameType
configDidModuleConfig

Returns

void

Implementation of

DidMethod.init

Defined in

packages/klayr-did-module/dist/method.d.ts:6


read

read(methodContext, did): Promise<DidDocument>

Parameters

NameType
methodContextMethodContext
didstring

Returns

Promise<DidDocument>

Implementation of

DidMethod.read

Defined in

packages/klayr-did-module/dist/method.d.ts:8


removeControllers

removeControllers(methodContext, senderPublicKey, target, controllers, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
controllersstring[]
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.removeControllers

Defined in

packages/klayr-did-module/dist/method.d.ts:16


removeKeys

removeKeys(methodContext, senderPublicKey, target, publicKeys, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
publicKeysBuffer[]
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.removeKeys

Defined in

packages/klayr-did-module/dist/method.d.ts:14


removeServiceEndpoint

removeServiceEndpoint(methodContext, senderPublicKey, target, endpointId, signer, signature?): Promise<void>

Parameters

NameType
methodContextMethodContext
senderPublicKeyBuffer
targetstring
endpointIdstring
signerstring
signature?Buffer

Returns

Promise<void>

Implementation of

DidMethod.removeServiceEndpoint

Defined in

packages/klayr-did-module/dist/method.d.ts:22