If in any proceedings before a grand jury or special inquiry judge, a person refuses, or indicates in advance a refusal, to testify or provide evidence of any other kind on the ground that he or she may be incriminated thereby, and if a public attorney requests the court to order that person to testify or provide the evidence, the court shall then hold a hearing and shall so order unless it finds that to do so would be clearly contrary to the public interest, and that person shall comply with the order. The hearing shall be subject to the provisions of RCW 10.27.080 and 10.27.090, unless the witness shall request that the hearing be public.
If, but for this section, he or she would have been privileged to withhold the answer given or the evidence produced by him or her, the witness may not refuse to comply with the order on the basis of his or her privilege against self-incrimination; but he or she shall not be prosecuted or subjected to criminal penalty or forfeiture for or on account of any transaction, matter, or fact concerning which he or she has been ordered to testify pursuant to this section. He or she may nevertheless be prosecuted for failing to comply with the order to answer, or for perjury or for offering false evidence to the grand jury.
RCW 10.27.130