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 {
...
...
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 ...
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 ...
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.
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
...
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 ...
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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
blake2b × 7transaction × 2
policy × 2
bech32 × 2
cbor × 2
wallet × 1
cardano-cli × 1
native-assets × 1
address × 1
testnet × 1
cardano-address × 1
python × 1
script × 1
blockfrost × 1
javascript × 1
asset × 1
ed25519 × 1
hash × 1