code: public final DeterministicKeyChain getActiveKeyChain(Script.ScriptType outputScriptType, long keyRotationTimeSecs) {
          checkState(isSupportsDeterministicChains(), "doesn't support deterministic chains");
          for (DeterministicKeyChain chain : ImmutableList.copyOf(chains).reverse())
              if (chain.getOutputScriptType() == outputScriptType
                      && chain.getEarliestKeyCreationTime() >= keyRotationTimeSecs)
                  return chain;
          return null;
      }
docs: Returns the key chain that's used for generation of fresh/current keys of the given type. If it's not the default
  type and no active chain for this type exists, {@code null} is returned. No upgrade or downgrade is tried.