Giter Club home page Giter Club logo

Comments (10)

ccconnor avatar ccconnor commented on August 10, 2024

The info returned from insight-api/rawtx is not correct.

from bitcoindiamond.

lix2ng avatar lix2ng commented on August 10, 2024

That explains why I can't broadcast my TX because I use it to crosscheck the format. I guess you have some docs (or code) describing the difference? Could you give me a pointer so I can do it? We need to build and sign Tx offline for our cold wallets.
Thanks @heyconnor.

from bitcoindiamond.

ccconnor avatar ccconnor commented on August 10, 2024

@lix2ng TX version is 12, and there is a preblockhash followed version.

from bitcoindiamond.

lix2ng avatar lix2ng commented on August 10, 2024

@heyconnor Version 12 was set. I'll look into the preblockhash part.
If you could provide a legal tx string (which RPC will decode) as an example, that would be very useful to me.
Thanks!

from bitcoindiamond.

ccconnor avatar ccconnor commented on August 10, 2024

@lix2ng You can get raw tx by "bitcoindiamond-cli getrawtransaction [txid]".

from bitcoindiamond.

lix2ng avatar lix2ng commented on August 10, 2024

@heyconnor Confirmed. the rawtx from RPC getrawtransaction() has the previous block hash between the version word and input count.
Interesting. Does it mean I have to query the blkhash of current tip when making a Tx? What happens if I made it 1min before next block, and if user spent 1m1s to finish the signature I'll miss the window and the whole thing must restart? This train-catching game will frustrate user for sure.

from bitcoindiamond.

ccconnor avatar ccconnor commented on August 10, 2024

@lix2ng The preblockhash is not strictly checked currently. Just make sure it's not zero.

from bitcoindiamond.

lix2ng avatar lix2ng commented on August 10, 2024

OK, thanks. do you have a BCD-specific JS lib to handle the local building and signing of Tx?

from bitcoindiamond.

ccconnor avatar ccconnor commented on August 10, 2024

No.

from bitcoindiamond.

lix2ng avatar lix2ng commented on August 10, 2024

@heyconnor Thank you for being so patient to clarify my questions.
Now it's all clear to me. I'm closing now.

from bitcoindiamond.

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.