Was the attack on Pearl Harbor meant to be a surprise?

Admiral Yamamoto didn’t intend to attack Pearl Harbor without any formal warning, but the declaration of war had taken too long to transcribe and was not delivered in time.