If any person shall ask to be excused from attending and testifying or from producing any books, papers, records, correspondence or other documents at any hearing on the ground that the testimony or evidence required may tend to incriminate or subject the person to a penalty or forfeiture, and shall notwithstanding be directed to give the testimony or produce the evidence, the person shall nonetheless comply with the direction, but shall not after this be prosecuted or subjected to any penalty or forfeiture on account of any transaction, matter, or thing concerning on which the person may testify or produce evidence, and no testimony given or evidence produced shall be received against the person upon any criminal action, investigation, or proceeding. However, no person testifying shall be exempt from prosecution or punishment for any perjury committed while testifying and the testimony or evidence given or produced shall be admissible against the person upon any criminal action, investigation, or proceeding concerning that perjury, nor shall the person be exempt from the refusal, revocation, or suspension of any license, permission, or authority conferred, or to be conferred, pursuant to the insurance law of this state. Any person may execute, acknowledge, and file in the office of the commissioner a statement expressly waiving this immunity or privilege in respect to any transaction, matter, or thing specified in the statement and thereupon the testimony of the person or the evidence in relation to the transaction, matter, or thing may be received or produced before any judge or justice, court, tribunal, grand jury, or otherwise, and if received or produced the person shall not be entitled to any immunity or privilege on account of any testimony the person may give or evidence produced.
R.I. Gen. Laws § 27-29-11