def main(args: Sequence[str] = None) -> int:
    """
    Main line for script: check arguments and dispatch operation to set nym.

    :param args: command-line arguments
    :return: 0 for OK, 1 for failure
    """

    logging.basicConfig(
        level=logging.INFO,
        format='%(asctime)-15s | %(levelname)-8s | %(message)s',
        datefmt='%Y-%m-%d %H:%M:%S')
    logging.getLogger('von_anchor').setLevel(logging.WARNING)
    logging.getLogger('indy').setLevel(logging.ERROR)

    if args is None:
        args = sys.argv[1:]

    if len(sys.argv) == 2:
        try:
            return do_wait(setnym(sys.argv[1]))
        except VonAnchorError as vax:
            print(str(vax))
            return 1
    else:
        usage()
        return 1
Main line for script: check arguments and dispatch operation to set nym.

    :param args: command-line arguments
    :return: 0 for OK, 1 for failure