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 ...
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 <<< ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
>>>...
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
...
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-...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 9address × 5
cardano-address × 2
bech32 × 2
cbor × 2
wallet × 1
staking × 1
transaction × 1
yoroi × 1
api × 1
rewards × 1
script × 1
policy × 1
blake2b × 1
javascript × 1
cardano-serialization-lib × 1