JavaScript Mining System Design

How do I verify a unconfirmed transaction using JavaScript on bitcoin on futures ?