Questions tagged [python]

a dynamically typed programming language

Filter by
Sorted by
Tagged with
8 votes
2 answers
609 views

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

I'm trying to get a stake address from a Shelley address in Python using this library: https://pypi.org/project/bech32/ I can convert an address from bech32 to hex without issue, but I'm getting stuck ...
ImminentFate's user avatar
7 votes
2 answers
1k views

bech32 in Shelley addresses

I'm trying to write address validation in Python. According to the docs, Shelley addresses are encoded with bech32 and the first byte of the payload consists of header_type (4 bits) and network_tag (4 ...
emesik's user avatar
  • 876
6 votes
1 answer
139 views

Re-Implementing Policy Hashing in Python

As the title says, I want to to reimplement the hashing part of a policy script in Python 3. I have already made a post over at forums.cardano.org, and someone has pointed me to the right direction of ...
tycl's user avatar
  • 190
4 votes
2 answers
467 views

Cbor address to bech32 type address in JS or python

I have managed to retrive a user address from a dapp connector wallet using JS: api_promise = window.cardano.{wallet}.enable(); api_promise.then(function(api) { addr_promise = api.getUsedAddresses();...
Lokinou's user avatar
  • 161
4 votes
2 answers
2k views

How to derive addresses from a key exported from Yoroi

I’d like to code a small crypto portfolio app using python. So to track my ADA, I need to scan the addresses of my wallet. I found Yorois feature to export a “key” and conveniently, it also states the ...
Nos's user avatar
  • 301
3 votes
1 answer
297 views

Encoding / Decoding Fingerprint with Python

We currently use a python script to get fingerprints from assetName and policy id. However we are resorting to using the cardano bech32 binary for the final part of the process. from hashlib import ...
LegionOfBrad's user avatar
2 votes
1 answer
344 views

Derive public key hash from bech32 address using python

I know that this is possible in javascript using the cardano serialization lib, as follows: function toHex(bytes){ return Buffer.from(bytes).toString("hex"); } function addrToPubKeyHash(...
Mateus's user avatar
  • 988
2 votes
1 answer
193 views

Get transaction unspent output value

I have payment signing key and staking signing key of my wallet. How can I get transaction unspent outputs with cardano-cli/cardano-serialization-lib/pycardano. I expect to get string like this ...
Pavel R's user avatar
  • 21
1 vote
1 answer
64 views

Is there a Python Version of Cardano Node-CLI JavaScript Library?

I know JS, but I have other code written in python that I want to use in conjunction with the node. Is there a Python 3.xxxx SDK/Library/Module that will do everything the JS can? Heres what is ...
KryptoKing's user avatar
1 vote
2 answers
85 views

Python equivalent to Ogmios?

Has somebody written a library equivalent to Ogmios, that has the same functionalities, including a chain sync protocol, but entirely written in Python?
et97's user avatar
  • 174
1 vote
1 answer
54 views

Inconsistent script addresses built with cardano-cli vs. PyCardano

Given the CBOR representation of a plutus validator, its script address can be easily generated with a variety of tools, e.g. cardano-cli and PyCardano. However, both tools generate different script ...
a_juggler's user avatar
1 vote
1 answer
265 views

Serialize a transaction in python

I want to use the "Submit a transaction" method in Blockfrost but it needs an already serialized transaction. Does anybody know how to serialize a transaction in python? (I don't wanna use ...
Foad's user avatar
  • 29
1 vote
1 answer
98 views

Mint the royalty token with pycardano

Good morning everyone, I have a question regarding the royalty token. I've already read about this subject, and I understand that I need to mint a token with metadata like this: { "777": ...
Andre Morais's user avatar
0 votes
1 answer
52 views

Whats the python script to check if an cardano address has a script flag?

I have a script to fetch asset name, address from a policy id with blockfrost API, now I need to see if the asset is in a smart contract script. I have no coding skills but followed a tutorial to get ...
dpd's user avatar
  • 3
0 votes
1 answer
68 views

How to specify the Cardano address for BlockFrost Transaction Endpoint?

Hi im trying to call this https://docs.blockfrost.io/#tag/Cardano-Addresses/paths/~1addresses~1{address}~1transactions/get from some code I wrote (images attached below) and get a None or Empty value ...
KryptoKing's user avatar
0 votes
1 answer
37 views

pycardano library seed phrase

found nice examples generating verification keys and payment keys but I don't get to same time generate the seed phrase. Without the seed phrase I cannot open the wallet in a hot wallet to view it and ...
Mik_A's user avatar
  • 101
0 votes
1 answer
94 views

Trying to submit a minting transaction using pycardano and blockfrost

Hello Cardano developers, I really hope you can help me :) I'm developing a Dapp and I need to mint a NFT. This works through a website, so a user clicks in a button to mint a NFT. Simple, right? I ...
Andre Morais's user avatar
0 votes
1 answer
29 views

How Can I Collect Pool Operator Submit APIs?

Submit apis are possible given the current state of the chain, however, where can I go to verify that a submit API is genuine? The ideal solution would be a way to check stake pools for the API that ...
KryptoKing's user avatar
0 votes
1 answer
261 views

Get Transaction History Given Policy ID using Blockfrost API

What's the best say to get the transaction history of an NFT collection given the policy id? I looked into Asset Transactions but this requires both policy ID and the asset ID. Is there something else ...
MitandGrit's user avatar
0 votes
3 answers
65 views

Similar source for Cardano

I want to generate public and private keys with an address. I found this repository but it doesn't support Cardano. Does anybody know any similar source?
Foad's user avatar
  • 29
0 votes
1 answer
22 views

Blockfrost API error with pycardano

I get blockfrost.utils.ApiError: {'status_code': 400, 'error': 'Bad Request', 'message': 'Invalid address for this network or malformed address format.'} when using pycardano and this code # Create a ...
Mik_A's user avatar
  • 101
0 votes
1 answer
69 views

Need to Retrieve Info from (NFT)Assets in Policy ID to see if they are in a Plutus Contract (smart contract) or Not using Blockfrost API

I have a python script that retrieves the NFT asset name, and addresses of a specific policy ID using blockfrost API. Now I need to amend the script to add to the csv whether or not the specific asset ...
dpd's user avatar
  • 3
0 votes
1 answer
52 views

Nami shows all minted NFTs in "Assets" tab instead of "Collectibles" tab

the following image illustrates my problem: all the NFTs I've been minting is being seen as normal native tokens instead of collectibles. For example, for the ANIMALSP01#28, the metadata in the ...
Andre Morais's user avatar
0 votes
0 answers
27 views

Attempting to build (NFT) transaction in Python and push through Cardano-cli

right now I am getting the system can't find the path specified but I have tried with and without passing the path in as a variable. I am running this in Python 3.6+ in Visual Studio Code on Windows.
thejahcoop's user avatar