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 ...
5
votes
Accepted
Is there a Python Version of Cardano Node-CLI JavaScript Library?
I know you are asking for a python library interacting with a node, but let me tell you there is a very comprehensive python library with which you don't need to run a node yourself.
You can find a ...
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))
3
votes
Accepted
Inconsistent script addresses built with cardano-cli vs. PyCardano
After a quick look at the PyCardano implementation of script_hash
the problem is in the input of the function.
The hash of a Plutus script is calculated using the compiled contract wrapped only once ...
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 ...
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 <<< ...
3
votes
Python equivalent to Ogmios?
https://pypi.org/project/pycardano/
I think this is as close as it gets with Python so far...
3
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 ...
2
votes
Whats the python script to check if an cardano address has a script flag?
PyCardano can help you to find the address type.
For example, addr1wyzynye0nksztrfzpsulsq7whr3vgh7uvp0gm4p0x42ckkqqq6kxq is the script address of Spacebudz. You can decode it into an Address object ...
2
votes
Accepted
How to specify the Cardano address for BlockFrost Transaction Endpoint?
Going by your question I will assume you are trying to get the transaction history of your wallet? The endpoint you are using requires an address previously associated with a transaction, and an ...
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
pycardano library seed phrase
You can take a look at this function that I am using to work with Hierarchical Deterministic Wallets in PyCardano. If the mnemonic file does not exist, it generates a new one and saves it to disk, and ...
1
vote
Get Transaction History Given Policy ID using Blockfrost API
Unfortunately Blockfrost currently requires the concatenated policy and asset name to query asset transactions but you can use the Koios API instead with just the policyId since the asset name is ...
1
vote
Accepted
Trying to submit a minting transaction using pycardano and blockfrost
The problem is the NFT's native script is missing from the transaction. See this line in the transaction repl:
'native_scripts': None,
Not sure how this transaction was build, but looks like you have ...
1
vote
How Can I Collect Pool Operator Submit APIs?
Unfortunately, there's no such way to do that.
Anyone running cardano-node can also run cardano-submit-api and expose it for you to send transactions. This means that not only SPOs can do it, so I ...
1
vote
Accepted
Python equivalent to Ogmios?
I just put this library together as I needed to access Ogmios from a Python application. It is still a work in progress, but it is working.
https://pypi.org/project/pyogmios/
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-...
1
vote
How to derive addresses from a key exported from Yoroi
I would suggest you leave Yoroi out of it. You have a seed phrase that can generate your wallet private keys. So, use the cardano-wallet tools to generate your keys, derive addressed, etc. You can do ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 24address × 6
blockfrost × 6
nft × 5
transaction × 4
cardano-cli × 3
minting × 3
bech32 × 3
wallet × 2
api × 2
metadata × 2
cardano-address × 2
script × 2
policy × 2
javascript × 2
cbor × 2
cardano-serialization-lib × 2
plutus × 1
smart-contract × 1
stake-pool × 1
staking × 1
cardano-node × 1
yoroi × 1
testnet × 1
utxo × 1