[addresses #51914471] Added api methods to the contact model and tests. Changed the way the nonce was handled in the tests.