novacoin-project / novacoin

Novacoin sources tree
MIT License
114 stars 517 forks source link

gettxout API call #371

Closed cipig closed 4 years ago

cipig commented 6 years ago

I would like to integrate Novacoin in BarterDEX, a decentralized exchange based on atomic swaps. Unfortunately the wallet is missing the gettxout API call. https://bitcoin.org/en/developer-reference#gettxout https://chainquery.com/bitcoin-api/gettxout Could this be implemented? That would be nice.

penek commented 5 years ago

samples: https://api.novaco.in/gettransaction/fedd72c2a62904891679d6f5298286015fd643a1ab7d67118fcb29cd7a70d9b7 or novacoind gettransaction fedd72c2a62904891679d6f5298286015fd643a1ab7d67118fcb29cd7a70d9b7

{ "txid" : "fedd72c2a62904891679d6f5298286015fd643a1ab7d67118fcb29cd7a70d9b7", "version" : 1, "time" : 1534925808, "locktime" : 0, "vin" : [ { "txid" : "60ea8150b257b8beaabd2feae63cc87965051d94ce6f070e477adc4b31e83cd3", "vout" : 0, "scriptSig" : { "asm" : "304402204a43b696ceebac9f94a51d2a2ebf487cfe0955eceb156ea25491453c6b50d68e022065b5310adc452df511250c7fcde2d3d10259c8eefa74f2b0c1d457d3494bb69e01", "hex" : "47304402204a43b696ceebac9f94a51d2a2ebf487cfe0955eceb156ea25491453c6b50d68e022065b5310adc452df511250c7fcde2d3d10259c8eefa74f2b0c1d457d3494bb69e01" }, "sequence" : 4294967295 } ], "vout" : [ { "value" : 4.41900000, "n" : 0, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 8e2f68145485bf9230ab8fc8d42249a32ef29de7 OP_EQUALVERIFY OP_CHECKSIG", "hex" : "76a9148e2f68145485bf9230ab8fc8d42249a32ef29de788ac", "reqSigs" : 1, "type" : "pubkeyhash", "addresses" : [ "4SfdcyW6sCNZwNcd5WStmFFWHPj5LocTg6" ] } } ], "blockhash" : "0000000000006b97ed9aaa4cb05aff392190894e6e93df65e3bc724c3b9b4720", "confirmations" : 1 }

and get vout from json array