Code Monkey home page Code Monkey logo

Comments (4)

sr-gi avatar sr-gi commented on May 27, 2024

I'm not sure I get exactly what you asked in the firsts paragraphs, however, if you're using a chainstate for Core 0.15+ the LevelDB key is:

c:tx_id:index

So in order to get the transaction ID for each utxo you just need to parse the whole chainstate.

from bitcoin_tools.

sr-gi avatar sr-gi commented on May 27, 2024

As an example, for Core version 0.15+ and the following utxo:

tx_id = 0118dd986e59473732239d39cb3b8890bf32677719dd8933b05f6614f4020000

out_index = 0

You will find the following key in the chainstate:

43000002f414665fb03389dd19776732bf90883bcb399d23323747596e98dd180100

That is:

43 = Character c
000002f414665fb03389dd19776732bf90883bcb399d23323747596e98dd1801 = Little endian representation of the tx_id
00 = 1 byte representation of the index (0)

from bitcoin_tools.

sr-gi avatar sr-gi commented on May 27, 2024

@ubamnow404 did you managed to do it? Do you need some extra help?

from bitcoin_tools.

ubamnow404 avatar ubamnow404 commented on May 27, 2024

thanks you, I worked it out, and have working prototype. Appreciate your help 🙏

from bitcoin_tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.