Bitcoin Forum
May 26, 2024, 07:08:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3]
41  Bitcoin / Development & Technical Discussion / Sign raw transaction testnet3 issue on: June 30, 2015, 04:07:28 PM
Hello

I am trying to use RCP with native client + testnet3

Prepared and create raw transaction


Code:
        //We save the txid and output -> bitcoin-cli -regtest getnewaddress
        String newAddress = getApi().getNewAddress();

        //bitcoin-cli -regtest createrawtransaction
        List<Output> outputList = getApi().listUnspent();
        String raw = getApi().createRawTransaction(outOverview(outputList.get(0)), destination());

        //bitcoin-cli -regtest decoderawtransaction
        //Use the decoderawtransaction RPC to see exactly what the transaction we just created does.
        RawTransactionOverview rawTransactionOverview = getApi().decodeRawTransaction(raw);

have got valid data after decodeRawTransaction

Code:
RawTransactionOverview(super=Entity(),
txId=386f447310db1eea491291d67f21d310ff586fe3367d7c7e5a4ad56e7683e178,
version=1,
lockTime=0,
vIn=[RawInput(super=Entity(),
txId=70422d040ea45a546dc60e7d5a6aa0d03e92ed7597ca261da48f52eb6d882011,
vOut=1,
scriptSig=SignatureScript(super=Entity(),
asm=,
hex=),
coinbase=null,
sequence=4294967295)],
vOut=[RawOutput(super=Entity(),
value=0.00010000,
n=0,
scriptPubKey=PubKeyScript(super=SignatureScript(super=Entity(),
asm=OP_DUPOP_HASH16068b38e95592fbee924899b8264b0391d638e41a6OP_EQUALVERIFYOP_CHECKSIG,
hex=76a91468b38e95592fbee924899b8264b0391d638e41a688ac),
reqSigs=1,
type=ScriptTypes(name=pubkeyhash),
addresses=[mq4Zfqjo9tB25jwJRc3NQPExk4mwsFRwQQ]))])
   

Try to sign tx.

Code:
SignatureResult signatureResult = getApi().signRawTransaction(raw);

bitcoind freezes. I am waiting for response ...

Any advice ?

Regards!
42  Bitcoin / Development & Technical Discussion / Re: bitcoind RCP multi-signature issue on: June 30, 2015, 12:52:42 PM
Hello!
Thanks you for your answer

Not so clear about this step, could you please explain and link more details

Code:
getrawtransaction <txid> 1 //Gets scriptPubKey and vout

How can I get txid ? in the previous steps ?

I debuged it
Code:
getnewaddress   //Generates new bitcoin address
validateaddress <address>  //Gets publicKey address
dumpprivkey <address>   //Gets the privatekey

Could not find txid.

RB!
43  Bitcoin / Development & Technical Discussion / bitcoind RCP multi-signature issue on: June 28, 2015, 06:02:49 PM
Hello!

I want to create 2 of 3 address and spend from it

1) According to API_calls_list, created 2 of 3 address end send to the address a few coins by http://faucet.haskoin.com

Code:
createMultiSig(2, publicKeys);

Now can check positive balance
https://www.blocktrail.com/tBTC/address/2MuEh1XHKQNKQfzoGTNK2hpr8rLy42WsAbm

2) How can I spend coins from this multi-signature address ?
I have red for spending coins need to create output/input, and create raw transaction

Code:
txOutputIds = [b]txID[/b]
input  = "mmVDgckWdBY4JRabxXBRsWC7yeGZPk8uVk", BigDecimal.valueOf(0.0001));

createRawTransaction(txOutputIds, input);

how cah I get TXid by address 2MuEh1XHKQNKQfzoGTNK2hpr8rLy42WsAbm ?
Can I get TXid by bitciond RCP ?


BR!
Pages: « 1 2 [3]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!