signify-ts
    Preparing search index...

    Class Challenges

    Challenges

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Generate a random challenge word list based on BIP39

      Parameters

      • strength: number = 128

        Integer representing the strength of the challenge. Typically 128 or 256

      Returns Promise<
          { authenticated?: boolean; dt?: string; said?: string; words: string[] },
      >

      A promise to the generated challenge

    • Respond to a challenge by signing a message with the list of words

      Parameters

      • name: string

        Name or alias of the identifier

      • recipient: string

        Prefix of the recipient of the response

      • words: string[]

        List of words to embed in the signed response

      Returns Promise<
          | {
              a: unknown;
              d: string;
              dt: string;
              e: { [key: string]: unknown };
              i: string;
              p: string;
              q: { [key: string]: unknown };
              r: string;
              rp: string;
              t: string;
              v: string;
          }
          | {
              a: unknown;
              d: string;
              dt: string;
              i: string;
              p: string;
              q: { [key: string]: unknown };
              r: string;
              t: string;
              v: string;
              x: string;
          },
      >

      A promise to the signed response exn message

    • Mark challenge response as signed and accepted

      Parameters

      • source: string

        Prefix of the identifier that was challenged

      • said: string

        qb64 AID of exn message representing the signed response

      Returns Promise<Response>

      A promise to the result

    • Ask Agent to verify a given sender signed the provided words

      Parameters

      • source: string

        Prefix of the identifier that was challenged

      • words: string[]

        List of challenge words to check for

      Returns Promise<
          | { done: false; metadata?: { words: string[] }; name: string }
          | {
              done: true;
              metadata?: { words: string[] };
              name: string;
              response: {
                  exn:
                      | {
                          a: unknown;
                          d: string;
                          dt: string;
                          e: { [key: string]: unknown };
                          i: string;
                          p: string;
                          q: { [key: string]: unknown };
                          r: string;
                          rp: string;
                          t: string;
                          v: string;
                      }
                      | {
                          a: unknown;
                          d: string;
                          dt: string;
                          i: string;
                          p: string;
                          q: { [key: string]: unknown };
                          r: string;
                          t: string;
                          v: string;
                          x: string;
                      };
              };
          }
          | {
              done: true;
              error: {
                  code: number;
                  details?: null
                  | { [key: string]: unknown };
                  message: string;
              };
              metadata?: { words: string[] };
              name: string;
          },
      >

      A promise to the long running operation