Bitcoin Forum
May 26, 2024, 05:11:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 [2] 3 »
21  Bitcoin / Development & Technical Discussion / Re: bitcoin-cli.exe issue on: July 21, 2015, 07:45:42 AM
Thanks, also works """ instead of \"
22  Bitcoin / Development & Technical Discussion / Re: bitcoin-cli.exe issue on: July 21, 2015, 07:35:27 AM
Unfortunately it does not work

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 createmultisig 2 /'[/"04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD/",/"041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F/",/"04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1/"]/'

Also, tried double quotes, double /, and \
23  Bitcoin / Development & Technical Discussion / bitcoin-cli.exe issue on: July 20, 2015, 03:59:28 PM
Hello!

I have tried to execute client command by bitcoin-cli.exe into cmd


for example, simple

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 getinfo

works correct

but command like this

Quote
bitcoin-cli.exe -testnet -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=bitcoinrpc -rpcpassword=123456 createmultisig 2 '["04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD","041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F","04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1"]'

throw exception

Quote
error: Error parsing JSON:'[04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F1
6E75AE607099DFCFC573A3E71553BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD,0
41050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC3 8
E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F,04E086DCE7893384CBFA89FBBF7D33
DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFBDEE397E123C363D140221E81610B7B D
695905FBF198EDFD71A1]'

Should I wrap it ? or ... ?

BR!


24  Bitcoin / Bitcoin Technical Support / Re: change address for raw tx on: July 20, 2015, 09:24:00 AM
WoW! cool, thanks a lot!
25  Bitcoin / Bitcoin Technical Support / Re: change address for raw tx on: July 19, 2015, 03:54:12 PM
Thanks you, Any examples how to do it with p2sh address ?
I created address like this

createmultisig   <nrequired> <'["key,"key"]'>   Creates a multi-signature address and returns a json object

Shoud I add change output with creation raw tx?

Any correct examples ?

BR!
26  Bitcoin / Development & Technical Discussion / Re: monitoring incoming txId on: July 19, 2015, 03:48:40 PM
There are a few ways, but they differ greatly in the amount of effort required.

You could use an API - blocktrail at least supports webhooks so you can receive notifications on any payments. It lets you specify the number of confirmations, which is neat.

Otherwise you could use stratum, like the electrum client. There are public stratum servers you can query for transactions on an address, and even set up subscriptions (like blocktrail, but using a public resource).

You could actually look into using https://github.com/btcdrak/bitcoin/tree/addrindex - with the -addrindex flag it lets you look up transactions on any address at all (its bitcoin core patched with a few additional RPC commands).

You could write this purely using bitcoind. blocknotify, and parse every tx in every block.. Look for an output script that belongs to an address you are awaiting payment on. It's not ideal, since you need to be able to handle reorgs (reshuffling the blockchain, and possibly invalidating your transaction temporarily, and potentially changing the txid...which means your reorg handling needs to be excellent, to avoid what appears to be double payments).

(PS, oops, only saw your post in the other thread)

Thank you for advices. How about some local block chain explorers with RCP. Do you know some ?
27  Bitcoin / Development & Technical Discussion / Re: monitoring incoming txId on: July 19, 2015, 03:40:33 PM
What do you mean by monitoring? Do you want a command that checks to see if there are any new transactions for a bitcoin address? If so, there isn't.

I mean, get all txId for the incoming transaction, like https://www.blocktrail.com/tBTC/address/2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC/transactions
also can I get balance by address ?
28  Bitcoin / Bitcoin Technical Support / change address for raw tx on: July 18, 2015, 03:32:04 PM
Hello!

Can I set change address for raw tx?

For example


1) createrawtransaction
2) addedrawtransactionaddress
3) signrawtransaction
4) sendrawtransaction

or can I set address for the change which I created in the step 1 "1) createrawtransaction"

BR !
29  Bitcoin / Development & Technical Discussion / monitoring incoming txId on: July 18, 2015, 03:19:43 PM
Hello!

Can I monitoring incoming  txId by bitcoind ?

like https://www.blocktrail.com/tBTC/address/2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC/transactions

For example

Quote
1) createmultisig 2
2) addmultisigaddress 2
3) monitoringincommingTX id and get List:
49c585907b71d849aec3fbfbc105bb398b8bd320d885f1a6f32bd065056e86d5
9d523eedf1130867f298c8a17d835590387d3e269928ebc7b41b1c206946094d
47f3d689a9acdf29f5c7963bb8272b141d21490b012804de4e468f6e9aa1326d
...

BR !
30  Bitcoin / Development & Technical Discussion / Re: Previous output scriptPubKey mismatch: on: July 18, 2015, 03:12:02 PM
Thanks a lot, your advices very important.

Do I have any chance to get TXID without additional services like https://www.blocktrail.com/tBTC/address/2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC/transactions ?

For example

1) createmultisig 2
2) addmultisigaddress 2
3) monitoring incomming TX id ?

BR!
31  Bitcoin / Development & Technical Discussion / Re: Previous output scriptPubKey mismatch: on: July 13, 2015, 08:04:21 AM
Yes, added like this

Quote
./bitcoind addmultisigaddress 2
'["04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD","041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F","04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1"]'

But error message the same

Quote
Previous output scriptPubKey mismatch:
OP_HASH160 e8fa0f97c663ba132bd81e6d657c46825d390e6c OP_EQUAL
vs:
11 OP_UNKNOWN OP_LSHIFT OP_UNKNOWN OP_UNKNOWN OP_GREATERTHAN 0 OP_UNKNOWN OP_MAX [error] (code -22)

Also tried to use

Quote
76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac

5bd898bbe4a000cda4418c1fd28178ec99cd653e


From decoded transaction


Quote
"value" : 0.00010000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY"
]
}

Like

Quote
signrawtransaction '0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000'
'[{"txid":"fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06","vout":1,"scriptPubKey":"5bd898bbe4a000cda4418c1fd28178ec99cd653e"}]' '["91gFomEpagA1ETnqsfAK5VFeuaR3YnanbfK2L2FfR1yKdcFjmvG","92cDL4Nvw8jvfkrVJYLFVSENY4NPk9NTELQ2CWzPQ6FKmUb2y5t"]'

Or

Quote
signrawtransaction '0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000'
'[{"txid":"fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06","vout":1,"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac"}]' '["91gFomEpagA1ETnqsfAK5VFeuaR3YnanbfK2L2FfR1yKdcFjmvG","92cDL4Nvw8jvfkrVJYLFVSENY4NPk9NTELQ2CWzPQ6FKmUb2y5t"]'

BR!
32  Bitcoin / Development & Technical Discussion / Previous output scriptPubKey mismatch: on: July 13, 2015, 07:46:48 AM
Hello,

Tried to create and spend from multi signature address


1) Create 2of3 
Quote
./bitcoind createmultisig 2 '["04D9546728BB1D1BF309EF3C2C7278D8D306052ECF7DC81443F16E75AE607099DFCFC573A3E7155 3BD8321D91C209BAB03AA999BEFA6E77734C0F4DD34EF78EBFD","041050FF637A97FA462DFFA19D0BC013869F6231895019BD9F263A0A55A067665CFCA4473AAB1DC 38E8AECF359E23CE6BB35FF900BC84FDD890A3B982EA50DD92F","04E086DCE7893384CBFA89FBBF7D33DE3F1EE01279A1E9810D952F1C440E91FC7EE7CB9CF070DFB DEE397E123C363D140221E81610B7BD695905FBF198EDFD71A1"]'
 
{
"address" : "2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC",
"redeemScript" : "524104d9546728bb1d1bf309ef3c2c7278d8d306052ecf7dc81443f16e75ae607099dfcfc573a3e 71553bd8321d91c209bab03aa999befa6e77734c0f4dd34ef78ebfd41041050ff637a97fa462dff a19d0bc013869f6231895019bd9f263a0a55a067665cfca4473aab1dc38e8aecf359e23ce6bb35f f900bc84fdd890a3b982ea50dd92f4104e086dce7893384cbfa89fbbf7d33de3f1ee01279a1e981 0d952f1c440e91fc7ee7cb9cf070dfbdee397e123c363d140221e81610b7bd695905fbf198edfd7 1a153ae"
}

2) Send a few coins to the address 
Quote


3) Checked txId for my new address https://www.blocktrail.com/tBTC/address/2NEV6KKpFiWb3HKb75TqEupePDXaznTqGaC/transactions
fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06Created 
and created RawTX

Quote
createrawtransaction '''
[
{         
"txid": "'fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06'",
"vout": '1'
}
]
''' '''
{
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY": 0.0001
}'''

0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000

3) Decoded raw TX and get scriptPubKey hex

Quote
decoderawtransaction
0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000


{
"txid" : "6b4e025d8a063994401f1de33ab58156f8002a71f74cdf039a1aede84c70af90",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06",
"vout" : 1,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.00010000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY"
]
}
}
]
}


4) Tried to signature

Quote
signrawtransaction '0100000001069fcd8ed399a6c9efa167379107c83181d6448857e3aa87c5681be1a1b0a4fb01000 00000ffffffff0110270000000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e 88ac00000000'
'[{"txid":"fba4b0a1e11b68c587aae3578844d68131c807913767a1efc9a699d38ecd9f06","vout":1,"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac"}]' '["91gFomEpagA1ETnqsfAK5VFeuaR3YnanbfK2L2FfR1yKdcFjmvG","92cDL4Nvw8jvfkrVJYLFVSENY4NPk9NTELQ2CWzPQ6FKmUb2y5t"]'

5) Have got error

Quote
Previous output scriptPubKey mismatch:
OP_HASH160 e8fa0f97c663ba132bd81e6d657c46825d390e6c OP_EQUAL
vs:
OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG (code -22)

Which scriptPubKey should I use? How can I get it?

BR!
33  Bitcoin / Bitcoin Technical Support / Re: multi-sign and Invalid private key (code -5) on: July 07, 2015, 05:13:27 PM
Thanks.

Quote
You are using the wrong private key. Since this is a testnet transaction, you must sign it using a private key in testnet format. The private key that you posted above is for the mainnet. Testnet private keys start with either '9' or 'c'.

I'he used next site for generation keys == https://brainwallet.org/#generator
which site for the test net do you recommend ?

Quote
Also, I don't think you included the scriptpubkey or the redeemscript in the createrawtransaction. Be sure to do that. Follow Gavin's instructions in the link.

According to the example
Code:
signrawtransaction '0100000001cdba95b55...' 
'[
{"txid":"30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd",
"vout":1,"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"redeemScript":"5241045"}]'
'["5K9T8VGcAztUQs5rSRGnf6oEwymY4k8YJV7MBfU5T3LD4H3wK2E"]'

BR!
34  Bitcoin / Bitcoin Technical Support / Re: multi-sign and Invalid private key (code -5) on: July 07, 2015, 07:51:55 AM
Hello!

Thank you for your answer.

I have tried to change vout from 0 to 1

Code:
createrawtransaction '''
[
{
"txid": "'30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd'",
"vout": '1'
}
]
''' '''
{
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY": 1.9999
}'''

0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300100000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000

and decode it

Code:
decoderawtransaction 
0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300100000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000

{
"txid" : "3c97e250e8a67d1adacc86f56a2b29a32e4f7835586d681d0bc788b73587c622",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd",
"vout" : 1,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 1.99990000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY"
]
}
}
]
}

As you can  see vout == 1

but the error message same

Code:
signrawtransaction '0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300100000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000' 

'[{"txid":"30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd","vout":1,"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"redeemScript":"5241045e8385118c8b77a044390364dd5fb8c4864d138491fc788948be81f6842f45bc6b6c9401a90f8479b2af8191b7a6a7735053f2724668cf8af8a2c30d853b801141042cb46c5cfa2a5af18effd8296e7aeda287d407ccc2e42cc15bb7d27c6f84e4a78ade99d1aa7e8efa2fd63f8573548ec1a33f53e0135ccbe15bc5c9eb0d6e0cfd4104d109b4e95fd48162e5424fe71d769c9cb4bc8cb40224ab6b8d1e9fac6f6925c34c902d38caebebf2703a7685bf788adfee83bffa637f95d3c782c3d4bb0120f553ae"}]'

'["5K9T8VGcAztUQs5rSRGnf6oEwymY4k8YJV7MBfU5T3LD4H3wK2E"]'


Invalid private key (code -5)

what is wrong ?

Also tried to use this example 2 of 3 https://gist.github.com/gavinandresen/3966071
The error message same 
10:42:00

Invalid private key (code -5)

What should I change ?

BR!
35  Bitcoin / Bitcoin Technical Support / multi-sign and Invalid private key (code -5) on: July 06, 2015, 12:48:43 PM
Hello,

I am truing to spend coins from P2SH address.

step by step


1) Generated keys
Code:
# https://brainwallet.org/#generator

#SEED 1 => nativeapi seed generatoin one
#privateKey => 5K9T8VGcAztUQs5rSRGnf6oEwymY4k8YJV7MBfU5T3LD4H3wK2E
#publicKey => 045e8385118c8b77a044390364dd5fb8c4864d138491fc788948be81f6842f45bc6b6c9401a90f8479b2af8191b7a6a7735053f2724668cf8af8a2c30d853b8011
#
#SEED 2 => nativeapi seed generatoin two
#privateKey => 5JFoZ6gW7dkwbtZVSyvxneRead1AzaiGvxyVpEa3n6k34321AXA
#publicKey => 042cb46c5cfa2a5af18effd8296e7aeda287d407ccc2e42cc15bb7d27c6f84e4a78ade99d1aa7e8efa2fd63f8573548ec1a33f53e0135ccbe15bc5c9eb0d6e0cfd
#
#SEED 3 => nativeapi seed generatoin three
#privateKey => 5JRrkriuY9s64h4eUBzqSrtZL1UFKgAvrhJPAUaVadrHSBxS75y
#publicKey => 04d109b4e95fd48162e5424fe71d769c9cb4bc8cb40224ab6b8d1e9fac6f6925c34c902d38caebebf2703a7685bf788adfee83bffa637f95d3c782c3d4bb0120f5


2) combine the three keys into a multisig address:
Code:
./bitcoind createmultisig 2 '["045e8385118c8b77a044390364dd5fb8c4864d138491fc788948be81f6842f45bc6b6c9401a90f8479b2af8191b7a6a7735053f2724668cf8af8a2c30d853b8011","042cb46c5cfa2a5af18effd8296e7aeda287d407ccc2e42cc15bb7d27c6f84e4a78ade99d1aa7e8efa2fd63f8573548ec1a33f53e0135ccbe15bc5c9eb0d6e0cfd","04d109b4e95fd48162e5424fe71d769c9cb4bc8cb40224ab6b8d1e9fac6f6925c34c902d38caebebf2703a7685bf788adfee83bffa637f95d3c782c3d4bb0120f5"]'

3) Checked address and txid
Code:
https://www.blocktrail.com/tBTC/address/2MvDgSTXGEbi9nm4UhP1B6Wvi7LMJ9MAdmu/transactions
30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd

4) Created rawTX
Code:
createrawtransaction '''
[
{
"txid": "'30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd'",
"vout": '0'
}
]
''' '''
{
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY": 1.9999
}'''

0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300000000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000


5) Decoded raw tx and get - scriptPubKey hex
Code:
decoderawtransaction 0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300000000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000

{
"txid" : "530aa989a79a2738d2b6b956b6fdc788818fcd334963036aa6d6686598b6d492",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd",
"vout" : 0,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 1.99990000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 5bd898bbe4a000cda4418c1fd28178ec99cd653e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"motbFuaf7Q7xWqBbo7zFu83sdNBspvYkFY"
]
}
}
]
}


6) Tried to sign it by the first key

Code:
signrawtransaction '0100000001cdba95b552d24a50182208816179578544d6d623fb0ca1dfbec4e6c845e6a9300000000000ffffffff01f09aeb0b000000001976a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac00000000' 

'[{"txid":"30a9e645c8e6c4bedfa10cfb23d6d6448557796181082218504ad252b595bacd","vout":0,

"scriptPubKey":"76a9145bd898bbe4a000cda4418c1fd28178ec99cd653e88ac","redeemScript":"5241045e8385118c8b77a044390364dd5fb8c4864d138491fc788948be81f6842f45bc6b6c9401a90f8479b2af8191b7a6a7735053f2724668cf8af8a2c30d853b801141042cb46c5cfa2a5af18effd8296e7aeda287d407ccc2e42cc15bb7d27c6f84e4a78ade99d1aa7e8efa2fd63f8573548ec1a33f53e0135ccbe15bc5c9eb0d6e0cfd4104d109b4e95fd48162e5424fe71d769c9cb4bc8cb40224ab6b8d1e9fac6f6925c34c902d38caebebf2703a7685bf788adfee83bffa637f95d3c782c3d4bb0120f553ae"}]'

'["5K9T8VGcAztUQs5rSRGnf6oEwymY4k8YJV7MBfU5T3LD4H3wK2E"]'

Have got -> Invalid private key (code -5)


What have I done wrong? some incorrect parameters or steps ?

Regards.
36  Bitcoin / Development & Technical Discussion / Re: rawtransaction and multisignature on: July 03, 2015, 04:30:42 AM
Use listunspent api to get txid and vout.

Hello, thanks. listunspent works if current address exists in the wallet. in my case I want to use rawtransaction without storing data into wallet.
37  Bitcoin / Development & Technical Discussion / rawtransaction and multisignature on: July 02, 2015, 09:19:14 AM
Hello!

Could you please give some advice how to spend coins from multi-signature address.

I used native bitcoin client for interaction with bitcoin API

1) generated keys by seed https://brainwallet.org/#generator
Code:
#SEED 1 => nativeapi seed generatoin 1 
#privateKey => 5J12tRNKL3VnVikXXShQDg34shBgLh5km3p6fi1ppAJ4Xdm2Vn5
#publicKey = 04cf3b0ab1eda3c2d17b20b6827f0bc3135c86a17dac2624cdf30d94ec32d57926c0bb849553b85bd82bb42ba8b807994ee31659904d587927ab7f3ca4d55e0df0
#
#SEED 2 => nativeapi seed generatoin 2
#privateKey => 5Jji5oEwmgNRunYVVh5DaEeKpe45VVpugdRWwabSHHC38LKuSUv
#publicKey = 043a021139c31de1ece897fe13af88b2c63c571378bd574ff994e3804ab76a7cf4f6d2d8fef3e1fa68bc97f9069574cdf57376f22977cb93460e5d2fd4ed0a2c07
#
#SEED 3 => nativeapi seed generatoin 3
#privateKey => 5Kih8h8TFbjKVuX866eVesrKLdwTfyNey6YQaYroHBzwtWvKrMa
#publicKey = 04a2242366abdbc2c32c6f42731b60f93bf7c1a860bd32b260c1d63b65e1ce0718d593bb644e98b6d083b80f55adb109e4a7161ce0f268e48c885f42f5653e03b9

2) createmultisig 2 '["04cf3b0ab1eda3c2d17b20b6827f0bc3135c86a17dac2624cdf30d94ec32d57926c0bb849553b85bd82bb42ba8b807994ee31659904d587927ab7f3ca4d55e0df0","043a021139c31de1ece897fe13af88b2c63c571378bd574ff994e3804ab76a7cf4f6d2d8fef3e1fa68bc97f9069574cdf57376f22977cb93460e5d2fd4ed0a2c07","04a2242366abdbc2c32c6f42731b60f93bf7c1a860bd32b260c1d63b65e1ce0718d593bb644e98b6d083b80f55adb109e4a7161ce0f268e48c885f42f5653e03b9"]'


Got 'address' and 'redeemScript'

Code:
"address" : "2MtmMhz1QJJiMvLFbMGPjbj8PeZxJpmKddg",
"redeemScript" : "524104cf3b0ab1eda3c2d17b20b6827f0bc3135c86a17dac2624cdf30d94ec32d57926c0bb849553b85bd82bb42ba8b807994ee31659904d587927ab7f3ca4d55e0df041043a021139c31de1ece897fe13af88b2c63c571378bd574ff994e3804ab76a7cf4f6d2d8fef3e1fa68bc97f9069574cdf57376f22977cb93460e5d2fd4ed0a2c074104a2242366abdbc2c32c6f42731b60f93bf7c1a860bd32b260c1d63b65e1ce0718d593bb644e98b6d083b80f55adb109e4a7161ce0f268e48c885f42f5653e03b953ae"
}
Checked this https://www.blocktrail.com/tBTC/address/2MtmMhz1QJJiMvLFbMGPjbj8PeZxJpmKddg address and send a few coins to the address by http://faucet.haskoin.com

Now I want to spent coins from this address

As I know I have to prepare raw transaction and sign it by 2 of 3

like this:
createrawtransaction
signrawtransaction
signrawtransaction
sendrawtransaction

for create raw TX need to use txid

Should I get txid for the address 2MtmMhz1QJJiMvLFbMGPjbj8PeZxJpmKddg ? and create rawtransaction like this

Code:
createrawtransaction '[{"txid":"2of3_address_txid","vout":0"}]' '{"destination_address":0.00010000}'

How can I get txid my created 2of3 address? any app`s web services ?

BR!
38  Bitcoin / Development & Technical Discussion / Re: get TXID by address or redeemScript on: July 02, 2015, 08:25:34 AM
Thank you,
Can you advice block-chain explorer like bitcoind or online service with open API ?
39  Bitcoin / Development & Technical Discussion / get TXID by address or redeemScript on: July 02, 2015, 05:35:24 AM
Hello!

Do we have any chance to get 'txid' by address or redeemScript into console command ?

BR!
40  Bitcoin / Development & Technical Discussion / Re: Sign raw transaction testnet3 issue on: July 01, 2015, 07:14:00 AM
yes you are right. it is Java RCP open source library.
I have checked same operation into QT console. All works well.
Does bitcoin has some additional RCP WEB services ?
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!