zkID Login Doc
  • Guide
    • Introduction
      • Why zkID-Login
      • DID Account Management
      • VC Management
      • Blockchain Connection
    • Basic Concepts
      • DID
        • DID Protocol Main Architecture
        • ZK DID Method
        • DID-Keys
      • VC
        • What are Verifiable Credentials
        • Key roles of VC
        • Core Data Model
    • Architecture
      • zkID Wallet
      • Provider
    • Usage of VC
      • Digest Disclosure
      • Selective Disclosure
      • All Credential Content Disclosure
  • API Reference
    • Provider API
    • Events
    • Errors
    • Using The Provider
  • SDK
    • Introduction
    • Method
      • verifyDidLogin
      • verifyCredentialDigest
      • verifyCredentialContent
  • Getting Started
    • Preliminary Preparation
    • Use Case
      • Login with DID
      • Login with Digest Disclosure
      • Login with Selective Disclosure
Powered by GitBook
On this page
  • zkID_Wallet_didLoggedChanged(did_changed)
  • Usage
  • Example
  • zkID_Wallet_lock(lock)
  • Usage
  • Example
  • zkID_Wallet_unlock(unlock)
  • Usage
  • Example
  1. API Reference

Events

PreviousProvider APINextErrors

Last updated 2 years ago

All providers implements the EventEmitter API. This sections details the events emitted via that API. All the common Event which may take place in the zkID Login are listed as follow.

These events are triggered when the internal state of the zkID Wallet changes.

zkID_Wallet_didLoggedChanged(did_changed)

Usage

  • When the DID selected in the zkID Wallet is changed, this event will be emitted.

You can use provider.on to catch this event. Here is an example of using our to listen to this event.

Example

provider.on('did_changed', (did) => {
  // Handle the new did when wallet selected did changed
  // `did` is an Object of `DidInfo`
})

zkID_Wallet_lock(lock)

Usage

  • When the zkID Wallet is locked, this event will be emitted.

Example

provider.on('lock', (did) => {
  // Handle the wallet locked
})

zkID_Wallet_unlock(unlock)

Usage

  • When the zkID Wallet is unlocked, this event will be emitted.

Example

provider.on('unlock', (did) => {
  // Handle the wallet unlock
})

You can use provider.on to catch this event. Here is an example of using our to listen to this event.

You can use provider.on to catch this event. Here is an example of using our to listen to this event.

Provider
Provider
Provider
zkID_Wallet_didLoggedChanged(did_changed)
zkID_Wallet_lock(lock)
zkID_Wallet_unlock(unlock)