user2103: We are developing an app that must get the asset id and get its details from metadata, right now we are using blockfrost.io. It works very good for policy Id's, we can use the pool.pm website and get the information regarding all the assets the policy has.
Unfortunately, it doesn't work very well for the asset id... The blockfrost only accepts the concatenation of policy id and the hex encoded asset name. I can't determine the hex encoded asset name. If any of you know how to do that let me know.
Thanks in advance.
this is the endpoint:
https://cardano-mainnet.blockfrost.io/api/v0/assets/{asset}
some valid id's I found using postman:
0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04756e7369673236383531

user1142: Let's take this asset as an example: https://pool.pm/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.unsig26071

Policy ID: 0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04
Asset name: unsig26071

To request this asset from the blockfrost.io API, you have to convert the name to HEX and then concatenate them (without a . in between).
How you do this depends on the programming language you use. You need to find a way to convert a string to its HEX representation.
Here's an example in C#:
using System;
using System.Text;

string assetName = "unsig26071";
byte[] bytes = Encoding.UTF8.GetBytes(assetName);
string hexAssetName = Convert.ToHexString(bytes); // 756e7369673236303731

To verify that you convert the names correctly, you can use a page like this one: http://string-functions.com/string-hex.aspx
Here's the converted example on cardanoscan:
https://cardanoscan.io/token/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.756e7369673236303731
Your blockfrost.io request would look like this:
https://cardano-mainnet.blockfrost.io/api/v0/assets/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04756e7369673236303731

2103: <p>We are developing an app that must get the asset id and get its details from metadata, right now we are using blockfrost.io. It works very good for policy Id's, we can use the pool.pm website and get the information regarding all the assets the policy has.</p>
<p>Unfortunately, it doesn't work very well for the asset id... The blockfrost only accepts the concatenation of policy id and the hex encoded asset name. I can't determine the hex encoded asset name. If any of you know how to do that let me know.
Thanks in advance.</p>
<p>this is the endpoint:
<a href="https://cardano-mainnet.blockfrost.io/api/v0/assets/%7Basset%7D" rel="nofollow noreferrer">https://cardano-mainnet.blockfrost.io/api/v0/assets/{asset}</a></p>
<p>some valid id's I found using postman:
0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04756e7369673236383531</p>
 1142: <p>Let's take this asset as an example: <a href="https://pool.pm/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.unsig26071" rel="nofollow noreferrer">https://pool.pm/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.unsig26071</a></p>
<ul>
<li>Policy ID: <code>0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04</code></li>
<li>Asset name: <code>unsig26071</code></li>
</ul>
<p>To request this asset from the blockfrost.io API, you have to convert the name to HEX and then concatenate them (without a <code>.</code> in between).</p>
<p>How you do this depends on the programming language you use. You need to find a way to convert a string to its HEX representation.</p>
<p>Here's an example in C#:</p>
<pre><code>using System;
using System.Text;

string assetName = &quot;unsig26071&quot;;
byte[] bytes = Encoding.UTF8.GetBytes(assetName);
string hexAssetName = Convert.ToHexString(bytes); // 756e7369673236303731
</code></pre>
<p>To verify that you convert the names correctly, you can use a page like this one: <a href="http://string-functions.com/string-hex.aspx" rel="nofollow noreferrer">http://string-functions.com/string-hex.aspx</a></p>
<p>Here's the converted example on cardanoscan:
<a href="https://cardanoscan.io/token/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.756e7369673236303731" rel="nofollow noreferrer">https://cardanoscan.io/token/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04.756e7369673236303731</a></p>
<p>Your blockfrost.io request would look like this:</p>
<p><a href="https://cardano-mainnet.blockfrost.io/api/v0/assets/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04756e7369673236303731" rel="nofollow noreferrer">https://cardano-mainnet.blockfrost.io/api/v0/assets/0e14267a8020229adc0184dd25fa3174c3f7d6caadcb4425c70e7c04756e7369673236303731</a></p>
