Represents an Antimatter Client capable of managing one's domain, performing cryptographic operations as well as performing admin operations against Antimatter's services

Constructors

  • Initializes a new instance of the Client class using the provided credentials.

    Parameters

    • domain: string

      The domain to authenticate the Client with. If subdomain is not provided, this is also the domain upon which actions will be performed. If subdomain is provided, then this is just the authentication domain.

    • Optional apiKey: string

      The API key for the domain for use during authentication.

    • Optional subdomain: string

      The subdomain on which to perform actions. If provided, the Client will be authenticated within the argument domain, but perform actions in this subdomain. Prefer using getClientForPeerDomain on a session for your domain rather than providing this parameter.

    • Optional bearerToken: string

      The bearer token for the domain for use during authentication. If provided, the Client will be authenticated using this token. If both apiKey and bearerToken are provided, apiKey will be used.

    Returns BaseClient

Properties

authz: Authorization
domain: string

Methods

  • Returns undefined | string

  • Returns string

  • Looks up a peer domains information using the Client domain's nickname for the peer domain. The peer domain must exist and be peered with this Client's domain. If so, the peered domain's domain ID is retrieved.

    Parameters

    • nickname: string

      The Client domain's nickname for the peer domain.

    Returns Promise<Domain>

    An object containing the peer domain's domain ID.

  • Parameters

    • Optional tokenLifetime: number

    Returns Promise<any>

  • Checks if a peer domain exists using the Client domain's nickname for the peer domain. The peer domain must exist and be peered with this Client's domain. If a peer domain is peered with the Client's domain as the given nickname, true is returned. If it is not found then false is returned instead. Any failure to determine the existence of a peer will instead throw an error.

    Parameters

    • nickname: string

      The Client domain's nickname for the peer domain.

    Returns Promise<boolean>

    A boolean response indicating whether the peer domain exists.

  • Parameters

    • domain: string

    Returns void

Generated using TypeDoc