Coder Social home page Coder Social logo

Comments (4)

matiu avatar matiu commented on August 23, 2024

Currently the output of /api/tx is not been parsed by insight using bitcore, but only proxied from the trusted bitcoind server.
Therefore, the output format is actually from bitcoind RPC interface, plus some info about outpoints and spent added by insight.

Implementing asm_raw would require some changes. You can do it at you app using bitcore's Script.fromHumanReadable.

from insight-api.

prusnak avatar prusnak commented on August 23, 2024

I thought that Bitcore is a standalone full node implementation and thus not using bitcoind at all.

from insight-api.

matiu avatar matiu commented on August 23, 2024

@prusnak Bitcore is not, at the moment, a full node implementation. There are some ongoing efforts to do that, but the main work is been done in other directions.

insight does require a trusted bitcoind node to run, and that probably wont change even if bitcore could implement a full node.

from insight-api.

nilnullzip avatar nilnullzip commented on August 23, 2024

@matiu Regarding your reply: "Implementing asm_raw would require some changes. You can do it at you app using bitcore's Script.fromHumanReadable."

Actually I found that does not work. The asm parser requires a hex field to be prefixed by 0x but the asm does not include that prefix.

If the asm is proxied from bitcoind decoderawtransaction, then the "hex" field in scriptPubKey contains the raw. Could you pass that one through? Here's the output I'm talking about from bitcoind:

"vout" : [
{
"value" : 0.00100000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_HASH160 8ade6188f68b3a7cd468f3f322cc97ca61f9adcd OP_EQUAL",
"hex" : "a9148ade6188f68b3a7cd468f3f322cc97ca61f9adcd87",
"reqSigs" : 1,
"type" : "scripthash",
"addresses" : [
"2N5uVe4NsP5WLSDzRUxSC99y7dPzgJxNvfC"
]
}
},

It would be helpful to retain the bitcoind "hex" field name instead of inventing a new term. I found it really helpful that insight uses the exact same format as the bitcoind json.

I need this hex/raw function also. I tried implementing the assembler as you describe but encountered the ambiguity. I couldn't find a good way around it. You can't generally get the raw transaction from bitcoind as bitcoind only tracks addresses for which it has the priv and pub keys.

from insight-api.

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.