The Cryptonomics™
  • Home
  • Blockchain
  • Bitcoin
  • Ethereum
  • NFTS
  • Altcoin
  • Mining
  • Consulting
Reading: How do I calculate transaction price for name to createpsbt()?
Share
Please enter CoinGecko Free Api Key to get this plugin works.
The Cryptonomics™The Cryptonomics™
Font ResizerAa
Search
  • Home
  • Blockchain
  • Bitcoin
  • Ethereum
  • NFTS
  • Altcoin
  • Mining
  • Consulting
Follow US
  • About Us
  • Advertising Solutions
  • Privacy
  • Terms
  • Advertise
Copyright © MetaMedia™ Capital Inc, All right reserved
The Cryptonomics™ > Bitcoin > How do I calculate transaction price for name to createpsbt()?
Bitcoin

How do I calculate transaction price for name to createpsbt()?

admin
Last updated: June 13, 2025 5:24 pm
admin Published June 13, 2025
Share
How do I calculate transaction price for name to createpsbt()?


When my consumer invokes my app, he passes as an enter parameter the specified worth of the TX price in satoshis per byte. I create a PSBT by calling createpsbt(). I exert full management over the willpower of inputs and outputs. For instance, I do not name walletcreatefundedpsbt(), as a result of I do not need bitcoind to pick inputs on my behalf. I’ve a hen and egg downside in that I have to name createpsbt() with a view to decide the scale of the TX in bytes, however I have to specify the price quantity earlier than the decision to createpsbt(). One of the best answer that I can consider is to execute a dummy name to createpsbt() utilizing a dummy price worth, then measure the scale of the TX, then do an actual name to createpsbt() after accurately calculating the price quantity. Is there a greater manner?

Edit: I need to spend all UTXOs. I need two outputs, one to obtain a hard and fast quantity, the opposite to obtain change much less the price. I’ve tried many incantations, I am unable to get it to work. This is my newest try:

raw_psbt = rpc.walletcreatefundedpsbt(
    # all UTXOs, as returned by listunspent():
    inputs,
    # one recipient: [ { addr : amount } ]
    outputs,
    0,  # locktime
    {
        "replaceable" : True,
        # I would love for the change much less the price to go right here:
        "changeAddress" : xxx,
        "includeWatching" : True,
        "feeRate" : 0.005,
    }
)

This fails with Signing transaction failed (-4). Any thought what I am doing fallacious?

Edit #2: I am unable to use walletcreatefundedpsbt() as instructed under to create the PSBT, as a result of that operate requires that its inputs be “solvable”, which isn’t the case in my atmosphere. Extra data at this hyperlink:

Errors with walletcreatefundedpsbt & non-solvable UTXOs

So my unique query stays unresolved at this level.

Edit #3: So I requested on Slack. The issue is that our UTXOs are 1) not “solvable” and a couple of) can’t be expressed within the descriptor language, so Bitcoin Core has no solution to calculate the TX dimension earlier than the TX is signed. Apparently I must calculated it manually as defined within the connected screenshot.



Supply hyperlink

You Might Also Like

CleanSpark Posts $378M Fiscal Q2 Loss as Bitcoin Value Drop Bites

EDGEX is accessible for buying and selling!

bitcoin core quickest methodology legacy -> descriptor pockets migration

Trump Meme Crew Strikes $17M in TRUMP to Bitgo as Allocation Pockets Stirs Once more

Technique’s Michael Saylor Indicators Impending BTC Purchase

Share This Article
Facebook Twitter Email Copy Link Print
Previous Article Vitalik proposes ‘Lean Ethereum’ to realize quantum safety, easier validator operations Vitalik proposes ‘Lean Ethereum’ to realize quantum safety, easier validator operations
Next Article Stake Crypto Safely and Legally in 2025 Stake Crypto Safely and Legally in 2025
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe to our newslettern

Get Newest Articles Instantly!

- Advertisement -
Ad imageAd image
Popular News
The journey to a mature asset administration system
The journey to a mature asset administration system
Bitmine ETH Holdings Cross 5.2 Million—CEO Broadcasts New Part For Crypto Markets
Bitmine ETH Holdings Cross 5.2 Million—CEO Broadcasts New Part For Crypto Markets
High 3 Meme Coin Gems Price Shopping for Earlier than Could 2024 – PEPE, WIF, and DOGEVERSE
High 3 Meme Coin Gems Price Shopping for Earlier than Could 2024 – PEPE, WIF, and DOGEVERSE

Follow Us on Socials

We use social media to react to breaking news, update supporters and share information

Facebook Instagram Linkedin Pinterest Tiktok Twitter Youtube
The Cryptonomics™

Cryptonomics Magazine is your premier digital source for blockchain insights, offering cutting-edge research, news, interviews, and ICO updates for everyone from entrepreneurs to institutions. We drive blockchain knowledge and growth.

Subscribe to our newsletter

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Bitmine ETH Holdings Cross 5.2 Million—CEO Broadcasts New Part For Crypto Markets
May 12, 2026
India, Russia in superior talks on vital minerals pact, sources say
May 12, 2026
XRP To $10? Thesis Hyperlinks CLARITY Act To Financial institution-Scale Liquidity
May 12, 2026
Bakkt’s Income Falls 77% in Q1 as Stablecoin Pivot Takes Form
May 12, 2026
CleanSpark Posts $378M Fiscal Q2 Loss as Bitcoin Value Drop Bites
May 12, 2026
Copyright © The Cryptonomics™ , All right reserved
  • About Us
  • Advertising Solutions
  • Privacy
  • Terms
  • Advertise
Join Us!

Subscribe & Stay Ahead of the Curve with Cryptonomics !

Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Lost your password?