diff --git a/bit/format.py b/bit/format.py
index 5ff8679..088d990 100644
--- a/bit/format.py
+++ b/bit/format.py
@@ -35,6 +35,8 @@ def verify_sig(signature, data, public_key):
 
 
 def address_to_public_key_hash(address):
+    # Raise ValueError if we cannot identify the address.
+    get_version(address)
     return b58decode_check(address)[1:]
 
 

diff --git a/tests/samples.py b/tests/samples.py
index 8a9ad70..82b64ae 100644
--- a/tests/samples.py
+++ b/tests/samples.py
@@ -1,8 +1,10 @@
 BINARY_ADDRESS = b'\x00\x92F\x1b\xdeb\x83\xb4a\xec\xe7\xdd\xf4\xdb\xf1\xe0\xa4\x8b\xd1\x13\xd8&E\xb4\xbf'
 BITCOIN_ADDRESS = '1ELReFsTCUY2mfaDTy32qxYiT49z786eFg'
 BITCOIN_ADDRESS_COMPRESSED = '1ExJJsNLQDNVVM1s1sdyt1o5P3GC5r32UG'
+BITCOIN_ADDRESS_PAY2SH = '39SrGQEfFXcTYJhBvjZeQja66Cpz82EEUn'
 BITCOIN_ADDRESS_TEST = 'mtrNwJxS1VyHYn3qBY1Qfsm3K3kh1mGRMS'
 BITCOIN_ADDRESS_TEST_COMPRESSED = 'muUFbvTKDEokGTVUjScMhw1QF2rtv5hxCz'
