Function extractProfile

  • Extracts a profile from an encoded token and optionally verifies it, if publicKeyOrAddress is provided.

    Parameters

    • token: string

      the token to be extracted

    • publicKeyOrAddress: null | string = null

      the public key or address of the keypair that is thought to have signed the token

    Returns Record<string, any>

    • the profile extracted from the encoded token

    Throws

    • if the token isn't signed by the provided publicKeyOrAddress

Generated using TypeDoc