Hot answers tagged

6 votes
Accepted

Staking address bech32

The e comes from these address prefixes defined in the CDDL https://github.com/input-output-hk/cardano-ledger/blob/f2a783cf00911b7492e81dd6c7fb8a963f9ce8fe/eras/shelley/test-suite/cddl-files/shelley....
Samuel Leathers's user avatar
5 votes

How do I properly derive a stake key from an address using Bech32?

Credit to someone on Reddit who helped me with this: Deriving the staking address requires you to manually update the header byte before bech32 encoding the hex account. All I needed to do was add e1 ...
ImminentFate's user avatar
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
4 votes
Accepted

Encoding / Decoding Fingerprint with Python

By last part I assume you mean just the bech32.sh. If so, you can use the below : encodedstr=bech32.bech32_encode("prefix",bech32.convertbits(bytes.fromhex(hexstr), 8, 5))
RdLrT's user avatar
  • 1,577
3 votes
Accepted

bech32 in Shelley addresses

The problem stems from bech32 being a base5 encoding, which means that one character of address representation encodes only 5 bits of the actual address data. The bech32_decode function from Python ...
emesik's user avatar
  • 876
3 votes

bech32 in Shelley addresses

I would use the bech32 decoder tool available here: https://github.com/input-output-hk/bech32 You can also find it in Daedalus in the binaries folder for your platform. $ bech32 <<< ...
Andrew Westberg - BCSH's user avatar
2 votes
Accepted

How to get UTxO transaction id using cardano-serialization-lib

In order to get transaction id using cardano-serialization-lib you should convert transaction id to bytes and convert them to hex string. Buffer.from(utxo.input().transaction_id().to_bytes()).toString(...
pyropy's user avatar
  • 641
2 votes
Accepted

How to obtain PubKeyHash from Address ShelleyAddr

There is now the function shelleyPayAddrToPlutusPubKHash in cardano-api which returns Maybe PubKeyHash because in the case of a script credential there is no corresponding public key hash.
Jim's user avatar
  • 76
1 vote

Obtain a wallet address from PKH and wallet ID in python?

The PKH is for verifying the authenticity of a signed transaction. We couldn't convert it to the bech32 wallet address. Hashing is a one-way function. It means that if you hash a piece of data, it is ...
manhdt's user avatar
  • 125
1 vote

Getting PubKey from bech32 address

No, the public key (also verification key) cannot be derived from a bech32 address. Only the hash of the public key is encoded in the address. The verification key is secret as long as it is not used ...
Fermat's user avatar
  • 1,872
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

Where are the bech32 binaries?

bech32 binaries/cli commands come preinstalled with cardano-wallet software. If you follow the instructions to install cardano-wallet, you'll be able to use bech32 commands from the same executable ...
zhekson's user avatar
  • 3,669
1 vote

How to obtain PubKeyHash from Address ShelleyAddr

This compiles with a recent version of cardano-node and plutus: import Plutus.V1.Ledger.Api (PubKeyHash) import Cardano.Ledger.Alonzo.TxInfo (transKeyHash) import Cardano.Api (ShelleyAddr) import ...
insitu's user avatar
  • 224
1 vote

How do I properly derive a stake key from an address using Bech32?

Maybe it is a bit late, but hope it helps. You can use this python library PyCardano to derive the stake key. Here is the code example: >>> from pycardano import Address, Network >>>...
Jerry's user avatar
  • 403

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