<commit_before>import * as base64url from 'base64-url';

/**
 * Implements a SQRL URL generator and parser.
 * Based on https://www.grc.com/sqrl/protocol.htm
 * Unit tests are in SqrlUrl.tests.ts.
 */
export class SqrlUrl {
  constructor(url: string) {

  }
}

/**
 * Creates SQRL URLs. The static methods may be used directly, or else an instance
 * of this class may be instantiated with configuration information to reduce
 * the number of parameters a caller has to pass.
 */
export class SqrlUrlFactory {
  /**
   * Creates a SQRL URL from full "nut" metadata.
   * @param secure Whether the server is using TLS, which maps to the 'sqrl://' or 'qrl://' schemes.
   * @param domain The site domain, e.g. "www.foo.com"
   * @param serverNut The opaque, unique server data generated for this URL, passed as the nut= query parameter.
   * @param pathString Optional path string, e.g. "path/to/sqrlLogin". May start with a forward slash.
   * @param domainExtension When positive, specifies the value to place into the x= query parameter that tells the client how many characters of the pathString to include in its server key hash.
   * @param serverFriendlyName Optional server friendly name for display in the SQRL client. When specified, adds the sfn= query parameter.
   */
  public static create(
      secure: boolean,
      domain: string,
      serverNut: string | Buffer,
      pathString?: string,
      domainExtension?: number,<commit_msg>Remove SQRL URL decoder empty class - typical usage is for SQRL URLs to be manipulated as whole units once created<commit_after>import * as base64url from 'base64-url';

/**
 * Creates SQRL URLs. The static methods may be used directly, or else an instance
 * of this class may be instantiated with configuration information to reduce
 * the number of parameters a caller has to pass.
 */
export class SqrlUrlFactory {
  /**
   * Creates a SQRL URL from full "nut" metadata.
   * @param secure Whether the server is using TLS, which maps to the 'sqrl://' or 'qrl://' schemes.
   * @param domain The site domain, e.g. "www.foo.com"
   * @param serverNut The opaque, unique server data generated for this URL, passed as the nut= query parameter.
   * @param pathString Optional path string, e.g. "path/to/sqrlLogin". May start with a forward slash.
   * @param domainExtension When positive, specifies the value to place into the x= query parameter that tells the client how many characters of the pathString to include in its server key hash.
   * @param serverFriendlyName Optional server friendly name for display in the SQRL client. When specified, adds the sfn= query parameter.
   */
  public static create(
      secure: boolean,
      domain: string,
      serverNut: string | Buffer,
      pathString?: string,
      domainExtension?: number,
{'fraction_non_alphanumeric': 0.07711531595858621, 'fraction_numerical': 0.002856122813280971, 'mean_word_length': 3.5193548387096776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4712055', 'n_tokens_mistral': 774, 'n_tokens_neox': 752, 'n_words': 372}