Implements

Description

Implements SIWE (Sign In With Ethereum) functionality. This class is responsible for initializing the SIWE message, sending requests, connecting, and requesting the download of QR codes.

See

https://didpass-wallet.gitbook.io/didpass-wallet-sdk/

Hierarchy

  • SiweServiceClient

Implements

Constructors

Properties

ERROR_CREDENTIAL_ID_MISSING: "Credential ID is missing." = 'Credential ID is missing.'
ERROR_DID_MISSING: "Decentralized Identifier (DID) is missing." = 'Decentralized Identifier (DID) is missing.'
ERROR_INIT_NOT_CALLED: "Init not called" = 'Init not called'
ERROR_PROOF_TOKEN_MISSING: "Proof Token is missing." = 'Proof Token is missing.'
ERROR_QR_MISSING: "QR code data is missing." = 'QR code data is missing.'
credentialId: null | string = null
did: null | string = null
qr: null | QrScanResult = null
signer: null | Wallet = null
siweMessageObj: null | SiweMessage = null

Methods

  • Parameters

    • key: string

      The key for the ethers Wallet.

    • domain: string

      The domain for the SIWE message.

    • baseUrl: string

      The base URL for the SIWE message.

    • did: string

      The Decentralized Identifier (DID).

    • qr: QrScanResult

      The QR scan result.

    • Optional credentialId: string

      The optional Credential ID.

    Returns Promise<void>

    Method

    Async

    Name

    init

    Description

    Initializes the SIWE service client with the provided parameters.

Generated using TypeDoc