Hot answers tagged

4 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 ...
user avatar
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 <<< ...
user avatar
2 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 ...
user avatar
  • 756
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 ...
user avatar
  • 80
2 votes
Accepted

Derive public key hash from bech32 address using python

Check out pycardano. Class Address has a class method from_primitive that can read and decode a bech32 address. Then you can directly read field payment_part, which is the public key hash of the ...
user avatar
  • 313
2 votes

Cbor address to bech32 type address in JS or python

You can also use typhonjs used by typhonwallet. It's a Pure JS library not dependent on WASM. Install npm i @stricahq/typhonjs Usage const typhonjs = require("@stricahq/typhonjs"); const ...
user avatar
2 votes
Accepted

Serialize a transaction in python

Good news, there is a python implementation available! https://github.com/cffls/pycardano I haven't used it myself but the Readme claims this library is able to build and sign transactions. It even ...
user avatar
  • 436
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 >>>...
user avatar
  • 313
1 vote

Cbor address to bech32 type address in JS or python

First install the npm module: npm i @emurgo/cardano-serialization-lib-browser Then you need a wasm loader module class wasm { async load() { if (this._wasm) return; /** * @private ...
user avatar
1 vote

Similar source for Cardano

Cardano uses Bip32-Ed25519 standard for deriving keys and uses bech32 for encoding keys/addresses. I'm not aware of any native python libraries for doing the key derivation, but you could wrap cardano-...
user avatar

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