+BITCOIN_ADDRESS_TEST_PAY2SH = '2NFKbBHzzh32q5DcZJNgZE9sF7gYmtPbawk'
 PRIVATE_KEY_BYTES = b'\xc2\x8a\x9f\x80s\x8fw\rRx\x03\xa5f\xcfo\xc3\xed\xf6\xce\xa5\x86\xc4\xfcJR#\xa5\xady~\x1a\xc3'
 PRIVATE_KEY_DER = (b"0\x81\x84\x02\x01\x000\x10\x06\x07*\x86H\xce=\x02\x01\x06"
                    b"\x05+\x81\x04\x00\n\x04m0k\x02\x01\x01\x04 \xc2\x8a\x9f"
diff --git a/tests/test_format.py b/tests/test_format.py
index b338b03..86dcace 100644
--- a/tests/test_format.py
+++ b/tests/test_format.py
@@ -6,9 +6,11 @@ from bit.format import (
     public_key_to_address, verify_sig, wif_checksum_check, wif_to_bytes
 )
 from .samples import (
-    BITCOIN_ADDRESS, BITCOIN_ADDRESS_COMPRESSED, BITCOIN_ADDRESS_TEST_COMPRESSED,
-    BITCOIN_ADDRESS_TEST, PRIVATE_KEY_BYTES, PUBKEY_HASH, PUBKEY_HASH_COMPRESSED,
-    PUBLIC_KEY_COMPRESSED, PUBLIC_KEY_UNCOMPRESSED, PUBLIC_KEY_X, PUBLIC_KEY_Y,
+    BITCOIN_ADDRESS, BITCOIN_ADDRESS_COMPRESSED, BITCOIN_ADDRESS_PAY2SH,
+    BITCOIN_ADDRESS_TEST_COMPRESSED, BITCOIN_ADDRESS_TEST,
+    BITCOIN_ADDRESS_TEST_PAY2SH, PRIVATE_KEY_BYTES, PUBKEY_HASH,
+    PUBKEY_HASH_COMPRESSED, PUBLIC_KEY_COMPRESSED, PUBLIC_KEY_UNCOMPRESSED,
+    PUBLIC_KEY_X, PUBLIC_KEY_Y,
     WALLET_FORMAT_COMPRESSED_MAIN, WALLET_FORMAT_COMPRESSED_TEST,
     WALLET_FORMAT_MAIN, WALLET_FORMAT_TEST
 )
@@ -41,6 +43,14 @@ class TestGetVersion:
         with pytest.raises(ValueError):
             get_version('dg2dNAjuezub6iJVPNML5pW5ZQvtA9ocL')
 
+    def test_mainnet_pay2sh(self):
+        with pytest.raises(ValueError):
+            get_version(BITCOIN_ADDRESS_PAY2SH)
+
+    def test_testnet_pay2sh(self):
+        with pytest.raises(ValueError):
+            get_version(BITCOIN_ADDRESS_TEST_PAY2SH)
+
 
 class TestVerifySig:
     def test_valid(self):
@@ -146,3 +156,7 @@ def test_point_to_public_key():
 def test_address_to_public_key_hash():
     assert address_to_public_key_hash(BITCOIN_ADDRESS) == PUBKEY_HASH
     assert address_to_public_key_hash(BITCOIN_ADDRESS_COMPRESSED) == PUBKEY_HASH_COMPRESSED
+    with pytest.raises(ValueError):
+        address_to_public_key_hash(BITCOIN_ADDRESS_PAY2SH)
+    with pytest.raises(ValueError):
+        address_to_public_key_hash(BITCOIN_ADDRESS_TEST_PAY2SH)
diff --git a/tests/test_wallet.py b/tests/test_wallet.py
index 44d882d..6fbbfdd 100644
--- a/tests/test_wallet.py
+++ b/tests/test_wallet.py
@@ -238,6 +238,21 @@ class TestPrivateKeyTestnet:
 
         assert current > initial
 
+    def test_send_pay2sh(self):
+        """
+        We don't yet support pay2sh, so we must throw an exception if we get one.
+        Otherwise, we could send coins into an unrecoverable blackhole, needlessly.
+        pay2sh addresses begin with 2 in testnet and 3 on mainnet.
+        """
+        if TRAVIS and sys.version_info[:2] != (3, 6):
+            return
+
+        private_key = PrivateKeyTestnet(WALLET_FORMAT_COMPRESSED_TEST)
+        private_key.get_unspents()
+
+        with pytest.raises(ValueError):
+            private_key.send([('2NFKbBHzzh32q5DcZJNgZE9sF7gYmtPbawk', 1, 'jpy')])
+
     def test_cold_storage(self):
         if TRAVIS and sys.version_info[:2] != (3, 6):
             return

Pay to scripthash
I have no experience with paying to scripthashes except when it's worked automagically for me before.

In #12 it looks like the initial workins of P2SH are being added. I'm not sure how straight forward P2SH is.

But... for the time being shouldn't we throw an exception if we try to `send()` to an address that does not begin with 1? Are there any sideeffects to doing so?

I think I just lost a fair bit of coin not reviewing this properly. Hopefully if we add in an exception we can keep others from doing the same.
tests/test_format.py::test_address_to_public_key_hash
tests/test_format.py::TestGetVersion::test_mainnet tests/test_format.py::TestGetVersion::test_testnet tests/test_format.py::TestGetVersion::test_invalid tests/test_format.py::TestGetVersion::test_mainnet_pay2sh tests/test_format.py::TestGetVersion::test_testnet_pay2sh tests/test_format.py::TestVerifySig::test_valid tests/test_format.py::TestVerifySig::test_invalid tests/test_format.py::TestBytesToWIF::test_mainnet tests/test_format.py::TestBytesToWIF::test_testnet tests/test_format.py::TestBytesToWIF::test_compressed tests/test_format.py::TestBytesToWIF::test_compressed_testnet tests/test_format.py::TestWIFToBytes::test_mainnet tests/test_format.py::TestWIFToBytes::test_testnet tests/test_format.py::TestWIFToBytes::test_compressed tests/test_format.py::TestWIFToBytes::test_invalid_network tests/test_format.py::TestWIFChecksumCheck::test_wif_checksum_check_main_success tests/test_format.py::TestWIFChecksumCheck::test_wif_checksum_check_test_success tests/test_format.py::TestWIFChecksumCheck::test_wif_checksum_check_compressed_success tests/test_format.py::TestWIFChecksumCheck::test_wif_checksum_check_decode_failure tests/test_format.py::TestWIFChecksumCheck::test_wif_checksum_check_other_failure tests/test_format.py::TestPublicKeyToCoords::test_public_key_to_coords_compressed tests/test_format.py::TestPublicKeyToCoords::test_public_key_to_coords_uncompressed tests/test_format.py::TestPublicKeyToCoords::test_public_key_to_coords_incorrect_length tests/test_format.py::TestPublicKeyToAddress::test_public_key_to_address_compressed tests/test_format.py::TestPublicKeyToAddress::test_public_key_to_address_uncompressed tests/test_format.py::TestPublicKeyToAddress::test_public_key_to_address_incorrect_length tests/test_format.py::TestPublicKeyToAddress::test_public_key_to_address_test_compressed tests/test_format.py::TestPublicKeyToAddress::test_public_key_to_address_test_uncompressed tests/test_format.py::TestCoordsToPublicKey::test_coords_to_public_key_compressed tests/test_format.py::TestCoordsToPublicKey::test_coords_to_public_key_uncompressed tests/test_format.py::test_point_to_public_key tests/test_wallet.py::TestWIFToKey::test_compressed_main tests/test_wallet.py::TestWIFToKey::test_uncompressed_main tests/test_wallet.py::TestWIFToKey::test_compressed_test tests/test_wallet.py::TestWIFToKey::test_uncompressed_test tests/test_wallet.py::TestBaseKey::test_init_default tests/test_wallet.py::TestBaseKey::test_init_from_key tests/test_wallet.py::TestBaseKey::test_init_wif_error tests/test_wallet.py::TestBaseKey::test_public_key_compressed tests/test_wallet.py::TestBaseKey::test_public_key_uncompressed tests/test_wallet.py::TestBaseKey::test_public_point tests/test_wallet.py::TestBaseKey::test_sign tests/test_wallet.py::TestBaseKey::test_verify_success tests/test_wallet.py::TestBaseKey::test_verify_failure tests/test_wallet.py::TestBaseKey::test_to_hex tests/test_wallet.py::TestBaseKey::test_to_bytes tests/test_wallet.py::TestBaseKey::test_to_der tests/test_wallet.py::TestBaseKey::test_to_pem tests/test_wallet.py::TestBaseKey::test_to_int tests/test_wallet.py::TestBaseKey::test_is_compressed tests/test_wallet.py::TestBaseKey::test_equal tests/test_wallet.py::TestPrivateKey::test_alias tests/test_wallet.py::TestPrivateKey::test_init_default tests/test_wallet.py::TestPrivateKey::test_address tests/test_wallet.py::TestPrivateKey::test_to_wif tests/test_wallet.py::TestPrivateKey::test_get_balance tests/test_wallet.py::TestPrivateKey::test_get_unspent tests/test_wallet.py::TestPrivateKey::test_get_transactions tests/test_wallet.py::TestPrivateKey::test_from_hex tests/test_wallet.py::TestPrivateKey::test_from_der tests/test_wallet.py::TestPrivateKey::test_from_pem tests/test_wallet.py::TestPrivateKey::test_from_int tests/test_wallet.py::TestPrivateKey::test_repr tests/test_wallet.py::TestPrivateKeyTestnet::test_init_default tests/test_wallet.py::TestPrivateKeyTestnet::test_address tests/test_wallet.py::TestPrivateKeyTestnet::test_to_wif tests/test_wallet.py::TestPrivateKeyTestnet::test_from_hex tests/test_wallet.py::TestPrivateKeyTestnet::test_from_der tests/test_wallet.py::TestPrivateKeyTestnet::test_from_pem tests/test_wallet.py::TestPrivateKeyTestnet::test_from_int tests/test_wallet.py::TestPrivateKeyTestnet::test_repr