Skip to main content

Questions tagged [python]

a dynamically typed programming language

Filter by
Sorted by
Tagged with
2 votes
1 answer
201 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 ...
0 votes
1 answer
29 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 ...
0 votes
1 answer
54 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 ...
1 vote
2 answers
87 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?
1 vote
1 answer
57 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 ...
0 votes
1 answer
30 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 ...
1 vote
1 answer
112 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": ...
0 votes
1 answer
60 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 ...
0 votes
1 answer
80 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 ...
0 votes
1 answer
57 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 ...
0 votes
1 answer
109 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 ...
0 votes
0 answers
28 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.
3 votes
1 answer
311 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 ...
0 votes
1 answer
73 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 ...
0 votes
1 answer
277 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 ...
1 vote
1 answer
67 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 ...
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?
9 votes
2 answers
643 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 ...
2 votes
1 answer
402 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(...
1 vote
1 answer
286 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 ...
4 votes
2 answers
489 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();...
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 ...
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 ...
6 votes
1 answer
142 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 ...