net.corda.core.contracts / TransactionState / withNotary

withNotary

fun withNotary(newNotary: Party): TransactionState<T>

Copies the underlying state, replacing the notary field with the new value. To replace the notary, we need an approval (signature) from all participants of the ContractState.