DIDService

public class DIDService

This class implements support the Trusted Key DID (Distributed Identifiers) registry It’s used for opting in/out of the DID registry feature

To find out more about DID see https://w3c-ccg.github.io/did-spec/

  • Static reference to the Trusted Key Wallet API

    Declaration

    Swift

    public static var shared = DIDService(backendUrl: TRUSTEDKEY_API_URL)
  • The URL of the backend REST APIs.

    Declaration

    Swift

    public let backendUrl : String
  • Initialize the wallet API with the given backend URL.

    Declaration

    Swift

    public init(backendUrl : String)

    Parameters

    backendUrl

    The URL of the backend REST APIs.

  • Opt-in to DID registry

    Declaration

    Swift

    public func register(onSuccess: @escaping () -> Void, onError: @escaping (String) -> Void)

    Parameters

    onSuccess

    Success callback, invoked on the main thread.

    onError

    Failure callback , invoked on the main thread with a String error message.

  • Opt-out of DID registry

    Declaration

    Swift

    public func unregister(onSuccess: @escaping () -> Void, onError: @escaping (String) -> Void)

    Parameters

    onSuccess

    Success callback, invoked on the main thread.

    onError

    Failure callback , invoked on the main thread with a String error message.