Skip to main content

KeyIdStorage

@iota/identity-wasm API documentation


Interface: KeyIdStorage

Key value Storage for key ids under MethodDigest.

Properties​

insertKeyId()​

insertKeyId: (methodDigest, keyId) => Promise<void>

Insert a key id into the KeyIdStorage under the given MethodDigest.

If an entry for key already exists in the storage an error must be returned immediately without altering the state of the storage.

Parameters​

methodDigest​

MethodDigest

keyId​

string

Returns​

Promise<void>


getKeyId()​

getKeyId: (methodDigest) => Promise<string>

Obtain the key id associated with the given MethodDigest.

Parameters​

methodDigest​

MethodDigest

Returns​

Promise<string>


deleteKeyId()​

deleteKeyId: (methodDigest) => Promise<void>

Delete the KeyId associated with the given MethodDigest from the KeyIdStorage.

If key is not found in storage, an Error must be returned.

Parameters​

methodDigest​

MethodDigest

Returns​

Promise<void>