Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing methods for mempool, add tx_submit_cbor and tx_evaluate_cbor accepting cbor bytes/string #37

Merged
merged 5 commits into from
Nov 8, 2023

Conversation

slowbackspace
Copy link
Contributor

@slowbackspace slowbackspace commented Nov 6, 2023

functools.wraps

it would be helpful for type hints, annotations, docstrings, etc, if the decorators used the update_wrapper function. The purpose of this would be to help with coding experience with blockfrost-python, and would also help with code introspection. (#3)

Added missing methods

  • mempool: Returns transactions that are currently stored in Blockfrost mempool, waiting to be included in a newly minted block. Shows only transactions submitted via Blockfrost.io.
  • mempool_tx - Returns content of the requested mempool transaction.
  • mempool_address - List of mempool transactions where at least one of the transaction inputs or outputs belongs to the address. Shows only transactions submitted via Blockfrost.io.
  • transaction_submit_cbor, transaction_evaluate_cbor:
    • Similar to transaction_submit and transaction_evaluate which accept a file as a parameter
    • Accepts tx_cbor as bytes or hex string streamlining the usage without the need to write a file
  • transaction_evaluate_utxos:
    • Advanced variant of treansaction_evaluate which accepts additional utxo set.
    • In case where a submitted transaction refers to non-existing inputs, the evaluation will fail with an [UnknownInputs]. This can be an obstacle during development or, in scenarios where transactions are being prepared ahead of UTXO. In such scenarios, it necessary to provide an additional UTXO set to be used during evaluation.
    • https://docs.blockfrost.io/#tag/Cardano-Utilities/paths/~1utils~1txs~1evaluate~1utxos/post

@slowbackspace slowbackspace force-pushed the chore/improvements branch 2 times, most recently from a2cf073 to 00fea03 Compare November 6, 2023 15:56
@slowbackspace slowbackspace changed the title Chore/improvements Add missing methods for mempool, add tx_submit_cbor and tx_evaluate_cbor accepting cbor bytes/string Nov 6, 2023
@slowbackspace slowbackspace marked this pull request as ready for review November 7, 2023 14:21
Copy link
Contributor

@sorki sorki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🖤

blockfrost/api/cardano/mempool.py Outdated Show resolved Hide resolved
@sorki sorki merged commit b8b52cf into master Nov 8, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants