Skip to main content
Version: 1.4

Module: identity_wasm

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Functions

Type Aliases

ResolverConfig

Ƭ ResolverConfig: Object

Configurations for the Resolver.

Type declaration

NameTypeDescription
client?IIotaIdentityClientClient for resolving DIDs of the iota method.
handlers?Map\<string, (did: string) => Promise\<CoreDocument | IToCoreDocument>>Handlers for resolving DIDs from arbitrary DID methods. The keys to the map are expected to match the method name and the values are asynchronous functions returning DID documents. Note that if a client is given the key "iota" may NOT be present in this map.

Functions

verifyEd25519

verifyEd25519(alg, signingInput, decodedSignature, publicKey): void

Verify a JWS signature secured with the EdDSA algorithm and curve Ed25519.

This function is useful when one is composing a IJwsVerifier that delegates EdDSA verification with curve Ed25519 to this function.

Warning

This function does not check whether alg = EdDSA in the protected header. Callers are expected to assert this prior to calling the function.

Parameters

NameType
algJwsAlgorithm
signingInputUint8Array
decodedSignatureUint8Array
publicKeyJwk

Returns

void


encodeB64

encodeB64(data): string

Encode the given bytes in url-safe base64.

Parameters

NameType
dataUint8Array

Returns

string


decodeB64

decodeB64(data): Uint8Array

Decode the given url-safe base64-encoded slice into its raw bytes.

Parameters

NameType
dataUint8Array

Returns

Uint8Array


start

start(): void

Initializes the console error panic hook for better error messages

Returns

void