Bitcoin Forum

Other => Off-topic => Topic started by: bracek on April 03, 2014, 07:22:47 PM



Title: please help me create a raw namecoin transaction
Post by: bracek on April 03, 2014, 07:22:47 PM
I guess I am doing only some syntax error :)


trying to execute this in qt console :

createrawtransaction '[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0}]'
'{"N1zDJnuNdBFXxF17JmmJFjLAM1t5PTbKoC":3.3}'

than this :

createrawtransaction '[{2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41,0}]'
'{N1zDJnuNdBFXxF17JmmJFjLAM1t5PTbKoC:3.3}'

none of those combinations works, all I get is error parsing JSON

I have more than 3.3 nmc in wallet,
but they are currently young, just landed in

my intention is to send them out by creating transaction online than signing it offline
with signrawtransaction

can someone teach me this :)
thanx


Title: Re: please help me create a raw namecoin transaction
Post by: gweedo on April 03, 2014, 07:24:46 PM
Code:
createrawtransaction '[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0}]' 
'{"N1zDJnuNdBFXxF17JmmJFjLAM1t5PTbKoC":3.30000000}'

You were missing quotes and proper json.

https://en.bitcoin.it/wiki/Raw_Transactions#createrawtransaction_.5B.7B.22txid.22:txid.2C.22vout.22:n.7D.2C....5D_.7Baddress:amount.2C....7D


Title: Re: please help me create a raw namecoin transaction
Post by: roslinpl on April 03, 2014, 07:34:42 PM
Code:
createrawtransaction '[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0}]' 
'{"N1zDJnuNdBFXxF17JmmJFjLAM1t5PTbKoC":3.30000000}'

You were missing quotes and proper json.

https://en.bitcoin.it/wiki/Raw_Transactions#createrawtransaction_.5B.7B.22txid.22:txid.2C.22vout.22:n.7D.2C....5D_.7Baddress:amount.2C....7D

Yes this should be the answer for OP problem indeed.
+1


Title: Re: please help me create a raw namecoin transaction
Post by: bracek on April 03, 2014, 08:04:18 PM
thank you :)
it works

I get this:

010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000

now,
if my password is abc123

signrawtransaction 010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000 '[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0, "scriptPubKey": }]' '[abc123]'

is that even correct ?

and I don't know where to find that scriptPubKey value,
tried on block explorer and in my transaction description, but no such number



Title: Re: please help me create a raw namecoin transaction
Post by: gweedo on April 03, 2014, 08:26:28 PM
The scriptPubKey is the public key of address, you can use validateaddress to get it.


Title: Re: please help me create a raw namecoin transaction
Post by: bracek on April 03, 2014, 09:22:59 PM
The scriptPubKey is the public key of address, you can use validateaddress to get it.

ok, I have this scryptpubkey, got it with

decoderawtransaction 010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000

and now,  when i enter this


signrawtransaction 010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000
'[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0,
"scriptPubKey":"76a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f8188ac" }]' '[abc123]'

I get

error: value is type int, expected array,

I am entering password in a format as I would enter it through keyboard

if password is abc123, I am entering directly abc123 as parameter


Title: Re: please help me create a raw namecoin transaction
Post by: gweedo on April 03, 2014, 09:29:22 PM
Is that password for your wallet? Because you have use wallet unlock before using signrawtransaction.


Title: Re: please help me create a raw namecoin transaction
Post by: bracek on April 03, 2014, 09:53:51 PM

I am still stuck,

people help, please, I am sooo close now :)

signrawtransaction 010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000 '[{"txid":"2125bed6033a8e158278129bba38b3187a1d881744a112512345ec930d7ecb41","vout":0,"scriptPubKey":
"76a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f8188ac"}]'

this is my best bet now,


it returns that same hash parameter and description -- "complete" :false


when I execute only short version

signrawtransaction 010000000141cb7e0d93ec45235112a14417881d7a18b338ba9b127882158e3a03d6be252100000 00000ffffffff018066ab13000000001976a9143b5b3007d7dd2cdeaba2542b6a2effa33cc13f81 88ac00000000

same thing happens,


I have the same version of qt online and offline,
and that is the latest available

wallet was encrypted in standard qt interface

and I unlock it with walletpassphrase before I execute those above instructions

any ideas ?


my goal is to spend from a cold storage, so if any of you people have a solution other than doing raw transactions,
please speak now, or forever hold your peace :)



Title: Re: please help me create a raw namecoin transaction
Post by: kjj on April 07, 2014, 09:49:09 AM
I've never tried this with namecoin.  It probably should work the same way, but I've never looked at the source or anything else.

Just to be clear, is the key for the transaction being redeemed in your wallet?


Title: Re: please help me create a raw namecoin transaction
Post by: bracek on April 07, 2014, 07:10:56 PM
I've never tried this with namecoin.  It probably should work the same way, but I've never looked at the source or anything else.

Just to be clear, is the key for the transaction being redeemed in your wallet?


yes, regular namecoin qt wallet, latest

this is a simple test,
no multisig, just signing from offline, where my private key is,

I created a transaction (request) online, same qt version, same wallet in it


Title: Re: please help me create a raw namecoin transaction
Post by: bracek on April 09, 2014, 10:08:31 AM
nevermind, if anyone is still looking here, I capitulated on this matter