Skip to main content
4 votes
Accepted

How can I go about creating an Asset Fingerprint in Java?

You have to first convert blakeHash bytes from 8 bits to 5 bits unsigned integer and then call Bech32.encode(). Sample code: public static void main(String[] args) throws DecoderException { ... ...
Satya's user avatar
  • 96
3 votes

Programmatically creating the policyid / scripthash in Javascript (Browser)

Finally got my head around this, thanks to this version in Python: Re-Implementing Policy Hashing in Python by @tycl. Basically we need to Parse the policy (JSON) Follow the CDDL specifications to ...
sean's user avatar
  • 1,463
2 votes
Accepted

Re-Implementing Policy Hashing in Python

It seems I was close, but the str.encode() function was not the correct one to use. Also a zero byte needs to be prepended to the data to be hashed. Thanks to user bwbush from the cardano forum for ...
tycl's user avatar
  • 180
1 vote

Is there a way to validate a policy Id,and to check if a string is an actual policy id?

Beyond the length of the hash digest (28 bytes in this case), no. Unless you have the pre-image (that is, the raw policy script) in which case you can rehash it and compare.
KtorZ's user avatar
  • 533
1 vote
Accepted

Create address from public/private keypair without external tools/apis

Here is an example of how to generate the public/private keys using the cardano-serialization-lib https://github.com/Emurgo/cardano-serialization-lib/blob/master/doc/getting-started/generating-keys.md ...
D S's user avatar
  • 322
1 vote

Create address from public/private keypair without external tools/apis

Cardano uses a similar BIP-32/39/44 structure as bitcoin and ethereum, so you can use the same mnemonic seed phrase to derive your HD keys as you do on the other blockchains. To do so manually, I'd ...
zhekson's user avatar
  • 3,699
1 vote
Accepted

Programmatically creating the policyid / scripthash in Javascript (Browser)

You can do this using the 10.0 beta version of cardano-serialization-lib which should make it into stable pretty soon (I'm in the process of testing this, you can follow the status on this Github ...
Thom's user avatar
  • 354
1 vote
Accepted

How to calculate the transaction Id of a given signed transaction?

You are looking for blake2b-256 digest of the cbor-encoded transaction body. Thanks to KtorZ to help with this.
Marek Mahut - StakeNuts's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible