user6918: For a given tx - where a contract has been used, outputs have been stored in the tx_metadata table - in this case key/value pairs where the values of keys 0 through 10, when appended together to form one contiguous string, make a value that when run through cbor.me decode to the representation of a json object that contains various values.
d8799f581cbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be9289fd8799fd8799fd8799f581c4b031cbfd476d7efd6ec84012aeaa11a5ec9aa4ce53973764f5099bfffd8799fd8799fd8799f581ce1f33ea56cbc61dc3f9159175025efab8e55d92380482b4760360038ffffffffa140d8799f00a1401a10b07600ffffd8799fd8799fd8799f581c70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72ffd8799fd8799fd8799f581c1e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005fffffffffa140d8799f00a1401a04c4b400ffffd8799fd8799fd8799f581cbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be928ffd8799fd8799fd8799f581c801c29c0f4e1b8c20b1849aa358f63f22a46fa9930ec447694a9bbf2ffffffffa140d8799f00a1401ad8f5fe00ffffffff

When above is decoded it produces:
121([h'BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928', [121([121([121([h'4B031CBFD476D7EFD6EC84012AEAA11A5EC9AA4CE53973764F5099BF']), 121([121([121([h'E1F33EA56CBC61DC3F9159175025EFAB8E55D92380482B4760360038'])])])]), {h'': 121([0, {h'': 280000000}])}]), 121([121([121([h'70E60F3B5EA7153E0ACC7A803E4401D44B8ED1BAE1C7BAAAD1A62A72']), 121([121([121([h'1E78AAE7C90CC36D624F7B3BB6D86B52696DC84E490F343EBA89005F'])])])]), {h'': 121([0, {h'': 80000000}])}]), 121([121([121([h'BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928']), 121([121([121([h'801C29C0F4E1B8C20B1849AA358F63F22A46FA9930EC447694A9BBF2'])])])]), {h'': 121([0, {h'': 3640000000}])}])]])

here we find the output values in lovelace:
280000000
80000000
3640000000

but there is also these other values, which do not seem to decode to addr - addresses as it seems they should...
BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928
4B031CBFD476D7EFD6EC84012AEAA11A5EC9AA4CE53973764F5099BF
...etc.

Does anyone know how to decode them to the wallet addresses they must be?

user28: These values are the payment credentials of the address (or in case of a script its script hash).
You are probably looking for the payment_cred field of tx_out table in cardano-db-sync.
csyncdb=> select address from tx_out where payment_cred = '\xbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be928' group by address;
                                                 address                                                 
---------------------------------------------------------------------------------------------------------
 addr1qxaw6whp84lwhyamfd85fcg2l703lszjs60558x32qd7j2yqrs5upa8phrpqkxzf4g6c7clj9fr04xfsa3z8d99fh0eqt5dw63
(1 row)

csyncdb=> 

Keep in mind that this payment_cred value is only one part of the address and therefore they can more than one result.

6918: <p>For a given tx - where a contract has been used, outputs have been stored in the tx_metadata table - in this case key/value pairs where the values of keys 0 through 10, when appended together to form one contiguous string, make a value that when run through cbor.me decode to the representation of a json object that contains various values.</p>
<pre><code>d8799f581cbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be9289fd8799fd8799fd8799f581c4b031cbfd476d7efd6ec84012aeaa11a5ec9aa4ce53973764f5099bfffd8799fd8799fd8799f581ce1f33ea56cbc61dc3f9159175025efab8e55d92380482b4760360038ffffffffa140d8799f00a1401a10b07600ffffd8799fd8799fd8799f581c70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72ffd8799fd8799fd8799f581c1e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005fffffffffa140d8799f00a1401a04c4b400ffffd8799fd8799fd8799f581cbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be928ffd8799fd8799fd8799f581c801c29c0f4e1b8c20b1849aa358f63f22a46fa9930ec447694a9bbf2ffffffffa140d8799f00a1401ad8f5fe00ffffffff
</code></pre>
<p>When above is decoded it produces:</p>
<pre><code>121([h'BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928', [121([121([121([h'4B031CBFD476D7EFD6EC84012AEAA11A5EC9AA4CE53973764F5099BF']), 121([121([121([h'E1F33EA56CBC61DC3F9159175025EFAB8E55D92380482B4760360038'])])])]), {h'': 121([0, {h'': 280000000}])}]), 121([121([121([h'70E60F3B5EA7153E0ACC7A803E4401D44B8ED1BAE1C7BAAAD1A62A72']), 121([121([121([h'1E78AAE7C90CC36D624F7B3BB6D86B52696DC84E490F343EBA89005F'])])])]), {h'': 121([0, {h'': 80000000}])}]), 121([121([121([h'BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928']), 121([121([121([h'801C29C0F4E1B8C20B1849AA358F63F22A46FA9930EC447694A9BBF2'])])])]), {h'': 121([0, {h'': 3640000000}])}])]])
</code></pre>
<p>here we find the output values in lovelace:</p>
<pre><code>280000000
80000000
3640000000
</code></pre>
<p>but there is also these other values, which do not seem to decode to addr - addresses as it seems they should...</p>
<pre><code>BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928
4B031CBFD476D7EFD6EC84012AEAA11A5EC9AA4CE53973764F5099BF
...etc.
</code></pre>
<p>Does anyone know how to decode them to the wallet addresses they must be?</p>
 28: <p>These values are the payment credentials of the address (or in case of a script its script hash).</p>
<p>You are probably looking for the <code>payment_cred</code> field of <code>tx_out</code> table in cardano-db-sync.</p>
<pre><code>csyncdb=&gt; select address from tx_out where payment_cred = '\xbaed3ae13d7eeb93bb4b4f44e10aff9f1fc052869f4a1cd1501be928' group by address;
                                                 address                                                 
---------------------------------------------------------------------------------------------------------
 addr1qxaw6whp84lwhyamfd85fcg2l703lszjs60558x32qd7j2yqrs5upa8phrpqkxzf4g6c7clj9fr04xfsa3z8d99fh0eqt5dw63
(1 row)

csyncdb=&gt; 
</code></pre>
<p>Keep in mind that this <code>payment_cred</code> value is only one part of the address and therefore they can more than one result.</p>
