Bitcoin Forum
March 28, 2024, 08:38:27 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: combining multiple prev_hash and prev_index in tx creation  (Read 63 times)
NotATether (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 6531


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 23, 2021, 12:53:29 PM
Last edit: October 23, 2021, 01:11:20 PM by NotATether
Merited by ABCbits (1)
 #1

Me and a friend are writing some code to programmatically create Trezor transactions (it's proprietary code). But we are not sure how to fill in the prev_hash field inside the Trezor API.

As you might know, when you create a transaction on Trezor, two of the parameters are prev_index and prev_hash.

But we are not sure if we should use the values from the previous transaction or combine them somehow.

Actually we are not even sure what these values are to be honest.

If someone could shed some light on these details I would really appreciate it.



We basically need to get all the UTXOs of an address. What is the most efficient way to do that?

..JAMBLER.io..Create Your Bitcoin Mixing
Business Now for   F R E E 
▄█████████████████████████████
█████████████████████████
████▀████████████████████
███▀█████▄█▀███▀▀▀██████
██▀█████▄█▄██████████████
██▄▄████▀▄▄▄▀▀▀▀▀▄▄██████
█████▄▄▄██████████▀▄████
█████▀▄█▄██████▀█▄█████
███████▀▄█▀█▄██▀█▄███████
█████████▄█▀▄█▀▄█████████
█████████████████████████
█████████████████████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
      OUR      
PARTNERS

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
▄█████████████████████████████
████████▀▀█████▀▀████████
█████▀█████████████▀█████
████████████████████████
███████████████▄█████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████▀█████████
████████████████████████
█████▄█████████████▄█████
████████▄▄█████▄▄████████
▀█████████████████████████████
█████████████████████████████████████████████████
.
   INVEST   
BITCOIN

.
█████████████████████████████████████████████████
████▄
██
██
██
██
██
██
██
██
██
██
██
████▀
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711615107
Hero Member
*
Offline Offline

Posts: 1711615107

View Profile Personal Message (Offline)

Ignore
1711615107
Reply with quote  #2

1711615107
Report to moderator
1711615107
Hero Member
*
Offline Offline

Posts: 1711615107

View Profile Personal Message (Offline)

Ignore
1711615107
Reply with quote  #2

1711615107
Report to moderator
1711615107
Hero Member
*
Offline Offline

Posts: 1711615107

View Profile Personal Message (Offline)

Ignore
1711615107
Reply with quote  #2

1711615107
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3346
Merit: 6473


Just writing some code


View Profile WWW
October 23, 2021, 09:16:02 PM
Merited by ABCbits (2), PrimeNumber7 (1)
 #2

A UTXO is identified by the txid of the transaction it was created in, and the 0-based index of its position in the transaction's outputs array. That txid is prev_hash, and the position is prev_index. This applies to all Bitcoin transactions, it is not specific to trezor.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!