WalletSecureEnrollmentService

public final actor WalletSecureEnrollmentService

Wallet secure enrollment service is used to seurely enroll the wallet and download the required assets.

  • The different states in Wallet secure enrollment.

    See more

    Declaration

    Swift

    public enum State : Sendable
  • Wallet secure enrollment service error

    See more

    Declaration

    Swift

    public enum Error : Sendable
    extension WalletSecureEnrollmentService.Error: Error
  • eventStream Asynchronous

    Await the result from enroll().

    Declaration

    Swift

    public var eventStream: AsyncStream<State> { get async }

    Return Value

    Stream of State.

  • Initializes the WalletSecureEnrollmentService.

    Declaration

    Swift

    public init()
  • isEnrolled() Asynchronous

    Checks if wallet secure enrollment is already performed.

    Throws

    clientError(_:) if error on get provisioning service to read the wallet enrollment state.

    Declaration

    Swift

    public func isEnrolled() async throws -> Bool

    Return Value

    true if it’s enrolled. Otherwise, false.

  • enroll() Asynchronous

    Enroll wallet secure enrollment. Enrollment is triggered when the isEnrolled() returns false.

    Throws

    clientError(_:) if error encountered on enrollment.

    Declaration

    Swift

    public func enroll() async throws